How to find the boundary pixel values round by round ?

1 次查看(过去 30 天)
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