<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Auto Contrast in Grey Images in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964730#M20006</link>
    <description>&lt;P&gt;Hello All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just implemented the histogram equalization technique using intel ipp functions. Since Histogram equalization&amp;nbsp;equalizes within the two extreem values, I was thinking of implementing other methods for auto contrast.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way that I can perform auto contrast and not histogram equlaiztion?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&lt;BR /&gt;Sharath&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 May 2013 20:48:27 GMT</pubDate>
    <dc:creator>SharathKum_D_Intel</dc:creator>
    <dc:date>2013-05-16T20:48:27Z</dc:date>
    <item>
      <title>Auto Contrast in Grey Images</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964730#M20006</link>
      <description>&lt;P&gt;Hello All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just implemented the histogram equalization technique using intel ipp functions. Since Histogram equalization&amp;nbsp;equalizes within the two extreem values, I was thinking of implementing other methods for auto contrast.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way that I can perform auto contrast and not histogram equlaiztion?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&lt;BR /&gt;Sharath&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2013 20:48:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964730#M20006</guid>
      <dc:creator>SharathKum_D_Intel</dc:creator>
      <dc:date>2013-05-16T20:48:27Z</dc:date>
    </item>
    <item>
      <title>I'm also interested in</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964731#M20007</link>
      <description>&lt;P&gt;I'm also interested in discussing automatic contrast algorithms.&lt;BR /&gt;Histogram Equalization, Histogram Stretching, Gamma Correction etc.&lt;/P&gt;
&lt;P&gt;The problem is, you start with a bad grayscale image, and how do you present it perfectly, automatically?&lt;BR /&gt;The bad image is full of problems: under/over exposed, artifacts etc.&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2013 09:42:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964731#M20007</guid>
      <dc:creator>Thomas_Jensen1</dc:creator>
      <dc:date>2013-05-17T09:42:57Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...Is there any way that I</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964732#M20008</link>
      <description>&amp;gt;&amp;gt;...Is there any way that I can perform &lt;STRONG&gt;auto contrast&lt;/STRONG&gt; and not histogram equlaiztion? 

I would try to do it using a simple algorithm to calculate Center of Gravity of a Histogram represented as a small image. I know that in Point-and-Shot digital cameras and webcams it is done in a very simple way.  Which one? I do not know.</description>
      <pubDate>Fri, 17 May 2013 14:04:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964732#M20008</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-05-17T14:04:39Z</dc:date>
    </item>
    <item>
      <title>Center of gravity is an area</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964733#M20009</link>
      <description>&lt;P&gt;Center of gravity is an area (with a fixed width) in the histogram, where the Percentile is highest.&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2013 15:21:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964733#M20009</guid>
      <dc:creator>Thomas_Jensen1</dc:creator>
      <dc:date>2013-05-17T15:21:49Z</dc:date>
    </item>
    <item>
      <title>I learnt that "Center of</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964734#M20010</link>
      <description>&lt;P&gt;I learnt that "Center of Gravity" of a histogram is the mean of the histogram values. I am not knowing if "mean" would be a good factor in performing the auto contrast. Any thoughts on this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2013 16:28:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964734#M20010</guid>
      <dc:creator>SharathKum_D_Intel</dc:creator>
      <dc:date>2013-05-20T16:28:08Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...I learnt that "Center of</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964735#M20011</link>
      <description>&amp;gt;&amp;gt;...I learnt that "Center of Gravity" of a histogram is the mean of the histogram values...

Take a look at a generic description of an algorithm...

Imaging a &lt;STRONG&gt;histogram&lt;/STRONG&gt; of some Source Image ( SI ) as &lt;STRONG&gt;an Histogram Image&lt;/STRONG&gt; ( HI ), for example, with dimensions 128x128 pixels ( _int8 data type ). Now, 3 cases are possible and &lt;STRONG&gt;If&lt;/STRONG&gt;:

- The histogram is "shifted" to the left part of the HI than the SI is underexposed
- The "summit" of the histogram is in the "middle" of the HI than the SI is properly exposed
- The histogram is "shifted" to the right part of the HI than the SI is overexposed

A simple calculation of the &lt;STRONG&gt;Center of Gravity&lt;/STRONG&gt; for HI could tell you how you should adjust parameters of a camera in order to take a properly exposed image.

The same rules could be applied for Auto-Contrast processing.</description>
      <pubDate>Mon, 20 May 2013 18:23:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964735#M20011</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-05-20T18:23:14Z</dc:date>
    </item>
    <item>
      <title>Thanks Sergey for that quick</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964736#M20012</link>
      <description>&lt;P&gt;Thanks Sergey for that quick response. It totally makes sense to take the center of gravity now. I will try it out and let you know about it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was also curious to know if there are any IPP functions to calcualte the "Center of Gravity". If yes, kindly let me know.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sharath&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2013 16:18:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964736#M20012</guid>
      <dc:creator>SharathKum_D_Intel</dc:creator>
      <dc:date>2013-05-21T16:18:09Z</dc:date>
    </item>
    <item>
      <title>The Center of Gravity is a</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964737#M20013</link>
      <description>The Center of Gravity is a very simple algorithm and here it is from my test-cases:

