Can any one correct this code to remove hair pixels??

5 ビュー (過去 30 日間)
Pamela
Pamela 2012 年 9 月 8 日
コメント済み: hamed abdulaziz 2013 年 9 月 29 日
Hi!! Can any on help to remove pixels hair from a dermoscopic image with DullRazor method. DullRazor performs the following steps: -It identifies the dark hair locations by a generalized grayscale morphological closing operation, -It verifies the shape of the hair pixels as thin and long structure, and replace the verified pixels by a bilinear interpolation, and -It smooths the replaced hair pixels with an adaptive median filter. I tried this but it's not correct:
image = im2double(imread('image1.bmp'));
figure, imshow(image);
grayscale = rgb2gray(image);
%get hairs using bottomhat filter
se = strel('disk',5);
hairs = imbothat(grayscale,se);
figure, imshow(hairs);

回答 (1 件)

Image Analyst
Image Analyst 2012 年 9 月 8 日
You need to find the hairs first. Binarize (threshold) and then use regionprops to identify long thin objects. Then use roifill() to replace those objects with the surrounding neighborhood background. I'm not sure what the median filter would gain you - I don't think it's necessary.
  15 件のコメント
hamed abdulaziz
hamed abdulaziz 2013 年 9 月 26 日
I attached sample image contains hair (hair.bmp)
hamed abdulaziz
hamed abdulaziz 2013 年 9 月 29 日
Image Analyst,could you correct my code please,thank you in advance.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImages についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by