color detected region in an image
Afficher commentaires plus anciens
Hi all. i m trying to detected some small blobs from this input image

and after processing i want it to look like this

i have processed it using bottom hat filter and i was able to detect the blobs. like this

now i want to color the detected blobs in orignal image as shown in sample output please tell me how can i do it.. here is the code for processing
original = imread('fivTest.png');
figure, imshow(original)
se = strel('disk',12);
tophatFiltered = imbothat(original,se);
figure, imshow(tophatFiltered);
[r c] = size(tophatFiltered);
for i = 1:r
for j = 1:c
if tophatFiltered(i,j) < 60
tophatFiltered(i,j) = 0;
end
end
end
figure, imshow(tophatFiltered);
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Image Processing and Computer Vision dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
