Simple OpenCV project - detecting and tracking a tennis ball

后端 未结 1 1361
逝去的感伤
逝去的感伤 2021-01-06 12:17

I have a project where I need to use OpenCV to detect an object (Tennis Ball) on a webcam, and for bonus credit, track it when I roll it across the table.

I haven\'t

相关标签:
1条回答
  • 2021-01-06 12:28

    Did you try to google your question? There are many info about that.

    Simple idea is next: detect your object using color thresholding (it seems that it's yellow or white color) and circle detection. After ball is deteccted you need to just track it using (for example) Lucas-Kanade method.

    Here are some guides/manuals:

    1. Tracking colored objects OpenCV
    2. Motion Analysis and Object Tracking
    3. Learning OpenCV
    4. Look at OpenCV's folder samples. There'are many very useful examples. In your situation the best example is samples/cpp/lkdemo.cpp.
    0 讨论(0)
提交回复
热议问题