How to find foreground pixels between two specified pixel locations in a connected component
2 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I want to list the foreground pixels between two specified pixels, and list them, in a connected component.
0 件のコメント
回答 (1 件)
darova
2019 年 3 月 27 日
What do you mean "Connected component"?
n = max(x2-x1,y2-y1);
n = abs(n)+1; % number of pixels between coordinates
indy = linspace(y1,y2,n);
indx = linspace(x1,x2,n);
indy = round(indy); % indices of pixels you wnat
indx = round(indx);
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!