Real-Time Detection & Tracking of Red, Green & Blue Objects in MATLAB 🎥

Learn how to detect and track red, green, and blue objects live in video streams using MATLAB. Step-by-step guide to color-based object detection and tracking!

Radan Khan•2 views•1:00

About this video

Hi, Everyone, In this video, I want to show you how you can detect and track red,Green,Blue, objects in live video. To detect the red color in every single frame we need to know different approaches.

The popular approach is to convert the whole RGB frame into correcponding HSV (Hue-Saturation-Value) plane and extract the pixel values for RED , Green and Blue. So choose a range in which different shades of these color's exists. in this way you can detect almost all distinguishable colors in a frame.

But this approach is a bit difficult in real life problem especially in Live video due to ambient light. One more simple solution exists there if you decide to detect only red or green or blue color. So this approach is not versatile for all colors, but its simpler than anything and you can easily eleminate the ambient light problem using it. So I am gonna use this approach to detect these color.


Step 1: First acquire an RGB Frame from the Video.
Step 2: Extract the Red Layer Matrix from the RGB frame
Step 3: Get the grey image of the RGB frame.
Step 4: Subtract the grayFrame from the redFrame , blueframe , Greenframe.
Step 5: Filter out unwanted noises using Median Filter.
Step 6: Now convert the diffFrame into corresponding Binary Image using proper threshold value. Change its value for different light conditions.
Step 7: Now you are all done. Your Red,Green,Blue color has been detected. Now you can put any blob statistics analysis on this image. You can calculate the centroid, area or bounding box of those blobs.

Video Information

Views
2

Total views since publication

Duration
1:00

Video length

Published
Aug 5, 2015

Release date

Related Trending Topics

LIVE TRENDS

This video may be related to current global trending topics. Click any trend to explore more videos about what's hot right now!

THIS VIDEO IS TRENDING!

This video is currently trending in Canada under the topic 'javonte green'.

Share This Video

SOCIAL SHARE

Share this video with your friends and followers across all major social platforms including X (Twitter), Facebook, Youtube, Pinterest, VKontakte, and Odnoklassniki. Help spread the word about great content!