How to find foreground pixels between two specified pixel locations in a connected component

7 vues (au cours des 30 derniers jours)
Hi,
I want to list the foreground pixels between two specified pixels, and list them, in a connected component.

Réponses (1)

darova
darova le 27 Mar 2019
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);

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by