How can i find the length of the horizontal and vertical line present only in the white pixel region for the attached binary image.
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
另请参阅
类别
在 Help Center 和 File 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!