Relative Content

Tag Archive for pythonopencvmachine-learningcomputer-vision

Overlaying an image on an overlaying image

Let’s say I have the frame coming from the camera. There is an image, that I would like to put on this frame so its perspective changes according to how the frame changes. I was able to achieve that using the object tracking with homography but here is the deal – overlaid image obstructs all the objects present on the frame. So for example if there is a person on that frame in the spot where this image should be located the person would not be visible. Is there any algorithm or a ML model that can help displaying the obstacles in the area where image will be? I tried using CV2 tools like findContours with dilation and stuff like this, but unfortunately it did not lead to a desired result.

How do I compare a template sketch to an image of a manufactured part?

I have a template image that is used as the baseline to determine where parts are soldered onto a circuit board. I cannot guarantee the images to be the same size or scale. The baseline image is provided to me by an outside source and I solder the parts myself. An image of the soldered board is taken by me. I want to quickly check for mistakes – parts that were supposed to be placed but weren’t, parts that were supposed to be skipped but weren’t, etc.
I would prefer to have a bounding box over the erroneous parts. I have attached two images that portray the images in question (I cannot provide the real images per my jobs’ policy).PCB
Template
Boxes in red indicate a part I am not supposed to place, and green indicates a part I should be placing.
I was following the information here. I attempted to use the Structural Similarity Index. This did not pan out well due to the images being very different from one another.
I do not think a dense vector representation, but this spits out a similarity score rather than exposing any mistakes that were made.
Ideally, I can produce the output from the SSI method to show what issues were missed.