averaging images and subtracting one image from the other

5 vues (au cours des 30 derniers jours)
Sumera Yamin
Sumera Yamin le 18 Fév 2021
Commenté : Sumera Yamin le 18 Fév 2021
Hi, I have a basic image processing question. I am dealing with two sets of images. Lets say image A (average of 10 image sets) and image B (average of 10 image sets). How do I do the average of 10 images to get image A and B and then subtract image A from image B. Many thanks for any leads.

Réponse acceptée

Matt J
Matt J le 18 Fév 2021
Modifié(e) : Matt J le 18 Fév 2021
For example,
setA=rand(256,256,10);
setB=rand(256,256,10);
imageA=mean(setA,3);
imageB=mean(setB,3);
result = imageB-imageA;
  3 commentaires
Matt J
Matt J le 18 Fév 2021
Modifié(e) : Matt J le 18 Fév 2021
what does 3 mean in mean (setA, 3).
It means take mean of all the slices setA(:,:,i).
Also i am reading the images from some file. I am not sure, how would i implement this code.
Read the images into an MxNx10 array, e.g., by doing,
setA(:,:,i)=imread(___);
Sumera Yamin
Sumera Yamin le 18 Fév 2021
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