I've done quite a bit of digging and haven't found any questions that seem to match my exact issue. I'm also a CV noob so I've come up empty trying to work out a solution from what I've found so far.
I have a set of contours that I'm able to display (filled in) on an image via:
Mat img = CvInvoke.Imread(HttpContext.Current.Server.MapPath("IMAGELOCATION"));
VectorOfMat contours = new VectorOfMat();
..
//Various Morphological Transformations
..
CvInvoke.FindContours(maskDilate, contours, null, Emgu.CV.CvEnum.RetrType.External, Emgu.CV.CvEnum.ChainApproxMethod.ChainApproxNone);
CvInvoke.DrawContours(img, contours,-6, new MCvScalar(255), -1);
These contours are non-rectangular and the data within them is of interest. Originally I planned on cropping out all of the contours but it seems like the better solution is just to blank out the rest of the original image except for the ROI outlined by my contours, without affecting the inner part of the contours.
This seems like a job for a mask of the contours overlaid on the original image, with something like the matrix containing the original image blanked to zeros except for each ROI outlined by the contours.
The closest I've come to what I need is from this thread copying non-rectangular roi opencv however I'm working in C# and don't have the coordinates outlining my ROIs because they're often oddly shaped and can vary in location on the image. Some direction or help would be much appreciated!