Tracking colored balls from phone camera
3 次查看(过去 30 天)
显示 更早的评论
Hello,
I want to track multiple colored balls with my phone camera (each ball has a different color).
I have edited this script : openExample('vision/MotionBasedMultiObjectTrackingExample')
in such a way that it works live with my phone instead of using pre recored videos and this works quite well. However I have a few problems with which I would like to get some help.
- When two balls are close together they are seen as one object
- I would like to distinguish different colored balls
- I already tried several of the standard online scripts. However these fail to cope with changing light in the background. and this is something this script does very well
0 个评论
回答(1 个)
Shashank Gupta
2019-12-10
Hi Dominique,
The first problem which you mentioned about the script which is combining two different color and seeing them as one object arising because the script when create an object during the foreground segmentation convert the image to Binary image and use that masked image to create a bounding box or extract an object from the image, thus it lost the color property of image.
Instead you can first threshold out different color ranges from the image after the foreground segmentation and use them to extract or distinguish different colored balls. In case if you are not familiar with how to approach this, May be this LINK will give you a good head start.
I hope this helps.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing and Computer Vision 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!