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!