Thread Subject: RMS contrast (image processing)- Am I correct?

Subject: RMS contrast (image processing)- Am I correct?

From: N N

Date: 3 Jul, 2008 08:05:09

Message: 1 of 3

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’ve
developed (am questioning my own understanding therefore)

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

Thanks in advance for your time :)

Subject: RMS contrast (image processing)- Am I correct?

From: Adam

Date: 3 Jul, 2008 15:38:02

Message: 2 of 3

"N N" <cvlm_2005@hotmail.com> wrote in message
<g4i17l$ecp$1@fred.mathworks.com>...
> 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’ve
> developed (am questioning my own understanding therefore)
>
> 2. As for aim 2 is concerned, I intend to use ‘imadjust’
> command to adjust the pixel values without compromising
> image quality to acquire images with similar RMS contrast.
>
> Thanks in advance for your time :)
>

Aim 1: Looks to me like you're taking the standard deviation
of the image.

RMS => Root Mean Squared

sqrt(mean(c(:).^2))

also mean(c(:)) is a little faster than mean(mean(c)), would
be more noticeable on bigger images, or processing multiple
images (which it sounds like you do).

Not sure what significance RMS has to an image.

Aim 2: so you're "normalizing" the images? It affects the
contrast, not sure if that's part of the "quality"

~Adam

Subject: RMS contrast (image processing)- Am I correct?

From: N N

Date: 7 Jul, 2008 04:35:02

Message: 3 of 3

Thanks, Adam. Help is much appreciated. Yes, I was
calculating the SD instead of RMS, until you pointed out.

Cheers :)

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
image processing N N 7 Jul, 2008 00:40:07
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com