Tracking colored balls from phone camera

1 回表示 (過去 30 日間)
Dominique Gorissen
Dominique Gorissen 2019 年 9 月 24 日
回答済み: Shashank Gupta 2019 年 12 月 10 日
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

回答 (1 件)

Shashank Gupta
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.

カテゴリ

Help Center および File ExchangeImage Processing and Computer Vision についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by