Recognizing objects from templates

I was hoping someone could point me in the right direction. With the image of a dying man (above), I want to know which side is up.

I understand the basics in the game here, but I have problems with the power of OpenCV. I think I need a picture on each side of the cube. Then I can somehow compare them all with the current image, which will be classified. How can I use OpenCV for this?

Thanks Jonathan

+3
image-processing opencv
Apr 24 '10 at 17:54
source share
1 answer

Although this will work, and OpenCV has pattern matching features, it is likely to be more complicated than necessary. Good results will require that the lighting be more or less unchanged between all images and that the camera is stationary and no projective distortion occurs.

Instead, I would do something like this:

  • Find the stamp in the image. The difficulty here will vary depending on how the matrix and background look. If you have a white crystal against a black (or other color) lpain, then finding a stamp will be easy.

  • When the cube is located, find the eyes. This can be done simply by finding all the black drops.

  • If necessary, make sure that the eyes found form a coherent pattern. For example. if the side is up four, you expect to find the eyes as corners in a square, and not in a straight line.

  • Count the actual eyes. There is your side.

This outline is rather vague, as there are many ways to complete each step. However, I believe that everything you need is available in OpenCV. Good luck

+5
Apr 24 2018-10-18T00:
source share



All Articles