How to find foreground pixels between two specified pixel locations in a connected component
조회 수: 1 (최근 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!