
Line detection in an image!!
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
khushboo chhikara
le 1 Mai 2018
Réponse apportée : gyssell dayanna contreras rodriguez
le 24 Oct 2018
I want to the line to be a single line that when i use it further it wont detect the boundaries.
im = rgb2gray(imread('white_3.jpg'));
H = fspecial('Gaussian',[2 2],15);
im = imfilter(im,H);
imshow(im);title('Original image');
sim = edge(im, 'sobel');
se = strel('disk', 2);
sim = imdilate(sim, se);
sim = bwareaopen(sim, 50);
sim = imerode(sim, se);
figure,imshow(sim);title('after Sobel');
%h = waitbar(0,'Sewing....');
[B,L] = bwboundaries(sim,'noholes');
imshow(label2rgb(L, @white, [1.5 .5 .5]))
% imwrite(L,'new.jpg')
hold on
for k = 1:length(B)
boundary = B{k};
h1=plot(boundary(:,2), boundary(:,1), 'w', 'LineWidth',0.05)
%waitbar((.5+(k/length(B))/2),h);
end
i want this to be a single line of size 0.15 with no boundaries.
0 commentaires
Réponses (2)
JESUS DAVID ARIZA ROYETH
le 1 Mai 2018
Modifié(e) : JESUS DAVID ARIZA ROYETH
le 1 Mai 2018
imo = rgb2gray(imread('white_3.jpg'));
se = strel('line',17,5);
sim = imdilate(imo, se);
se2 = strel('disk', 1);
sim = imdilate(sim, se2);
sim = bwareaopen(sim,350);
sim=bwmorph(sim, 'skel', inf);
figure
imshow(sim)

0 commentaires
gyssell dayanna contreras rodriguez
le 24 Oct 2018
how to design a program that finds the number of times that the vowels present in the full name (or any sentence) that the user provides are repeated. The output should be in the form of character or string arrangement. can you pliss help me
0 commentaires
Voir également
Catégories
En savoir plus sur Characters and Strings 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!