identifying multiple leds
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.
can it be your question is : how to order a list in python ?
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.
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 ?
again, it's unclear, what you want to achieve here, what's the final goal behind it all ?
Well, it's quality control for manually assembled PCBs, or even for machine assembled PCBs.Something like http://www.platiscan.de/txt/platiscan.... 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