I am new to openCV(with Python) and image processing and tried to start a project of my own to learn how things work. I'm trying to select the teeth from an image of an open mouth. The best solution that I could think of is to match it with a template of a tooth and try to matchshapes based on the contours that I get from the mouth image. This might not be the best solution, but it does seem rather easy.
So far, my code looks like this:
img is the image of the mouth and compare is a tooth from the same image that I selected with photoshop, so I do expect to match at least that one. My current problem is that the only contour that matches seems to be the frame of the image.
Can someone please point out what am I doing wrong or suggest me a better approach of the project? Does the image size have something to do with the image size and if so, what is the best way to resize images?
Thank you for your time!