How to add the neighboring pixel values
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Sharen H
le 30 Juin 2015
Réponse apportée : Walter Roberson
le 30 Juin 2015
I have a matrix - if 0 occurs then i have to add the 8 neighboring pixels and replace the 0 value . is there any built in function for this ..
0 commentaires
Réponse acceptée
Walter Roberson
le 30 Juin 2015
filt2() with [1 1 1;1 0 1; 1 1 1] to get the sums everywhere. Then in the places that are 0 in the original, replace with the sum at the corresponding location. Use logical indexing.
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!