Ask Your Question
0

Applying contours on an image

asked 2018-01-09 14:34:39 -0600

Pawel021991 gravatar image

Hello everyone,

I work as an electronic, and in my job I have to check if PCBs have all resistors and other electronic elements soldered. Usually I've done this by scanning PCB and applying on a photo contours from a technical drawing in GIMP, by deleting background, resizing, rotating and zooming.

PCBs have different shapes, that are not rectangular.

This is very time consuming, so I would like to write an application in OpenCV that it would do this for me. I have litte experience with writing code in OpenCV, therefore I have following question:

Does the described issue can be done in OpenCv fairly quick and easy for someone who is not deep in it? Do you predict any difficulties with it? Could you please provide me some hints or steps?

Thank you in advance!

edit retag flag offensive close merge delete

Comments

I accidentelly misclicked into deleting a comment from this thread, sorry to the autor, please repost the comment.

Pedro Batista gravatar imagePedro Batista ( 2018-01-10 04:52:53 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
3

answered 2018-01-10 05:11:06 -0600

updated 2018-01-10 05:17:50 -0600

An example image would help to give a more definitive answer, but yes, you can probably automate this process using OpenCV, but you do require some knowledge about it, and there is definitely a learning curve. However, if you use OpenCV for Python (instead of C++) this learning curve is a lot softer, and you'll be able test some algorithms really quickly. It will also depend on how used are you to programming languages in general.

About the problem itself, there are some factors that influence the possibility of automation or not:

  • Are the images from PCB's taken in a standard way? Meaning, are all the images taken from the same angle and distance from the PCB's? Or is this random? If the images have a lot of variability in between each other, then the automation process for this can be harder, or even impossible. (I guess they do, if you are scanning them).

  • Are the lighting and other environmental conditions in which the images are taken stable? Or they can vary? If they are stable, then your job is easier.

  • Do the resistor have some visual property that differentiate them from the rest of the components? If they do, then, in theory, there is some algorithm that can detect them apart from the other components.

There are some computer-vision applications more suited for this kind of industrial problems, and built to be used by non-specialists. I can recomend you to check out Sherlock Vision, its a software built to work on industrial quality inspection problems, it may be quicker to implement a solution (even though this kind of applications are probably built on top of OpenCV).

edit flag offensive delete link more

Comments

1

Just to add to the list of commercial machine learning frameworks that would support this

  • Cognex Vision
  • Halcon

But there is a range of others out there. Fact stays that this is a task that is easy when you can constrain the environment, but it will be quite hard if you want it to work in the wild.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-01-10 06:06:30 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-01-09 14:34:39 -0600

Seen: 381 times

Last updated: Jan 10 '18