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 vues (au cours des 30 derniers jours)
isntvhN-2-R.jpg

Réponse acceptée

KSSV
KSSV le 11 Déc 2018
I = imread('download.jpg') ;
imshow(I) ;
h = imdistline ;
  1 commentaire
sumaiya khan
sumaiya khan le 11 Déc 2018
Thank you,
Sir, how can i rotate the vertical and horizontal line attached in the binary image at a certain angle.

Connectez-vous pour commenter.

Plus de réponses (1)

Saeid
Saeid le 11 Déc 2018
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.

Catégories

En savoir plus sur Read, Write, and Modify Image dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by