PCB Image Detection in GUI
Show older comments

Hi, I'm trying to create a GUI to detect the defects in PCB. The image shown is the reference image that I would wish to create but I failed to search for any references to create the green boxes as detection and determine the type of defects in GUI. I'm wondering if there are any references I could refer to?
9 Comments
KIVANÇ mutlu
on 30 May 2020
I made comparison of fixed pcb images but XOR comparison does not work on samples from different locations. I need to first identify the PCB location using the fiducial reference. I want to teach fiducial points. Then he will search for these points in certain areas and determine his coordinate. According to the first reference, the periodic, that is, sliding of the pcb is determined.
Image Analyst
on 30 May 2020
KIVANC, how/where did you get his images? I don't see that he posted them.
Anyway, did you try imregister()? And can you post/attach his images?
Lee Hao Nam
on 31 May 2020
Edited: Image Analyst
on 31 May 2020
Image Analyst
on 31 May 2020
I don't know what img3 is, but you need to look at the various features of each blob, like it's area, or perimeter, or circularity, or aspect ratio, or something like that.
Lee Hao Nam
on 1 Jun 2020
Image Analyst
on 1 Jun 2020
OK, so please describe in words, what are the features that describe the various classes, and give the class names, like "nick", "complete break" or whatever.
Lee Hao Nam
on 1 Jun 2020
edgar sanchez
on 3 Jun 2020
do you have the full project? Im doing this for school. Can you send it too me? the code.
gary.rage@gmail.com
Today is the due date :)
Image Analyst
on 4 Jun 2020
edgar, I'm not sure who you're asking. I guess you're asking Lee. I don't have his code (other than the partial chunk above) and I don't know if he finished or not. All he did so far was to subtract the test image from the template/reference image and find differences and put boxes around them. He never said (despite me asking) what constitutes the 5 different types of defects, so the classification into those defects is not shown in the above code. Moreover, the code expects perfect alignment between the two images, which is not likely to happen in a real world situation. I'm dealing with that myself all week with my current project where a robot is supposed to move an object and end up back in the same position every time. It's close, but not perfect. It's not aligned perfectly to the nearest pixel so there are "edge effects" that show up a little thin lines along the edges where they did not subtract perfectly and we need to handle those.
Answers (3)
Image Analyst
on 20 May 2020
Edited: Image Analyst
on 20 May 2020
You can use
hold on;
rectangle('Position', [x, y, width, height], 'EdgeColor', 'g');
to create green rectangles.
See this link for algorithms: http://www.visionbib.com/bibliography/contentschar.html#KK11219
For examples:
Segmentation and Preprocessing of Electrical Schematics Using Picture Graphs,
CVGIP(28), No. 3, December 1984, pp. 271-288.
A Primary Algorithm for the Understanding of Logic Circuit Diagrams,
PR(17), No. 1, 1984, pp. 125-134.
Locating, Replacing, and Deleting Patterns in Graphics Editing of Line Drawings,
CVGIP(29), No. 1, January 1985, pp. 37-46.
An Automatic Circuit Diagram Reader with Loop-Structure-Based Symbol Recognition,
PAMI(10), No. 3, May 1988, pp. 331-341.
A Topology-Based Component Extractor for Understanding Electronic Circuit Diagrams,
CVGIP(44), No. 2, November 1988, pp. 119-138.
Elsevier DOI Application, Circuit Diagrams. Automatic contour following based on the patterns that can appear. BibRef8811
1 Comment
Lee Hao Nam
on 23 May 2020
Giselle Roy
on 10 Jun 2020
0 votes
hmm @Lee did you try using the CNN object detector, try classifying each defect based on it perimeter turn radius or if you have any other approach send it in, i may be able to solve it
Abi
on 8 Feb 2023
0 votes
Code please
2 Comments
Image Analyst
on 8 Feb 2023
Edited: Image Analyst
on 8 Feb 2023
To learn how to write MATLAB code, invest 2 hours of your time here:


I don't know about you, but I learned as a child that saying "gimme" without actually saying what you want isn't really a successful strategy.
If you want to post an answer, post one. If you want to ask a question, ask one. This is neither. Decide what you want to do.
Categories
Find more on Hamamatsu Hardware in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!