Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Perspective Image size

Hi, i'm working on a system that captures through IMAQsnap via a webcam, a surface at a range of angles from 0deg to 85deg in the polar angle - the angle viewing the surface.
Basically i've assumed that after i carried out lens distortion removal and then corrected for the angle using a 4 point mapping system to calibrate the perspective correction through visual assiatant for each angle, that i would get the same size image out in each case.

What i get is a 271X271 image for the 0deg strait -on to the imager image, and i get 90X90 for the 85deg image. And  I'm loosing image size rapidly between these two sizes.

Anyone had a simular problem?? With image size reduction here?

John P.
0 Kudos
Message 1 of 3
(3,267 Views)
Hi John,

What function are you using to correct the image? Generally I would expect more than a four point calibration. It is usually done with a sheet of points spaced a few centermeters apart. As for the image size, it is expected that the corrected image will be smaller than the original. Have you tried looking at any of the LabVIEW shipping examples? They are located under:
Help>>Find Examples>>ToolKits and Modules>>Vision>>Functions>>NonLinear Calibration example or Perspective calibration example.

Regards

Jon B
Applicaitons Engineer
NI UK & Ireland
0 Kudos
Message 2 of 3
(3,237 Views)

Unfortunately, the mapping function that generates the undistorted image doesn't allow you much control over the image size.

The only way I can think of doing it is to loop through the real world coordinates one pixel at a time, convert them to image coordinates and look up the pixel value at each coordinate.  A 2D loop through all the coordinates would generate the corrected image as a 2D matrix.  It would be very slow, but you could control the size of your image.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 3 of 3
(3,227 Views)