So I am trying to create a program where the user can select a ROI from streaming video and then contours will only be taken from that ROI. The way I am only displaying contours within the ROI is to simply not display contours whose coordinates are not within the ROI. All that is working, however, I want to be able to track those contours found without using color. That means I can't use the camshift or meanshift algorithm on the "main" frame directly. I can't think of a way to track these contours that will "move" the ROI with them so they are still displayed. I thought of copying my "main" frame and making it all black and then displaying the contours on the black frame and then using camshift. However, once the contours are moved out of the ROI they will not be displayed so the camshift will get nothing.
I think the real dilemma here is how to "lock onto" the contours in the ROI once the user is happy with them and then removing the ROI boundaries.
If you any ideas please throw them out there cause I am out of them.