필터 지우기
필터 지우기

what are your opinions to modify this code for improvement the result?

조회 수: 1 (최근 30일)
mmm ssss
mmm ssss 2012년 1월 18일
i want to implement contrast enhancement, thresholding, morphological opening, Edge detection, morphological erosion and skeketonization
i wrote the below code , but the result was not enoughly suitable for me.
so what are your proposals to obtain best result ?. also if i want to do local thresholding how can i do it ? what will change in thresholding step?.
m=imread();
%%%%%1-Contrast enhancement%%%
x=adapthisteq(m);
%%%%%%2-global thresholding%%%%%%
level=graythresh(x);
m1=im2bw(x,level);
%%%%3-Morphological opening%%%%%%%
BW2 = bwmorph(m1,'open');
%%%%%%%%%%4-Sobel Edge detector%%%%%%
w=fspecial('sobel');
edge=imfilter(BW2,w,'replicate');
%%%5-morphological erosion%%%%%%%%
BW3 = bwmorph(edge,'erode');
%%%6-morphological skeketonization%%%%%%
W3 = bwmorph(BW3,'skel') ;
% displaying images%%%
figure,imshow(m);
figure,imshow(x);
figure,imshow(m1);
figure,imshow(BW2);
figure,imshow(edge);
figure,imshow(BW3);
figure,imshow(W3);
thank you
  댓글 수: 2
Walter Roberson
Walter Roberson 2012년 1월 19일
We do not know what _would_ be "suitable enough for you".
Past discussions about this project tend to suggest to us that you are hoping to extract more information than is present in the image.
mmm ssss
mmm ssss 2012년 1월 20일
yes, this is right Mr.Walter.
do you have any modications to the above code?

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

답변 (1개)

Sean de Wolski
Sean de Wolski 2012년 1월 20일
I would rename your variable edge to a name that doesn't overwrite the IPT stock function edge().

카테고리

Help CenterFile Exchange에서 Image Filtering and Enhancement에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by