05-29-2017 08:54 AM
Hello,
I have one doubt regarding to image correction after image calibration. I am doing object detection from camera using NI vision.
I did image calibration, now my question is do I need to do image correction as well or only calibrated image provide me same coordinates as after corrected image??
Thank you very much in advance.
Regards,
Ankit.
Solved! Go to Solution.
05-30-2017 03:44 AM
May be here is solution: http://zone.ni.com/reference/en-XX/help/370281AA-01/nivisionlvbasics/perform_image_correction/
05-30-2017 04:08 AM
Calibration has two components mainly
-For example, if you are using Telecentric lense and camera perpendicular to Test Object you can use simple calibration without any correction.
-If Test Object is not Perpendicular to Object then you have to include Perspective Correction.
-If your Lens have distortions then use the Correction.
-Look into below link for What type of Calibration you need to use: http://zone.ni.com/reference/en-XX/help/370281AD-01/nivisionconcepts/spatial_calibration_whento/
-Here's some more detail into Spatial Calibration: http://zone.ni.com/reference/en-XX/help/370281AD-01/nivisionconcepts/spatial_calibration_concepts/
05-30-2017 06:17 AM
Hey,
no you actually do not have to do the correction to get real world coordinates. They are interpolated anyways. You can imagine the calibration as a look up table, telling where the current pixel should be if the image was corrected.
The correction is actually use the table to put the pixel in the spot it belongs to and interpolate pixel values in between.
However it can be helpful if you e.g. do some pattern matching algotihm and look for a part in the center and and the same part in the distorted corner of the image.
Its like always in VISION accuracy vs. processing time.
Kind regards,
Heinz
05-30-2017 07:33 AM
Thank you very much for reply.
I am somehow confuse to understand why Coordinates are different if I remove the image correction vi.
for example I tried to detect one object with corrected image and then I tried same object with out corrected image and I got big difference in coordinates.
Like with corrected image vi (X,Y) = (38, 38) without (37,44).
without corrected image has same coordinate like image without calibration.
Here in attachment 1, I am correcting the image and in picture 2 I have used pattern matching vi to detect the object.
is there any mistake I am doing there or??
Thank you once again for your time and suggestions.
05-30-2017 08:08 AM
hey,
what about the real world coordinates? are they not the same?
regards
05-31-2017 02:26 AM - edited 05-31-2017 02:27 AM
Hi,
No they are also different, because I am converting manually pixel to real world.
For example in 1 cm there are 30 pixels so using this parameters, I am getting real world coordinates.
Is this answer of your question?
Thank you very much for your reply.
Greetings,
Ankit.
05-31-2017 02:51 AM
hey,
so why do you do it manually? if you want to do so, then you should correct the image!
BUT much better and faster is to do it with the calibration. You actually should know what your grid parameters are! E.g. 5 mm grid spacing. Then just set a coordinate systen and tada...
Have also a look at the examples of VBAI. it is easier to understand the procedure there...
05-31-2017 03:16 AM
Thank you very much for your quick reply.
I will go for that approach and change my vi accordingly.
Will update as soon as I finished it.
Thanks.