this is the input image i want to detect scratches in this image but i don't know how to proceed please guide me. i want output image like this

댓글 수: 2

Walter Roberson
Walter Roberson 2015년 11월 20일
You appear to have marked blobs, not scratches. Scratches are long thin marks such as appear near the bottom left of the bright area.
mehroz irshad
mehroz irshad 2015년 11월 20일
so how can i detect those blobs.

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2015년 11월 20일

0 개 추천

Try a tophat or bottomhat filter, imtophat() or imbothat().

댓글 수: 3

mehroz irshad
mehroz irshad 2015년 11월 20일
편집: Walter Roberson 2015년 11월 20일
original = imread('fivTest.png');
figure, imshow(original);
se = strel('disk',12);
tophatFiltered = imtophat(original,se);
figure, imshow(tophatFiltered);
contrastAdjusted = imadjust(tophatFiltered);
figure, imshow(contrastAdjusted);
i have tried this code tophat filter but displays following error.
Error using images.internal.imageDisplayValidateParams>validateCData (line 119)
If input is logical (binary), it must be two-dimensional.
Error in images.internal.imageDisplayValidateParams (line 27)
common_args.CData = validateCData(common_args.CData,image_type);
Error in images.internal.imageDisplayParseInputs (line 78)
common_args = images.internal.imageDisplayValidateParams(common_args);
Error in imshow (line 222)
images.internal.imageDisplayParseInputs({'Parent','Border','Reduce'},preparsed_varargin{:});
Error using imadjust>parseInputs (line 207)
Specified syntax IMADJUST(I) is only supported for 2-D grayscale images. Additional input arguments are required for use
with RGB images.
Error in imadjust (line 97)
parseInputs(varargin{:});
original = rgb2gray( imread('fivTest.png') );
Image Analyst
Image Analyst 2015년 11월 20일
You should also get a better photo. Your setup is horrible. Have you considered using more uniform illumination, board illumination (no line or point sources of light), crossed polarizers (to knock out that specular reflections right where you want to analyze), etc. It's always better to start with a good image than to try to fix us a crappy image afterwards in software.

댓글을 달려면 로그인하십시오.

질문:

2015년 11월 19일

댓글:

2015년 11월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by