comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: shifting individual pixels within an image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: shifting individual pixels within an image [message #70733] Mon, 03 May 2010 06:44 Go to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On May 3, 3:56 am, barbis <tonimuusim...@gmail.com> wrote:
> Hello all,
>
> pleaseplease help me!
> Quite new on idl and just wondering is there a simple way to move
> individual pixels within an image?
>
> For example a function
>
> output = indishift(input, tx,ty)
>
> where input,tx and ty are same size arrays and e.g if in pixel
> location  (30,30)  tx has a value 5 and ty has a value 0, then output
> has the same value on (30,30) as the input image PLUS  the pixel value
> from input image (35,30).
>
> So tx contains the shifts in x direction and ty in y direction.
>
> Thanks alot for any help!!!

Couldn't you just do something like:

s = size(input,/dimensions)
indx = rebin(indgen(s[0]),s[0],s[1],/sample)
indy = rebin(indgen(1,s[1]),s[0],s[1],/sample)
input2 = input + input[indx+tx,indy+ty]
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How to reverse the axis
Next Topic: OR

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:35:48 PDT 2025

Total time taken to generate the page: 0.28753 seconds