Change mean and std deviation

Hi,
I would like to transform the grey on an image to a given value of mean and std deviation, in order that the value of the pixels will be the same and when I make a superposition (mosaic) of the images the border between the two is almost indistinguible. Could anyone help me? Thanks a lot in advance!

답변 (1개)

Image Analyst
Image Analyst 2015년 10월 3일

0 개 추천

댓글 수: 4

Auryn_
Auryn_ 2015년 10월 3일
Hi,
thanks for the answer. Unfortunately, it doesn´t help. I have already calculated the mean and standard deviation of the point in image 1. Now I want to make the mosaic with Image 2, where the point has to be transform to the value calculated in Image 1. How can I change the value (mean and std) on picture 2?
Image Analyst
Image Analyst 2015년 10월 3일
If you don't want to seamlessly stitch the images side-by-side, and all you want to do is to make the images have the same mean and std, then just use simple algebra. It's a very simple, trivial formula that I'm sure you can guess. Let me know if you need it.
Otherwise you can match the histograms using imhistmatch().
Image Analyst
Image Analyst 2015년 10월 3일
Moved here from a brand new Question (now deleted) he started:
Hi,
I have 2 images with different mean grey values. How can I change these values to the average value of both images? Thank you!
OK, if you don't want to use imhistmatch() and can't figure out the formula, and now just want to have the same mean and don't care about the standard deviation, here it is:
mean1 = mean(image1(:));
mean2 = mean(image2(:));
newImage2 = double(image1) - mean1 + mean2;

댓글을 달려면 로그인하십시오.

질문:

2015년 10월 3일

댓글:

2015년 10월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by