How to find the valley areas of the image?
조회 수: 3 (최근 30일)
이전 댓글 표시
How to calculate the depth of the letters in the given image, so that i can find the valley areas ? Please help me.![1.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/261275/1.jpeg)
![1.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/261275/1.jpeg)
댓글 수: 0
채택된 답변
Image Analyst
2020년 1월 14일
In your duplicate post I referred you to Vision Bob where there are dozens of papers on this
You could also try Google:
댓글 수: 0
추가 답변 (1개)
KALYAN ACHARJYA
2020년 1월 12일
편집: KALYAN ACHARJYA
2020년 1월 12일
The segmention approach for this image is already answerd, for localizing valley region please see the watershed algorithm. It would be great if you follow the Gonzalez Book (Digital Image Processing using MATLAB), where detail explanation is discussed with matlab code. Please note that here you can get the area of valley or basin, not the depth.
rgb=imread('rgb.jpg');
BW1=im2bw(rgb2gray(rgb));
BW2=bwareaopen(~BW1,60);
%% This Part @Image Analyst
windowSize=5;
kernel=ones(windowSize)/windowSize^2;
blurryImage=conv2(single(BW2),kernel,'same');
BW3=blurryImage>0.5;
%% Morpho Operation
se=strel('disk',2);
BW3=imclose(BW3,se);
rgb(~BW3)=0; % Mask Apply
imshow(rgb);
댓글 수: 13
KALYAN ACHARJYA
2020년 1월 20일
편집: KALYAN ACHARJYA
2020년 1월 20일
May be it can slightly improved by preprocessing & appropriate morpho operation.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/262577/image.png)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!