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 visualizaciones (últimos 30 días)
isntvhN-2-R.jpg

Respuesta aceptada

KSSV
KSSV el 11 de Dic. de 2018
I = imread('download.jpg') ;
imshow(I) ;
h = imdistline ;

Más respuestas (1)

Saeid
Saeid el 11 de Dic. de 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.

Categorías

Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by