私はMatlabが初めてです。スケルトン画像の画像処理を行っています。bworph
Matlab の関数を使用して分岐点とエンドポイントを検出しています。次に、スケルトン イメージの各枝の長さを計算します。Matlabのさまざまなオプションと、画像の長さを計算する方法は何ですか?
以下は、分岐点と終点を見つけるために使用したコードです。次に、画像内の各ブランチに移動して、その長さを決定します。
mn=bwmorph(y,'branchpoints');
[row column] = find(mn);
branchPts = [row column];
endImg = bwmorph(y, 'endpoints');
[row column] = find(endImg);
endPts = [row column];
figure;imshow(y);
hold on ;
plot(branchPts(:,2),branchPts(:,1),'rx');
hold on; plot(endPts(:,2),endPts(:,1),'*');