Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

how to add to image ?

1 vue (au cours des 30 derniers jours)
youbaa maa
youbaa maa le 6 Mai 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
helle everyone , i have this equation for adding two image
jjjj.PNG
I confused to useimadd or make a loop,and what does it mean the mean of image?

Réponses (1)

Rik
Rik le 6 Mai 2019
I would presume this means that you have an image where you add mean(X,'all') to the original. The loops are not needed in Matlab. You do need to make sure that you don't overflow your data type:
super_simple_image=uint8([0 250;100 150]);
X=super_simple_image;
X=X+mean(X,'all');
%data clips to 255: [125 255;255 255]
super_simple_image=uint8([0 250;100 150]);
X=double(super_simple_image);
X=X+mean(X,'all');
%data doesn't clip: [125 375;225 275]

Community Treasure Hunt

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

Start Hunting!

Translated by