Code for measuring the vertical lines:
clc
clear all
close all
warning off
x=rgb2gray(imread('Hor.JPG'));
x=imbinarize(x);
SE = strel('line',20,90);
s=imerode(x,SE);
s=imdilate(s,SE);
imshowpair(x,s,'montage');
Code for measuring the horizontal lines:
clc
clear all
close all
warning off
x=rgb2gray(imread('Hor.JPG'));
x=imbinarize(x);
SE = strel('line',20,0);
s=imerode(x,SE);
s=imdilate(s,SE);
imshowpair(x,s,'montage');
Code for measuring the approximate slope of unknown straight line:
clc
clear all
close all
x=rgb2gray(imread('Hor.JPG'));
x=imbinarize(x);
imshow(x);
for i=10:75
SE = strel('line',20,i);
s=imerode(x,SE);
s=imdilate(s,SE);
imshowpair(x,s,'montage');
title(i);
pause;
end
#ImageProcessing #MATLAB #ComputerVision
En esta página del sitio puede ver el video en línea Shape based object extraction using Morphological Operation | MATLAB de Duración hora minuto segunda en buena calidad , que subió el usuario Knowledge Amplifier 26 junio 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 874 veces y le gustó 15 a los espectadores. Disfruta viendo!