how do i do a multi color tracking?
I am trying to do a if else statement to color detection, if the cvInRanges detect red, then it will show video with red threshold, here is my code :
cvCvtColor(frame, hsv_frame, CV_BGR2HSV);
cvInRangeS(hsv_frame,hsv_min,hsv_max, thresholded);
if(hsv_min = CvScalar(150 , 84, 130, 0),hsv_max = cvScalar(358, 256, 255, 0));
{
cvSmooth( thresholded, thresholded, CV_GAUSSIAN, 9, 9 );
cvShowImage( "After Color Filtering", thresholded );
}
the problem occur : in if statement, hsv_min show me a (expression must have bool type) error, how could i overcome it ?
What you want to do with this line "if(hsv_min = CvScalar(150 , 84, 130, 0),hsv_max = cvScalar(358, 256, 255, 0));"