LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

image calibration ( correction for tilt)

Hi
 
I am using labview 7.x with pci 6013 and imaq1407 and am grabbing images using a camera which is at some angle to the image (flat/horizontal).As we know,a circle looks like an ellipse from an angle and some perspective correction can be done to get the actual image(circle) back.Does anyone know how to do this ? My images are not circlular ,but I hope I can apply the same correction for all the images (which look tilted).
 
I am working on these vis right now and am attaching those here .I am using following subvis:
 
imaq learn calibration
imaq set calibration info
imaq correct calibrated image
 
Output of the "imaq learn calibration" subvi is "calibrated image".But it's not calibrated image in literal sense,it's just an image that is being used to learn calibration i.e. it is a calibration template not a "calibrated image".Even the image that comes out of "imaq set calibration info" is called "calibrated image" , but it is not.It is the output of "imaq correct calibrated image" that looks like a calibrated image.But sometimes it is upside down or rotated.
 
 
Is there anyway I can eliminate this rotation ?
 
Thanks for sparing your time.
Cheers
 
Deepak
 
 
LAB View 2010 SP1
0 Kudos
Message 1 of 3
(2,794 Views)
Hi Deepak,

It sounds like the behavior you are describing with the rotation is a problem with the values you are assigning to your points.  Calibration bases the origin (0,0 point) at the top left corner of the image.  Generally when we assign points in 2-degree graphs we assume the origin is in the bottom right.  Assigning values in this way can rotate or invert the image in the way you described.  You could double check and make sure you are assinging values to your points assuming the origin is in the top left to see if that fixes the problem.  It would be easier to know for sure if you would post some before and after images.

Message Edited by s_a_s on 06-08-2006 03:23 PM

S. Arves S.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(2,782 Views)
Hi Arves
 
Thanks a lot for such a quick reply!
 
Coordinates for the image are defined the way you mentioned in terms of pixels.I am using "learn calibration.vi" to change the coordinate system  (it has option for choosing the origin and direct/indirect axes).I want to calibrate my images using a standard grid taking origin at the center of the image rather than the origin of actual image.I have attached the image that I get after "learncalibration.vi" .Image that I get from the "imaqcorrect.vi" is the mirror image of this , taking horizontal axis as mirror.So now I am using "symmetry.vi" to get the image back ,but I suppose "imaqcorrect.vi" should not be doing this.
 
Also another question,why does "imaqcorrect.vi" changes the size of the image ? There is an option for preserving the area and so the size in the subvis.But how should one go about choosing one of these options ? Can you name couple of applications where one option is better over other?
 
In "learncalibration.vi",we have two choices for distortion correction-perspective and non-linear.How these are different ?Correction I am looking for should come under perspective (in a litera sense) , but I am using non-linear option as it is done in one of example vis.
 
 
Thanks
 
Deepak
LAB View 2010 SP1
0 Kudos
Message 3 of 3
(2,772 Views)