How can i find the length of the horizontal and vertical line present only in the white pixel region for the attached binary image.

1 次查看(过去 30 天)
isntvhN-2-R.jpg

采纳的回答

KSSV
KSSV 2018-12-11
I = imread('download.jpg') ;
imshow(I) ;
h = imdistline ;

更多回答(1 个)

Saeid
Saeid 2018-12-11
Hi, If the blue cross is not in the initial image, you can easily use this:
imgbw=im2bw(img);
VerticalLength=sum(img(:,column));
HorizontalLength=sum(img(row,:));
where img is your original image and row and column are from the center of the cross.

类别

Help CenterFile Exchange 中查找有关 Read, Write, and Modify Image 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by