Image Processing: Change RMS keeping Mean Constant

I'm trying to find a program that will help with image processing for vision experiments. Specifically, I need the mean of the image to remain constant, but I want to change the RMS contrast to different levels. Is there a program out there to help with this?
I've tried a number of different approaches but they're not working reliably with larger contrasts.
Thanks in advance for your help!

답변 (1개)

Image Analyst
Image Analyst 2013년 12월 12일

0 개 추천

I would think that the rand() function should help you immensely.

댓글 수: 4

Emily
Emily 2013년 12월 12일
Sorry, I wasn't clear. I want to read in a particular image (e.g., a face) and then scale it so it preserves the same image, same mean luminance, but changes the RMS contrast to different values.
What is your reference image?
squaredDifferenceImage = (testImage - referenceImage) .^ 2;
meanSquaredError = mean(squaredDifferenceImage(:));
rms = sqrt(meanSquaredError);
Emily
Emily 2013년 12월 12일
A reference image? I'm just taking an image, say a face with a mean of 74 and RMS of 50, and want to change the contrast of the same face so it has a mean of 74 and an RMS of 20, for example.
Does that make more sense? Thanks for your thoughts on this.
Image Analyst
Image Analyst 2013년 12월 12일
편집: Image Analyst 2013년 12월 12일
An RMS is composed of two signals. What are your two signals? Is one just a uniform image with the mean of the image?
referenceImage = mean(testImage) * ones(size(referenceImage));
???

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

카테고리

도움말 센터File Exchange에서 Get Started with Image Processing Toolbox에 대해 자세히 알아보기

질문:

2013년 12월 12일

편집:

2013년 12월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by