LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

resizing the grid of an image

Hi,
The problem is :
i am scanning a slab with a linear CCD cam. The slab is moved by a
step motor controller in front of the fixed cam. The cam takes a
picture every x ms. But the movement of the slab is not uniform, there
is an acceleration and then a deceleration. So the picture of the
plane wich is made by this meaning is not the real picture (there is a
deformation at the beginnning and at the end du to
acc(dec)elearation). I would like to treat the picture to have the
real one. I have the coordinates of the position of the slab when the
picture is taken (from the step motor controller). I need to rearange
the grid of the matrix from an arbitrary to a regular one, and then
interpolate the value of the pixel on the new uniform grid.
I
think that IMAQ can do this quit simply (with) a VI? Otherwise does
anybody have an idea to do this.
Thank you very much.

JB
0 Kudos
Message 1 of 3
(2,535 Views)
Hi JB,

here's an idea:

-each time you get an image you can get the position value and insert it in an array
- when you have your whole image you will have created an array of all the position values relative to all the scans
- from this array you can calculate the minimum displacement between scans; this is the spatial resolution of your system when the slab is moving at maximum speed
- you can then convert your whole image into a 2D array using the IMAQ ImageToArray function
- you have to extract from this array only the scans (1D arrays) spaced at the spatial resolution calculated and reassembled in a new 2D array
- at this point you can convert your 2D array in an image with the IMAQ ArrayToImage function

Your new image is formed by sequence of scans
uniformely spaced, and your slab should look correctly shaped.

I hope I have been quite clear, if not don't hesitate to ask details.

Good luck,

Alberto
0 Kudos
Message 2 of 3
(2,535 Views)

hi,

 

   Iam dealing with the similar way in my project to which you have given an idea. I am new to labview,so can you please send me a sample code to which you have given the explanation.

0 Kudos
Message 3 of 3
(2,062 Views)