필터 지우기
필터 지우기

How to find the boundary pixel values round by round ?

조회 수: 1 (최근 30일)
Piyum Rangana
Piyum Rangana 2017년 4월 18일
consider the two images below
The first image shows a damaged area of a image. By using the below code the boundary pixel values' co-ordinations can be found. Then I need to find the pixels of the inner rounds of the ROI's boundary one by one as mentioned in the second image in black again and again. How can I easily do that ?
rgbImage = imread('image.png');
redChannel = rgbImage(:, :, 1);
ZeroPlate = redChannel == 0;
for j = 1 : numberOfDamagedRegions
thisBoundary = boundaries{j};
x = thisBoundary(:, 1);
y = thisBoundary(:, 2);
for index = 1 : length(x)
row = x(index);
column = y(index);
ZeroPlate(row, column)=true;
end
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by