Better algorithm for edge filter in video programming

后端 未结 1 501
清酒与你
清酒与你 2020-12-20 00:31

I\'m still working on the last program and although I finally found out how to solve the problem (on how to filter the biggest contour), I now have a new question, or rather

相关标签:
1条回答
  • 2020-12-20 01:10

    Your problem isn't the edge detection algorithm. Your problem is that you are hard-coding the algorithm parameters and expecting it to magically work for all images you throw at it. Also, smoothing the image before using cvCanny is unnecessary, as the Canny operator already performs smoothing for you.

    Since it's a bit more clear what you want to achieve now, I can give a suggestion: work with the video instead of looking at each frame individually. If the camera is fixed, and the hand with the object is moving, then detecting the shape is trivial through background subtraction. If the camera is not fixed, you can still detect the hand (PDF link) and work from there. Also, use any other application-specific knowledge you may possess (e.g. item will be in the middle of the screen, hand will be below the item).

    0 讨论(0)
提交回复
热议问题