answered Nov 12 '12
You have to use cvFindContour and set mode = CV_RETR_EXTERNAL. In this mode you have the external shape and fills all holes by cvDrawContour by level=1