LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

decimal shift

hello there,
I am presently generating a image simulation, for that ineed to shift my image by decimal values. I tried using IMAQ shift but it doesnt take decimal values. I also saw another post regarding the same matter, where someone has posted a filter vi, but I am not able to use it.
Can you please help me in the same
0 Kudos
Message 1 of 9
(3,235 Views)
Hi labvi.
I got completly astonished when reading your post and had a look at the VI IMAQ Shift (in VDM 8.2.1): You can specify XOffset and YOffset as decimal numbers.
The shift works fine (tested it with offsets up yo 100). So where is the problem? Maybe the shift operation itself is not what you need?
Regards, Guenter
0 Kudos
Message 2 of 9
(3,201 Views)
hey thanks for reply
but the IMAQ shift doesnt work in decimals for 8.0
0 Kudos
Message 3 of 9
(3,197 Views)
Hi labvi,

Thank you for contacting National Instruments.  May I ask why you need to shift an image by a non-integer value?  If you tried to place a decimal value into the IMAQ Shift VI it will simply coerce the value back into an integer.  So in the end, even though you can wire a decimal number up to it the VI, it will not take it anyway.

The reason why I ask why a decimal shift of an image is needed because images are digital.  So since shifting by a decimal is not possible for a pixel, you would need to interpolate what the pixel 'might' look like based upon the surrounding pixels hence the need of a filter.

Also, can you point me to the forum thread that talks about this filter?

Thanks!

nitsujri
0 Kudos
Message 4 of 9
(3,173 Views)
labvi,

I found this post which I believe you may be talking about:

http://forums.ni.com/ni/board/message?board.id=200&message.id=7613&query.id=396166#M7613

Is this correct?  I looked at the VI that is posted and it has a password protection on it.  Let me know if this is correct.

Thanks!

nitsujri


0 Kudos
Message 5 of 9
(3,160 Views)
HI
Yes the link you sent is the one I was talking about.
You mean  to say that i should enlarge the image move it by a pixel and shrink it right?
I can interpolalte the image by resampling but then the quality will deteriorate.
what should i do then

0 Kudos
Message 6 of 9
(3,143 Views)
Hi labvi,

Why is it that you need shift by a subpixel or better what does your program do?  I'm just wondering if I might be able to recommend a better method of completing your task.

If you are absolutely in need of a subpixel shift, I would recommend attempting to contact Bruce Ammons, the original creator of the program from the other thread.  He has an e-mail and a phone number at which to be contacted at while his website is:

http://www.ammonsengineering.com

Thank you!

Justin Louie
0 Kudos
Message 7 of 9
(3,106 Views)
hi ,
I am lloking at random motion in a biological sample, I track this motion.
I want to simulate such a random walk of a static image by shifting it subpixelly by a known value and then doing the further analysis as i would do wiith the native random walk.
Hope you get it.


0 Kudos
Message 8 of 9
(3,103 Views)
Hi labvi,

I do understand your application, but I do not understand why it is absolutey necessary to shift subpixelly.  From my understanding, it seems as if what you're looking for is more resolution to see the sample move than just the standard amount of pixels.  Whether you enlarge the picture, move and shrink, or enlarge and just move, or actually do a subpixel shift, the picture will deteriorate in each case.  Each of those methods of simulating a subpixel move will require a form of resampling and interpreting pixels. 

I would definitely recommend contacting Bruce Ammos if you still want to do the actual shift, and he would know best how to implement his solution.  He is a very valueable forum member that understands a lot about our vision products.

Let me know if there is anything else I can do for you.

Thanks!

Justin Louie
0 Kudos
Message 9 of 9
(3,067 Views)