Extracting points from polyshape
조회 수: 4 (최근 30일)
이전 댓글 표시
I have a figure defined as polyshape and I want to create pointcloud representing full boundary and inside of polygon, not only vertices. The only idea i have for now is to fill polygon in black, open plot as bw image and get th coordinates of the black pixels. Is there any method to do that better? If no, can I 'save' the plot as an image directly to worspace ?
댓글 수: 0
답변 (1개)
darova
2021년 7월 24일
See this link about curve interpolation: LINK
Saving the data as a picture is a good idea too: try print
x = 0:20;
y = sin(x);
plot(x,y)
% make axes invisible
set(gca,'Xcolor','w', ...
'Ycolor','w', ...
'xtick',[], ...
'ytick',[])
I0 = print('-RGBImage','-r300'); % returns an image with 300 dots per inch resolution
I1 = im2bw(I0);
imshow(I1)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Elementary Polygons에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!