Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
int red = 17; // initial value
int grn = 1;  // initial value
int blu = 27; // initial value
namedWindow("thewindow");
createTrackbar("red", "thewindow", &red, 255);
createTrackbar("grn", "thewindow", &grn, 255);
createTrackbar("blu", "thewindow", &blu, 255);
// ...
// later,
// ...
Mat img, bin;
Scalar lower(red,grn,blu);
Scalar upper(200,100,50);
inRange(img,lower,upper,bin);