<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/171971</link>
    <title>MATLAB Central Newsreader - RMS contrast (image processing)- Am I correct?</title>
    <description>Feed for thread: RMS contrast (image processing)- Am I correct?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 03 Jul 2008 08:05:09 -0400</pubDate>
      <title>RMS contrast (image processing)- Am I correct?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/171971#440945</link>
      <author>N N</author>
      <description>Dear All,&lt;br&gt;
Could you offer some comments/suggestions regarding my &lt;br&gt;
queries on image processing?&lt;br&gt;
&lt;br&gt;
Aim 1: To find RMS contrast of an image (m code - below)&lt;br&gt;
---------------------------------------&lt;br&gt;
a=imread('pout.tif'); %including this image as it may be &lt;br&gt;
available to all&lt;br&gt;
&lt;br&gt;
b=double(a);%I guess all image files are stored as &quot;uint&quot;; &lt;br&gt;
so, I have converted them to &quot;double&quot; precision values&lt;br&gt;
&lt;br&gt;
c=b/255; %gives me the pixel values between 0 and 1; did &lt;br&gt;
this step as I want to see smaller values.&lt;br&gt;
&amp;nbsp;&lt;br&gt;
mean_pixels=mean(mean(c));&lt;br&gt;
&amp;nbsp;&lt;br&gt;
rms_cont=sqrt(sum((c(:)-mean_pixels).^2)) % I was hoping &lt;br&gt;
that this would be between 0 and 1 (not the case)&lt;br&gt;
-------------------------------------------------&lt;br&gt;
Aim 2: To develop a group of images that have similar RMS &lt;br&gt;
contrast (I do have images)&lt;br&gt;
&lt;br&gt;
My queries:&lt;br&gt;
&lt;br&gt;
1. As for aim 1 is concerned, is that the right way to &lt;br&gt;
find RMS contrast of an image? Before developing this code &lt;br&gt;
I was expecting the answer to be between 0 and 1 (not the &lt;br&gt;
case); perhaps it goes to &amp;gt;100 for some images I&amp;#8217;ve &lt;br&gt;
developed (am questioning my own understanding therefore)&lt;br&gt;
&lt;br&gt;
2. As for aim 2 is concerned, I intend to use &amp;#8216;imadjust&amp;#8217; &lt;br&gt;
command to adjust the pixel values without compromising &lt;br&gt;
image quality to acquire images with similar RMS contrast.&lt;br&gt;
&lt;br&gt;
Thanks in advance for your time :)</description>
    </item>
    <item>
      <pubDate>Thu, 03 Jul 2008 15:38:02 -0400</pubDate>
      <title>Re: RMS contrast (image processing)- Am I correct?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/171971#441032</link>
      <author>Adam </author>
      <description>&quot;N N&quot; &amp;lt;cvlm_2005@hotmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;g4i17l$ecp$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Dear All,&lt;br&gt;
&amp;gt; Could you offer some comments/suggestions regarding my &lt;br&gt;
&amp;gt; queries on image processing?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Aim 1: To find RMS contrast of an image (m code - below)&lt;br&gt;
&amp;gt; ---------------------------------------&lt;br&gt;
&amp;gt; a=imread('pout.tif'); %including this image as it may be &lt;br&gt;
&amp;gt; available to all&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; b=double(a);%I guess all image files are stored as &quot;uint&quot;; &lt;br&gt;
&amp;gt; so, I have converted them to &quot;double&quot; precision values&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; c=b/255; %gives me the pixel values between 0 and 1; did &lt;br&gt;
&amp;gt; this step as I want to see smaller values.&lt;br&gt;
&amp;gt;  &lt;br&gt;
&amp;gt; mean_pixels=mean(mean(c));&lt;br&gt;
&amp;gt;  &lt;br&gt;
&amp;gt; rms_cont=sqrt(sum((c(:)-mean_pixels).^2)) % I was hoping &lt;br&gt;
&amp;gt; that this would be between 0 and 1 (not the case)&lt;br&gt;
&amp;gt; -------------------------------------------------&lt;br&gt;
&amp;gt; Aim 2: To develop a group of images that have similar RMS &lt;br&gt;
&amp;gt; contrast (I do have images)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; My queries:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 1. As for aim 1 is concerned, is that the right way to &lt;br&gt;
&amp;gt; find RMS contrast of an image? Before developing this code &lt;br&gt;
&amp;gt; I was expecting the answer to be between 0 and 1 (not the &lt;br&gt;
&amp;gt; case); perhaps it goes to &amp;gt;100 for some images I&amp;#8217;ve &lt;br&gt;
&amp;gt; developed (am questioning my own understanding therefore)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 2. As for aim 2 is concerned, I intend to use &amp;#8216;imadjust&amp;#8217; &lt;br&gt;
&amp;gt; command to adjust the pixel values without compromising &lt;br&gt;
&amp;gt; image quality to acquire images with similar RMS contrast.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks in advance for your time :)&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
Aim 1: Looks to me like you're taking the standard deviation&lt;br&gt;
of the image.&lt;br&gt;
&lt;br&gt;
RMS =&amp;gt; Root Mean Squared&lt;br&gt;
&lt;br&gt;
sqrt(mean(c(:).^2))&lt;br&gt;
&lt;br&gt;
also mean(c(:)) is a little faster than mean(mean(c)), would&lt;br&gt;
be more noticeable on bigger images, or processing multiple&lt;br&gt;
images (which it sounds like you do).&lt;br&gt;
&lt;br&gt;
Not sure what significance RMS has to an image.&lt;br&gt;
&lt;br&gt;
Aim 2: so you're &quot;normalizing&quot; the images?  It affects the&lt;br&gt;
contrast, not sure if that's part of the &quot;quality&quot;&lt;br&gt;
&lt;br&gt;
~Adam</description>
    </item>
    <item>
      <pubDate>Mon, 07 Jul 2008 04:35:02 -0400</pubDate>
      <title>Re: RMS contrast (image processing)- Am I correct?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/171971#441446</link>
      <author>N N</author>
      <description>Thanks, Adam. Help is much appreciated. Yes, I was &lt;br&gt;
calculating the SD instead of RMS, until you pointed out.&lt;br&gt;
&lt;br&gt;
Cheers :)</description>
    </item>
  </channel>
</rss>