RTvoid &lt;STRONG&gt;CalcCenterOfGravityF&lt;/STRONG&gt;( RTfloat *pfMatrix, RTint iR, RTint iC, RTint *piCoGX, RTint *piCoGY );

RTvoid &lt;STRONG&gt;CalcCenterOfGravityF&lt;/STRONG&gt;( RTfloat *pfMatrix, RTint iR, RTint iC, RTint *piCoGX, RTint *piCoGY )
{
	RTfloat fCoGX = 0.0f;
	RTfloat fCoGY = 0.0f;
	RTfloat fTotalI = 0.0f;
	RTfloat fPxValue = 0.0f;

	for( RTint r = 0; r &amp;lt; iR; r++ )
	{
		RTint iRTemp = ( r * iC );
		for( RTint c = 0; c &amp;lt; iC; c++ )
		{
			fPxValue = *( pfMatrix + ( iRTemp + c ) );

			fCoGX += ( fPxValue * c );
			fCoGY += ( fPxValue * r );
			fTotalI += fPxValue;
		}
	}

	if( fTotalI != 0.0f )
	{
		*piCoGX = ( RTint )( fCoGX / fTotalI );
		*piCoGY = ( RTint )( fCoGY / fTotalI );
	}
	else
	{
		*piCoGX = 0;
		*piCoGY = 0;
	}
}

Please do all the rest clean ups.

Note: a template-based implementation of the function is more flexible.</description>
      <pubDate>Wed, 22 May 2013 00:19:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964737#M20013</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-05-22T00:19:24Z</dc:date>
    </item>
    <item>
      <title>Sergey, Thanks for posting</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964738#M20014</link>
      <description>&lt;P&gt;Sergey, Thanks for posting the code snippet with your test cases. Since I am fairly new to image processing, It took me sometime to understand your code. It would be more helpful if you had comments to walk me through. Nevertheless It is very helpful.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2013 17:07:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964738#M20014</guid>
      <dc:creator>SharathKum_D_Intel</dc:creator>
      <dc:date>2013-05-22T17:07:50Z</dc:date>
    </item>
    <item>
      <title>Hi everybody,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964739#M20015</link>
      <description>Hi everybody,

&amp;gt;&amp;gt;... It would be more helpful if you had comments to walk me through. Nevertheless It is very helpful...

I'll post a complete test-case.

&amp;gt;&amp;gt;...I'm also interested in discussing automatic contrast algorithms.

Thomas, I looked at it and some technical details will be provided. By the way, do you have any issues / problems with Auto Contrast algorithm?</description>
      <pubDate>Wed, 22 May 2013 23:10:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964739#M20015</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-05-22T23:10:46Z</dc:date>
    </item>
    <item>
      <title>Sergey, I have lots of</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964740#M20016</link>
      <description>&lt;P&gt;Sergey, I have lots of grayscale images that just cannot be displayed "perfectly" automatically,&lt;/P&gt;
&lt;P&gt;The problem is always that the histogram of the grayscale image has large parts that must be avoided before doing automatic this-and-that.&lt;BR /&gt;I call those part artifacts. One artifact can be a wide tall peak in the white part, or a narrow high peak in the medium gray part. Those must be removed before applying autmatic algorithms. One way of "removing" is to mask the image before the histogra is computed, another way is to patch the histogram, supressing an easy to detect artifact.&lt;/P&gt;
&lt;P&gt;I already use "stretching", wherein I move zero or very low black point and zero or very low white point, using percentiles to determine when to stop. To find the grayscale of greatest interest, I use what I described above, sliding a wide band over the histogram, choosing the location having the higest percentile.&lt;/P&gt;
&lt;P&gt;Suggestions are welcome.&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2013 09:50:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964740#M20016</guid>
      <dc:creator>Thomas_Jensen1</dc:creator>
      <dc:date>2013-05-23T09:50:05Z</dc:date>
    </item>
    <item>
      <title>Could you attach an example</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964741#M20017</link>
      <description>Could you attach an example of one of these grayscale images with artifacts? Just description is not enough. Also, I was going to talk about a generic algorithm for a such correction. Thanks.</description>
      <pubDate>Thu, 23 May 2013 12:21:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964741#M20017</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-05-23T12:21:53Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;I have lots of grayscale</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964742#M20018</link>
      <description>&amp;gt;&amp;gt;I have lots of grayscale images that just cannot be displayed "perfectly" automatically,
&amp;gt;&amp;gt;
&amp;gt;&amp;gt;The problem is always that the histogram of the grayscale image has large parts that must be avoided before
&amp;gt;&amp;gt;doing automatic this-and-that...

Thomas, How do you calculate contrast? What method or formula do you use?

&lt;STRONG&gt;Note:&lt;/STRONG&gt; I wonder if you use a classic one widelly used in Machine Vision applications for greyscale ( monochrome ) images:

%Contrast = ( Imax - Imin ) / MaxValueOfDynamicRange

