How to get the mean value of the area around certain coordinates of an image?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
ferran parera
le 27 Avr 2017
Commenté : ferran parera
le 2 Mai 2017
Hi, I am writing a code to analize all the frames of a video. I have already split the video on its frames. To simplify my question lets take a single grey scale image.
I have an image. I have a mesh of points (with their coordinates). The mesh is a regular square mesh. I would like to get the average value in the area around each of these points. And if it is posible to have these mean values in a matrix.
How do you recomend me to do it?
Thank you in advance.
2 commentaires
Réponse acceptée
Image Analyst
le 28 Avr 2017
Use imfilter() or conv2():
kernel = ones(31); % center plus 15 to all sides.
averageImage = conv2(grayImage, kernel, 'same');
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Image Processing and Computer Vision dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!