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
Nesta página do site você pode assistir ao vídeo on-line Shape based object extraction using Morphological Operation | MATLAB duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Knowledge Amplifier 26 Junho 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 874 vezes e gostou 15 espectadores. Boa visualização!