how to normalize an image

5 vues (au cours des 30 derniers jours)
Matlabques
Matlabques le 14 Nov 2013
Commenté : Tilkesh le 15 Mar 2022
I want to normalize an image by dividing the value of each pixel by the square root of the sum of all pixel squares for each image. What will be the code

Réponse acceptée

Image Analyst
Image Analyst le 14 Nov 2013
It's practically just like how it sounds:
denominator = sqrt(sum(yourImage(:).^2));
outputImage = double(yourImage) / denominator;
I trust you were honest when you didn't tag this as homework, because I'm not supposed to just give you the answer if it was your homework. Mark the answer as Accepted once you verify that the code works.
  1 commentaire
Tilkesh
Tilkesh le 15 Mar 2022
Thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by