how to get a mask of an image so that i can use it in the inpainting function
i want my mask to be black obviously and the red line which is my region of interest to be white so that i can use it inside the inpainting function...! am having this code but it not working
cv::inRange(img, cv::Scalar(0, 100, 220), cv::Scalar(10, 255, 255), lower);
cv::inRange(img, cv::Scalar(0, 10, 100), cv::Scalar(255, 255, 255), upper);
threshold(mask, mask,10,255, CV_THRESH_BINARY); inpaint(img, mask, inpainted,3,CV_INPAINT_TELEA);
can someone help me..
)
i edited your post, assuming, it's the same image as in your last question
but in the long run, please spare us duplicates of the same topic, thank you !
yes pls, this is the input image
sorry, but none of the code above makes sense. neither lower or upper are ever used, you probably don't need a threshold on something binary either, and your mask is still empty.