How to find the boundary pixel values round by round ?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Computer Vision with Simulink in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!