How to create a graph of pixels?

3 ビュー (過去 30 日間)
Loren99
Loren99 2022 年 5 月 15 日
編集済み: Loren99 2022 年 5 月 15 日
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)

回答 (1 件)

Image Analyst
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

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by