Calculate the value of an area around a known co-ordinate

1 vue (au cours des 30 derniers jours)
Karin Cluver
Karin Cluver le 1 Juil 2022
Commenté : Matt J le 1 Juil 2022
Is it possible to calculate an average of a couple of pixel's value around a known co-ordinate?
I use the following equation:
%%
imtool (Thermal)
P = impixel(Thermal, X,Y)
Is there a wat to get the average of a few pixels around the X,Y instead of just the single value at this point (3 pixels around the X,Y co-ordinate)

Réponse acceptée

Matt J
Matt J le 1 Juil 2022
Modifié(e) : Matt J le 1 Juil 2022
mean(Thermal(y-1:y+1,x-1:x+1),'all')
  3 commentaires
Matt J
Matt J le 1 Juil 2022
Yes. You could also use movmean() or conv2() if you wanted the neighborhood means of every pixel.
Matt J
Matt J le 1 Juil 2022
Karin Cluver's response moved here:
Perfect Thank you so much

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 3-D Volumetric Image Processing dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by