How to determine the most accurate value of thresh holding 'level' used to segment very fine cracks in Matlab using the im2bw(I2,level) function ?

조회 수: 1 (최근 30일)
I am currently using 'im2bw(I2,level)' function in Matlab(see attached code below)for 3 different images. At the moment inbuilt Matlab Otsu's method 'graythresh(I)' gives poor result while setting level in im2bw(I2,level) by trial and error is too hectic.
How can I obtain the most correct value for 'level' to segment most/if not all of the very thin/fine cracks for each image (see attached images)? Can anyone help with how I can go about doing this for each image? 
..............................................
I=imread('L1.jpg');
figure,imshow(I)
I2=imcrop;%Crop image to contain only steel surface containing cracks
figure,imshow(I2)
title('Original grey Image')
%%Binarize
level = 0.7303; % thresh holding level by trial and error too hectic!!!
%level = graythresh(I);% Matlab in-built global thresh holding based on Otsu's method returns NOT SO GOOD
%VALUES FOR 'level' are obtained from this!!!  
binaryImage = im2bw(I2,level);
figure,imshow(binaryImage)
title('Binarized image')
..........................................................
Images:-
Kind regards. BB
  댓글 수: 1
BB BSB
BB BSB 2015년 8월 6일
편집: BB BSB 2015년 8월 6일
Please, I need help from image specialist to improve the binary segmentation. Any contribution will be much appreciated!

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

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by