LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove Distortion in Image taken by camera?

Solved!
Go to solution

Hello , 

I am using Ni Vision for Object detection and want to do coordinate alignement. Currenly I am considering XY coorinate only.

My camera is Mounted on fixed position, But I am facing problem regaring to coordinate alignment. 

Object which are near to center point of camera are aligned good with world coordinate but object, which are bit far from center of camera has some difference in (cm). I guess this is because of camera lens distortion so called barrel distortion.

Is there any way to correct or remove this distortion from the image??

I had seen some vi called perspective calibrartion vi, but I am bit confuse that how to use it, or may be there is some other solution to overcome this problem.

 

Thank you very much in advance.

 

Regards, 

Ankit Ramani.

 

0 Kudos
Message 1 of 5
(5,033 Views)

Hi Ankit,

 

what you are looking for is a calibration grid and the corresponding functions.

 

What are the Requirements for an NI Vision Calibration Grid? - National Instruments
http://digital.ni.com/public.nsf/allkb/815CFD0DACE4AFB08625770F004EE84E

 

IMAQ Learn Perspective Calibration VI - NI Vision 2016 for LabVIEW Help - National Instruments
http://zone.ni.com/reference/en-XX/help/370281AC-01/imaqvision/imaq_learn_perspective_calibration/

 

IMAQ Learn Calibration Template VI - NI Vision 2010 for LabVIEW Help - National Instruments
http://zone.ni.com/reference/en-XX/help/370281M-01/imaqvision/imaq_learn_calibration_template/

 

At the end of the help page there are examples listed on how to use the functions. Have you tried them?

 

Regards,

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
Message 2 of 5
(4,968 Views)

Thank you very much for suggestions.

I tried the example given in link, and here in attachement I have attached one VI that suppos to work.

This Vi should give corrected image from camera distortion.

If it is possible for you then please have a look and give me some suggestions, that whether I am doing currect or not to avoid camera lens distortion .

 

Thank you very much once again.

Regards, 

Ankit.

0 Kudos
Message 3 of 5
(4,942 Views)
Solution
Accepted by topic author AnkitRamani

Hi Ankit,

 

please have a look at the 'Perspective Calibration.vi' example (also attached as VI snippet):

LabVIEW\examples\Vision\Calibration\Perspective Calibration.vi

 

You need a calibration image so the algorithm can calculate how the image is distorted. Please modify the example mentioned above and please provide images so I can really test you VI. Without an image a VISION VI is hard to test.

 

Regards,

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
0 Kudos
Message 4 of 5
(4,937 Views)

Thank you very much for suggestions.

What I did is captured One image from camera and then using Vision assistant, I change color plan and then use image calibration with Distortion model (Grid). As distance between two points are 13mm, so I provide that value and stored that calibrated image, which I have attached here. now I run my vi and provide calibrated image to calibration image file path and in image path I provide current image captured by camera in VI attached in previous post.

 

I will have a look at 'Perspective Calibration.vi'.

Thank you very much once again for your time and suggestions. 🙂

Download All
0 Kudos
Message 5 of 5
(4,921 Views)