7*7 average
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How can we find average of matrix, considering a 7 by 7 matrix in an image????
1 commentaire
Guillaume
le 29 Jan 2019
You'll have to be clearer about what you want. Providing an example of input and desired output really helps. What does considering a 7 by 7 matrix in an image mean?
Réponses (1)
Matt J
le 29 Jan 2019
Modifié(e) : Matt J
le 29 Jan 2019
If you want a 7x7 sliding window, you would use convolution
out=conv2(yourImage,ones(7)/49,'valid');
If instead you want to decompose your image into non-overlapping 7x7 tiles, then I would recommend sepblockfun (Download).
out=sepblockfun(yourImage,[7,7],'mean');
4 commentaires
Guillaume
le 30 Jan 2019
As Matt wrote, "If you want a 7x7 sliding window, you would use convolution" and he gave you the code.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!