Ask Your Question

Revision history [back]

This is a simple case of blob analysis. Use the middle image and determine the blobs. Keep the blob with the largest area. It may be helpful if you download cvBlobsLib and look at the tutorial. It will take you about five lines of code to do what you want. Also, to get the original image, you can use the AND operator instead of multiplication.