For example, for 8-bit images MaxValueOfDynamicRange is equal to 255.</description>
      <pubDate>Fri, 24 May 2013 05:43:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964742#M20018</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-05-24T05:43:20Z</dc:date>
    </item>
    <item>
      <title>Contrast is not a property of</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964743#M20019</link>
      <description>&lt;P&gt;Contrast is not a property of the image but is a controlling parameter of an image manipulation algorithm. For instance, you can increase the contrast of an image by adjusting a pixel values such that the difference between light and dark is bigger.&lt;/P&gt;
&lt;P&gt;In the real world there are images which need adjustment before being displayed perfectly, and I'm looking for automatic methods for this problem.&lt;/P&gt;
&lt;P&gt;I uploaded some test images.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2013 10:06:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964743#M20019</guid>
      <dc:creator>Thomas_Jensen1</dc:creator>
      <dc:date>2013-05-27T10:06:51Z</dc:date>
    </item>
    <item>
      <title>Thomas, You don't need to</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964744#M20020</link>
      <description>Thomas, You don't need to explain what Image Processing is and I didn't ask for the explanation of a widely known things about Image Processing, right? I have a very good experience with X-Ray imaging and MRI ( 2-D &amp;amp; 3-D / Volume Rendering ).

My simple question was:

&amp;gt;&amp;gt;...How do you calculate contrast? What method or formula do you use?</description>
      <pubDate>Mon, 27 May 2013 12:57:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964744#M20020</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-05-27T12:57:04Z</dc:date>
    </item>
    <item>
      <title>Sorry for a small deviation</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964745#M20021</link>
      <description>Sorry for a small deviation because this is Not related directly to IPP.

&amp;gt;&amp;gt;...I uploaded some test images...

Thomas, Thank you for uploading a set of images which demonstrate some post image processing and I see now that attempt to use a classic formula:

%Contrast = ( Imax - Imin ) / MaxValueOfDynamicRange

will fail ( actually, I already did a quick test ).

&lt;STRONG&gt;Note:&lt;/STRONG&gt; Source images look like MRI images, Not X-Ray ( however I could be wrong... ), with quality issues, like they are too overexposed ( captured structure of bones and, at the same time, soft tissues (!) / to capture soft tissues very low doses of radiation are needed ).

I think a more complex filtering techique needs to be used based on IIR or FIR ( with some Windowing function ), or some Convolution based filtering, or something else. It is clear that some software completed a very good correction of source images.

I will try a Wallis Statistical Filter but I'm Not sure that it will improve overall quality of the source image. I'll let you know as soon as my tests are completed.</description>
      <pubDate>Mon, 27 May 2013 23:51:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964745#M20021</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-05-27T23:51:00Z</dc:date>
    </item>
    <item>
      <title>My sample images all have</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964746#M20022</link>
      <description>&lt;P&gt;My sample images all have lightness problems since we discussed that. Applying filtering (and with that I understand structure/sharpness filtering) will not "fix" the lightning problem, unless you can tell me a nice idea of how.&lt;/P&gt;
&lt;P&gt;Further, my images are reduced for presentation here. I could upload real 16 or 12 bpp grayscale originals, if you want.&lt;/P&gt;
&lt;P&gt;I do not know about Wallis Statistical Filters, but I googled it, and it seems to also have use in my field, and indeed can possible help with simultanious dark and bright areas.&lt;BR /&gt;Can IPP perform Wallis?&lt;/P&gt;
&lt;P&gt;I also spotted noise reduction using Wavelets, do you have an IPP code sample that demonstrates this?&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2013 10:30:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964746#M20022</guid>
      <dc:creator>Thomas_Jensen1</dc:creator>
      <dc:date>2013-05-28T10:30:42Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...My sample images all</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964747#M20023</link>
      <description>&amp;gt;&amp;gt;...My sample images all have lightness problems since we discussed that. Applying filtering (and with that I understand
&amp;gt;&amp;gt;structure/sharpness filtering) will not "fix" the lightning problem...

Did you do a Manual correction to get '_wanted.png' images? These images look significantly better. Please provide details.</description>
      <pubDate>Tue, 28 May 2013 13:06:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964747#M20023</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-05-28T13:06:33Z</dc:date>
    </item>
    <item>
      <title>Yes, my sample images have</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964748#M20024</link>
      <description>&lt;P&gt;Yes, my sample images have original and manually adjusted lightning versions. No filtering is done (structure/sharpening), only contrast/brightness/gamma.&lt;/P&gt;
&lt;P&gt;I'm very curious for a Wallis implementation, to test with...&amp;nbsp; can be outside IPP...&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2013 15:33:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964748#M20024</guid>
      <dc:creator>Thomas_Jensen1</dc:creator>
      <dc:date>2013-05-28T15:33:27Z</dc:date>
    </item>
    <item>
      <title>By the way, my sample images</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964749#M20025</link>
      <description>&lt;P&gt;By the way, my sample images are not MRI, just simple digital 2D x-ray.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2013 15:34:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Auto-Contrast-in-Grey-Images/m-p/964749#M20025</guid>
      <dc:creator>Thomas_Jensen1</dc:creator>
      <dc:date>2013-05-28T15:34:06Z</dc:date>
    </item>
  </channel>
</rss>

