identifying multiple leds

asked 2019-08-18 02:15:54 -0500

updated 2019-08-18 16:59:24 -0500

Hello I want to write a program to check the presence of multiple objects, for example leds, of different classes (like led colors) in an rigid environment, for example on an PCB, when the camera position is not fixed. Let's say for example, that we have 30 red leds, 20 green leds and 10 blue leds which have to be checked. I can find the leds with simpleBlobDetector, and also determine their class (red, green or blue). As a result I have an unordered list of about 60 leds, with coordinates and class. But how can I match this against the ordered list of 60 reference leds? I hope for something like findHomography, which returns a geometric transformation matrix and a list of matches. But as far as I know, findHomography takes two ordered lists of coordinates, assuming that each keypoint is unique. But this is not always true the case for technical images that may contain many instances of the same object.

edit retag flag offensive close merge delete


can it be your question is : how to order a list in python ?

berak gravatar imageberak ( 2019-08-18 07:59:30 -0500 )edit

Well, this is of course a question of interpretation. There is no simple key in the data that can be used to "sort" the list, but yeah, if the list could be "sorted", findhomograpy would solve the problem.

pepenova gravatar imagepepenova ( 2019-08-18 16:52:37 -0500 )edit

findhomograpy would solve the problem.

which problem, exactly ?

findHomography takes an original, and a warped pointset, and calculates a transformation matrix between the 2. is that what yoou wanted / needed, -- a single, global transormation between your "ideal" and "found" pcb ?

berak gravatar imageberak ( 2019-08-19 03:07:15 -0500 )edit

again, it's unclear, what you want to achieve here, what's the final goal behind it all ?

berak gravatar imageberak ( 2019-08-19 03:08:12 -0500 )edit

Well, it's quality control for manually assembled PCBs, or even for machine assembled PCBs.Something like And my basic problem is that the LEDs are closer to each other than the board alignment precision I get by using some reference points on the PCB, either SMD fiducials or the corners of the board, especially as the components are not necessarily mounted straight. Because of this, by just searching each component, or LED, in an area close to the expected position, often yelds the same component or LED for different expected components. So I'm looking for a good way to find a method to match the global list of found components (belonging each to a small group of classes) to the list of expected components with the goal to find defecs

pepenova gravatar imagepepenova ( 2019-08-20 13:48:21 -0500 )edit