Ask Your Question

bidoki's profile - activity

2017-05-23 04:42:02 -0600 received badge  Editor (source)
2017-04-26 05:12:55 -0600 commented answer Fish detection. Is haartraining a good approach ?

ok very good

2017-04-26 04:58:44 -0600 asked a question detect nail from image

i want detect nail size from image how remove noise and detect nail

image description

Use the code below:

    Mat binary;
Mat image = imread("img/nail3.jpg");
if (!image.data)
    return;
cvtColor(image, binary, CV_BGR2GRAY);
    Mat result;
threshold(binary, result, 180, 255, THRESH_BINARY_INV);
Mat element = getStructuringElement(MORPH_RECT, cv::Size(5, 10));
morphologyEx(result, result, CV_MOP_OPEN, element);
namedWindow("result");
imshow("result", result);

result is:

image description

thanks