I am writing a code to extract yellow color alone from a video feed. After Converting it to HSV i feed that frame in inRangeS Function. I also have a Upperlimit, lower limit and output frame.
This is my code:-
cam>>frame; imshow("Main",frame); cvtColor(frame,frame,COLOR_BGR2HSV); imshow("HSV",frame); cvInRange(frame,cvScalar(20,100,100),cvScalar(30,255,255),redspace); imshow("Red",redspace); it gives the following error:-
error: cannot convert ‘cv::Mat’ to ‘const CvArr* {aka const void*}’ for argument ‘1’ to ‘void cvInRange(const CvArr*, const CvArr*, const CvArr*, CvArr*)’ cvInRange(frame,cvScalar(20,100,100),cvScalar(30,255,255),redspace);