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일)
isntvhN-2-R.jpg

채택된 답변

KSSV
KSSV 2018년 12월 11일
I = imread('download.jpg') ;
imshow(I) ;
h = imdistline ;
  댓글 수: 1
sumaiya khan
sumaiya khan 2018년 12월 11일
Thank you,
Sir, how can i rotate the vertical and horizontal line attached in the binary image at a certain angle.

댓글을 달려면 로그인하십시오.

추가 답변 (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