File Exchange

image thumbnail

Tracking Yellow Color

version 1.0 (1.48 KB) by

This code tracks yellow color.



View License

When we are using RGB color space,we can differentiate between the red,blue and green color. But when comes to detecting yellow color, this code will detect yellow color in RGB color space.
I hopw this would help.

Comments and Ratings (6)

Charles lim

HI may i know how do you get the yellow subtraction form thnks.


anju (view profile)

Thnx Avaneet , i shall drop u an email with more info ..........

Hey anju contact me on will try as i can...actually i was currently working on HUE....


anju (view profile)

Hi Avaneet,

Would you be able to help on me on the matlab coding for the object tracking of the using Hue value ? As i am new to matlab i couldnt find much details on it .

My object is to perform color calibration in order to define the upper and lower limit of the HUE value for to detect the color at any light intensity .

Avaneet Ranjan

Usha this code doesnt get u the yellow color.
I used basic color theory...
first we r working on RGB color space.
second i took the complement of the current image.. this brings u to the CMY color space.
the third plane of this color space gives u yellow color.
Now y i did the subtraction is cos if u see i subtracted current frame by its gray color then that maximizes the color in that plane..

what does this statement do
imsubtract(data(:,:,3), rgb2gray(data)) ?

how did u get the yellow color by subtraction

MATLAB Release
MATLAB 7.11 (R2010b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video