Removing all part of the binary image except the area with convexity defect

61 views Asked by At

I am using OPENCV 3.2 and I am working on a binary image.This is an image I am working on.

enter image description here

I am trying to remove everything except the hand area ( with convexity defects). I tried blob detection to detect the blobs (other than the hand) but it's not showing anything. Any suggestions on how I should proceed? The sample code for blob detection is:

Mat im; //has the above shown binary image
Ptr<SimpleBlobDetector> detector = SimpleBlobDetector::create();
vector<KeyPoint> keypoints;
detector->detect(skin_binary1, keypoints);
Mat im_with_keypoints;
drawKeypoints(im, keypoints, im_with_keypoints, Scalar(0, 0, 255), DrawMatchesFlags::DRAW_RICH_KEYPOINTS);

// Show blobs
imshow("keypoints", im_with_keypoints);`
0

There are 0 answers