Info

此问题已关闭。 请重新打开它进行编辑或回答。

want a trajectory of the seam from the cloth.

1 次查看(过去 30 天)
I want to detect the seam and make a trajectory on which the laser machine will work. This is the work i have done so far. Now i want a proper line without gaps but not able to achieve it and also how my machine will be handled by matlab ?
im = rgb2gray(imread('white_2.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);
imshow(sim);title('after Sobel');
h = waitbar(0,'Sewing....');
[B,L] = bwboundaries(sim,'noholes');
imshow(label2rgb(L, @jet, [.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.5)
waitbar((.5+(k/length(B))/2),h);
end

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by