Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: RMS contrast (image processing)- Am I correct?
Date: Thu, 3 Jul 2008 08:05:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 37
Message-ID: <g4i17l$ecp$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1215072309 14745 172.30.248.35 (3 Jul 2008 08:05:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 3 Jul 2008 08:05:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1265323
Xref: news.mathworks.com comp.soft-sys.matlab:477299



Dear All,
Could you offer some comments/suggestions regarding my 
queries on image processing?

Aim 1: To find RMS contrast of an image (m code - below)
---------------------------------------
a=imread('pout.tif'); %including this image as it may be 
available to all

b=double(a);%I guess all image files are stored as "uint"; 
so, I have converted them to "double" precision values

c=b/255; %gives me the pixel values between 0 and 1; did 
this step as I want to see smaller values.
 
mean_pixels=mean(mean(c));
 
rms_cont=sqrt(sum((c(:)-mean_pixels).^2)) % I was hoping 
that this would be between 0 and 1 (not the case)
-------------------------------------------------
Aim 2: To develop a group of images that have similar RMS 
contrast (I do have images)

My queries:

1. As for aim 1 is concerned, is that the right way to 
find RMS contrast of an image? Before developing this code 
I was expecting the answer to be between 0 and 1 (not the 
case); perhaps it goes to >100 for some images I&#8217;ve 
developed (am questioning my own understanding therefore)

2. As for aim 2 is concerned, I intend to use &#8216;imadjust&#8217; 
command to adjust the pixel values without compromising 
image quality to acquire images with similar RMS contrast.

Thanks in advance for your time :)