How to create a graph of pixels?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have this Matlab code that gives me in output this image in which I have a graph that sorrounds the obtacles. My idea now is to apply something like a Dijkstra algorithm to that graph or the shortestpath function of Matlab but I do not know how to create a graph of the pixels in white in the solution. Could anyone help me? Thanks
clc; clear all; close all;
img = imread('mappa3.png');
new_img = rgb2gray(img);
Icomplement = imcomplement(new_img);
BW = imbinarize(Icomplement);
out = bwskel(BW,'MinBranchLength',1e6);
imshow(out)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/998610/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/998615/image.jpeg)
댓글 수: 0
답변 (1개)
Image Analyst
2022년 5월 15일
That looks like the skiz. Search the help for skiz and you'll find a demo. Also look at these
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!