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