<?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 Hi ,I too am getting in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiHistogram-8u-C1R-problem/m-p/1111395#M25423</link>
    <description>&lt;P&gt;Hi ,I too am getting&amp;nbsp;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; background-color: rgb(248, 248, 248);"&gt;sizeBuffer = 0 from&amp;nbsp;ippiHistogramGetBufferSize&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Apr 2018 19:32:30 GMT</pubDate>
    <dc:creator>MM_Leo</dc:creator>
    <dc:date>2018-04-25T19:32:30Z</dc:date>
    <item>
      <title>ippiHistogram_8u_C1R problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiHistogram-8u-C1R-problem/m-p/1111394#M25422</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;

&lt;P&gt;I am trying to use ippiHistogram. The problem is - the last (256) byte of histogram result buffer is not filled by ippiHistogram_8u_C1R.&amp;nbsp;&lt;BR /&gt;
	I have tried to use ippiHistogramInit instead of ippiHistogramUniformInit - the result is the same.&lt;BR /&gt;
	Previously I used iplComputeHisto function - it had worked correctly.&amp;nbsp;&lt;BR /&gt;
	For example iplComputeHisto returns pHistVec[255] = 1226, but ippiHistogram_8u_C1R returns pHistVec[255] = 1393896807&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I use IPPI version 9 Update 1.&lt;/P&gt;

&lt;P&gt;Please, explain, how can I get last histogram value? Thank you!&lt;/P&gt;

&lt;P&gt;Here is the code:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;IppiSize roi = {image-&amp;gt;width, image-&amp;gt;height};
int nChannels = image-&amp;gt;nChannels;
const int histLen = 255;
int nLevels[] = { histLen+1 };
Ipp32f lowerLevel[] = {0};
Ipp32f upperLevel[] = {255};
Ipp32f pLevels[histLen+1], *ppLevels[1];
int sizeHistObj = 0;
int sizeBuffer = 0;
IppiHistogramSpec* pHistObj = NULL;
Ipp8u* pBuffer = NULL;
Ipp32u pHistVec[histLen + 1];

bool errorInCycle = false;

IppStatus sts = ippiHistogramGetBufferSize(ipp8u, roi, nLevels, nChannels, 0, &amp;amp;sizeHistObj, &amp;amp;sizeBuffer);
if(sts != ippStsNoErr)
{
	return;
}

pHistObj = (IppiHistogramSpec*)ippsMalloc_8u(sizeHistObj);
if(pHistObj == NULL)
{
	return;
}

pBuffer = (Ipp8u*)ippsMalloc_8u(sizeBuffer);
if(pHistObj == NULL)
{
	ippsFree( pHistObj );
	return;
}

sts = ippiHistogramUniformInit(ipp8u, lowerLevel, upperLevel, nLevels, nChannels, pHistObj);
if(sts != ippStsNoErr)
{
	ippsFree( pHistObj );
	ippsFree( pBuffer );
	return;
}

sts = ippiHistogram_8u_C1R((const Ipp8u *) image-&amp;gt;imageData, image-&amp;gt;widthStep, roi, pHistVec, pHistObj, pBuffer);
if(sts != ippStsNoErr)
{
	ippsFree( pHistObj );
	ippsFree( pBuffer );
	return;
}

std::stringstream ssTemp;
ssTemp &amp;lt;&amp;lt; "Hist: ";
for(int i=0; i &amp;lt; 256; i++) 
{
	ssTemp &amp;lt;&amp;lt; i &amp;lt;&amp;lt; " = " &amp;lt;&amp;lt; pHistVec&lt;I&gt; &amp;lt;&amp;lt; ",";
}
OutputDebugString((char *)ssTemp.str().c_str());&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;Kind regards&lt;BR /&gt;
	Dmitry&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 09:55:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiHistogram-8u-C1R-problem/m-p/1111394#M25422</guid>
      <dc:creator>Dmitry_V_1</dc:creator>
      <dc:date>2016-08-25T09:55:52Z</dc:date>
    </item>
    <item>
      <title>Hi ,I too am getting</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiHistogram-8u-C1R-problem/m-p/1111395#M25423</link>
      <description>&lt;P&gt;Hi ,I too am getting&amp;nbsp;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; background-color: rgb(248, 248, 248);"&gt;sizeBuffer = 0 from&amp;nbsp;ippiHistogramGetBufferSize&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 19:32:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiHistogram-8u-C1R-problem/m-p/1111395#M25423</guid>
      <dc:creator>MM_Leo</dc:creator>
      <dc:date>2018-04-25T19:32:30Z</dc:date>
    </item>
    <item>
      <title>The API is nuts (or at least</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiHistogram-8u-C1R-problem/m-p/1111396#M25424</link>
      <description>&lt;P&gt;The API is nuts (or at least counter-intuitive). For 256 histogram entries, you have to pass 257 as the nLevels parameter of &amp;nbsp;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13.008px; line-height: 14.3088px;"&gt;ippiHistogramUniformInit. This is for analogy with non-uniform histograms, but very tricky. The sample code in the documentation is wrong too.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13.008px; line-height: 14.3088px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13.008px; line-height: 14.3088px;"&gt;Adriaan van Os&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 06:05:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiHistogram-8u-C1R-problem/m-p/1111396#M25424</guid>
      <dc:creator>Adriaan_van_Os</dc:creator>
      <dc:date>2018-05-02T06:05:30Z</dc:date>
    </item>
  </channel>
</rss>

