Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Overlay a set of CAD generated roi to a real board image

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?

Download All
0 Kudos
Message 1 of 4
(4,476 Views)

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

0 Kudos
Message 2 of 4
(4,466 Views)

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


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 3 of 4
(4,458 Views)

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.

0 Kudos
Message 4 of 4
(4,457 Views)