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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/198700/isntvhN-2-R.jpeg)
2 个评论
采纳的回答
更多回答(1 个)
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.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!