11-20-2014 05:08 AM
Good day. Another day and another problem for the poor developer.
I'm trying to develop an application to detect short in circuit board. Since the "critic area", involving the possibility oh short, are a lot why successfully extracted them, automatically, from CAD data of the board. So, now i have programmatically generated ROIs that match the "critic area". My problem is: how to overlay precisely the ROIs from an image taken from the camera?
Till now i worked that way:
1) Retrieve image from camera.
2) Identify a first fiducial and set a coarse reference system.
3) Identify two small circular pad, thresholding them and find the center with circle detection.
4) By this two point compute the X,Y, Offset, the rotation angle (the image must be compensated for rotation) and scaling factor by the euclidean distance.
5) Using this information to preprocess the image.
6) Overlay ROIs on the image scaling and offsetting them by the previous value.
Problem is i lack precision. See the attached images. I think that by offsetting, rotating and scaling i introduce too much error. By the way, scaling by a real factor a ROI means obtain real coordinates that must be round to nearest integer (pixels are integers) and this mean.... error.
So, i can figure out how to solve it. My principal ask me to work on image of the whole board and i can't zoom on it so i have real little tolerance on the ROIs. Someone have some enlightening hints?
11-20-2014 08:03 AM - edited 11-20-2014 08:28 AM
After made some simple calibration i achieved better result (see attached image). I think that this is the way i must follow. Talking about this can you give me some advice on how to obtain a corrected calibration?
Francesco
11-20-2014 09:45 AM
Hello,
what do you mean by simple calibration? Are you talking about direct mapping from pixel to real-world units without any additional correction?
For best accuracy, perform lense distortion calibration and perspective calibration (since your object is planar). Than you should be able to compute the distances accuratelly.
Best regards,
K
11-20-2014 10:17 AM
I'm sorry, you are right. I mean Distortion Model grid with the help of Vision Assistant. Is the first time i use this function. Right now using a printed grid of black dots.