Clear Filters
Clear Filters

How to find the boundary pixel values round by round ?

1 view (last 30 days)
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

Answers (0)

Community Treasure Hunt

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

Start Hunting!