I teach OpenCV, and I want to write a small test app. And have a question.
What algorithm would you advise to fill the contour (close to a rectangle) with image?
Thanks a lot!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming you know the location of the rectangle you would like to fill, you could simply set a ROI (region of interest) and perform some processing on that region (maybe a grayscale conversion), or even copy another image to that location. I’ve already demonstrated how to set a ROI and perform some processing on that area.
If you want to add 2 images I suggest you check the official tutorial, this post, and this demo: the magic happens through
cvSetImageROI()andcvAddWeighted().