Image-based glue track quality detection

31 views (last 30 days)
NE
NE on 17 Oct 2023
Edited: NE on 30 Oct 2023
Overview
I have a computer vision problem. It is related to Automated Optical Inspection (AOI), which I have never done before, and both Google and chatGPT aren't too helpful.
I glued a square piece of glass (with rounded corners) in a transparent plastic frame. The glue is a white silicone bought at the hardware store. Please see the image attached below for reference.
I would like to design a piece of Matlab code (or use a FEX/toolbox) to analyse some basic aspects of the gluing (details below)
What I would like to do
I would like to do a very, very simplified (but with the possibility to fine-tune the various detection parameters) version of what is proposed by any of the following software
  • https://vistron.com/en/glue-application-verification
  • https://lmi3d.com/blog/adhesive-inspection-using-3d-smart-sensors/
  • https://www.whleary.com/products/quality-assurance/glue-detection/learyview-glue/
It would be great to calculate the first 3 parameters of the glue track listed on this company website:
  1. continuity
  2. width
  3. position (just 2D)
Finally, if possible, I would love to be able to visualise the green line as shown in this image:
What I have so far
I already have a bit of code to:
  • open the image file
  • apply a color filter to get a binary image
  • clean the detected areas
  • get the area of the glue
I also have the glue's ideal "centerline" coordinates as a 2D vector, if that helps.
Where I would like some help
I would like to get some help on:
  1. detecting the 4 corners (1/4 of a circle) of the glue path so I can use it as a reference to compare ideal vs actual glue track
  2. the necessity of reprojecting the image (do I have to do it?)
  3. detecting
  • the center of the glue track (green line as shown in this image)
  • The width of the glue track (perpendicular distance on each side of the glue track)
  • The continuity of the glue track
Any help or lead to additional resources would be greatly appreciated.
Sorry for the long post.
PS: I would prefer not involve some machine learning as I am not proficient in that field and don't have the required toolbox(es)

Accepted Answer

Image Analyst
Image Analyst on 19 Oct 2023
See attached demo. Adapt as needed.
  3 Comments
Image Analyst
Image Analyst on 26 Oct 2023
If this Answer solves your original question, then could you please click the "Accept this answer" link to award the answerer with "reputation points" for their efforts in helping you? They'd appreciate it. Thanks in advance. 🙂 Note: you can only accept one answer (so pick the best one) but you can click the "Vote" icon for as many Answers as you want. Voting for an answer will also award reputation points.
NE
NE on 26 Oct 2023
Edited: NE on 30 Oct 2023
Thanks Image Analyst. I just wanted to test the different functions of the 2 provided answers. Your answer is the most detailed and has a MWE so your answer definitively gets the "Accpeted Answer". Getting the skeleton and using the mean width is what I was looking for, on top of personalised masks. I'll polish the code and add it in the comments as well as my results. Thanks for your answer!

Sign in to comment.

More Answers (1)

Constantino Carlos Reyes-Aldasoro
You can start by labelling each region of your data with bwlabel (https://uk.mathworks.com/help/images/ref/bwlabel.html) and then apply regionprops (https://uk.mathworks.com/help/images/ref/regionprops.html). That will help you identify the regions that are interest for you (for instance by area) and get rid of those that do not (noise). Once you have done this and selected the ones that are interesting, then you can proceed to do other things. To get the green line, you can use bwmorph (https://uk.mathworks.com/help/images/ref/bwmorph.html) with thin and then reduce to a central line.
All these ideas are based on image processing, no machine learning involved.
Hope this helps.
  1 Comment
NE
NE on 24 Oct 2023
Thank you for all the links Constantino, I will try that today and see what I can do. Your anwer is really appreciated!

Sign in to comment.

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!