I want a gcode to move my cnc machine on a particular path. how that can be done in matlab ??

댓글 수: 1

Walter Roberson
Walter Roberson 2018년 5월 3일
Please do not close questions that have an Answer.

댓글을 달려면 로그인하십시오.

 채택된 답변

Walter Roberson
Walter Roberson 2018년 4월 22일

0 개 추천

댓글 수: 7

khushboo chhikara
khushboo chhikara 2018년 4월 22일
this is my image on which the machine will move .. now i want that matlab controls the arduino through which the machine is connected.
Walter Roberson
Walter Roberson 2018년 4월 22일
Image is missing.
khushboo chhikara
khushboo chhikara 2018년 4월 22일

this is the image.

Walter Roberson
Walter Roberson 2018년 4월 22일
So what is the path?
I would tend to think that jumping between the center and the small parts at the bottom would not be efficient, but it could be necessary if the CNC is restricted to moving only in one direction on a particular axes.
khushboo chhikara
khushboo chhikara 2018년 4월 22일
not on the small parts at the bottom .. only the main line will be followed. But i dont know how to do that with matlab and arduino.
Walter Roberson
Walter Roberson 2018년 4월 22일

Have you done an imclose() then bwskel(), possibly followed by spur removal from bwmorph ?

clc,clear,close all;
% cam = webcam('HD Webcam C615')
% im1 = snapshot(cam);
% % set(handles.axes1,'Visible','on');
% % axes(handles.axes1)
im=rgb2gray(im1);
figure,imshow(im);
clear('cam')
% 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);
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개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by