<?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 ipp for dumies (as I am) ;) in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/spliting-any-image-int-its-planes/m-p/988115#M22005</link>
    <description>After the wise sugestion of Ying, I tried out ippiCopy_8u_C3P3R() and here is the result.&lt;BR /&gt;&lt;BR /&gt;I'm new to ipp and sometimes I find myself lost in the code. Here goes a simple example that uses ippi for all the operations and openCV for the display.&lt;BR /&gt;&lt;BR /&gt;This code was tested under Linux Fedora Core 3 (compiled with GCC ) and XP (compiled in Visual Studio 6).&lt;BR /&gt;&lt;BR /&gt;I found the original code for ipp and openCv mix in this forum. I don't remember who I got it from, but you can probably still find it here somewhere.&lt;BR /&gt;&lt;BR /&gt;Hope it helps someone!&lt;BR /&gt;&lt;BR /&gt;******************************************************************&lt;BR /&gt;&lt;BR /&gt;#include cv.h&amp;gt;&lt;BR /&gt;#include highgui.h&amp;gt;&lt;BR /&gt;#include ipp.h&amp;gt;&lt;BR /&gt;#include &lt;BR /&gt;#include &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;char name[] = "images/lena.jpg";&lt;BR /&gt;&lt;BR /&gt;// functions defined after main()&lt;BR /&gt;void openWindow_8u( Ipp8u *img, IppiSize size, int nChannels, char *name, int wait );&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;void main(void) {&lt;BR /&gt;&lt;BR /&gt;IppiSize size;&lt;BR /&gt;IplImage* img = NULL;&lt;BR /&gt;int stride, stride1;&lt;BR /&gt;&lt;BR /&gt;img = cvLoadImage( name, -1 );&lt;BR /&gt;&lt;BR /&gt;size.width = img-&amp;gt;width;&lt;BR /&gt;size.height = img-&amp;gt;height;&lt;BR /&gt;&lt;BR /&gt;Ipp8u *ipprgb = ippiMalloc_8u_C3(size.width, size.height, &amp;amp;stride);&lt;BR /&gt;Ipp8u *C1 = ippiMalloc_8u_C1(size.width, size.height, &amp;amp;stride1);&lt;BR /&gt;Ipp8u *C2 = ippiMalloc_8u_C1(size.width, size.height, &amp;amp;stride1);&lt;BR /&gt;Ipp8u *C3 = ippiMalloc_8u_C1(size.width, size.height, &amp;amp;stride1);&lt;BR /&gt;Ipp8u * Q[3] = {C1, C2, C3};&lt;BR /&gt;&lt;BR /&gt;ippiCopy_8u_C3R( img-&amp;gt;imageData, stride, ipprgb, stride, size );&lt;BR /&gt;ippiCopy_8u_C3P3R(img-&amp;gt;imageData, stride, Q, stride1, size);&lt;BR /&gt;&lt;BR /&gt;openWindow_8u( img-&amp;gt;imageData, size, 3, "24bit original", 0 );&lt;BR /&gt;openWindow_8u( C1, size, 1, "C1", 0 );&lt;BR /&gt;openWindow_8u( C2, size, 1, "C2", 0 );&lt;BR /&gt;openWindow_8u( C3, size, 1, "C3", 0 );&lt;BR /&gt;&lt;BR /&gt;cvWaitKey(0);&lt;BR /&gt;cvDestroyWindow( "24bit original" );&lt;BR /&gt;cvDestroyWindow( "C1" );&lt;BR /&gt;cvDestroyWindow( "C2" );&lt;BR /&gt;cvDestroyWindow( "C3" );&lt;BR /&gt;ippiFree( ipprgb ); // memory release with IPP&lt;BR /&gt;ippiFree( C1 );&lt;BR /&gt;ippiFree( C2 );&lt;BR /&gt;ippiFree( C3 );&lt;BR /&gt;cvReleaseImage( &amp;amp;img ); // memory release with OpenCV&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;// openWindow_8u used to display IPP images with OpenCV highgui&lt;BR /&gt;void openWindow_8u( Ipp8u *img, IppiSize size, int nChannels, char *name, int wait )&lt;BR /&gt;{&lt;BR /&gt;IplImage *cvImg;&lt;BR /&gt;CvSize sizeCv;&lt;BR /&gt;Ipp8u *tmp;&lt;BR /&gt;int line_type = CV_AA;&lt;BR /&gt;&lt;BR /&gt;sizeCv.width = size.width;&lt;BR /&gt;sizeCv.height = size.height;&lt;BR /&gt;&lt;BR /&gt;cvImg = cvCreateImage( sizeCv, IPL_DEPTH_8U, nChannels );&lt;BR /&gt;tmp = ippsMalloc_8u( size.width * size.height * nChannels );&lt;BR /&gt;if(nChannels == 3) ippiCopy_8u_C3R( img, size.width * nChannels, tmp, size.width * nChannels, size );&lt;BR /&gt;if(nChannels == 1) ippiCopy_8u_C3R( img, size.width * nChannels, tmp, size.width * nChannels, size );&lt;BR /&gt;cvSetData( cvImg, (void *) tmp, sizeCv.width * nChannels );&lt;BR /&gt;&lt;BR /&gt;cvNamedWindow( name, 1 );&lt;BR /&gt;cvShowImage( name, cvImg );&lt;BR /&gt;cvDestroyWindow( &amp;amp;cvImg );&lt;BR /&gt;}</description>
    <pubDate>Tue, 28 Jun 2005 23:34:36 GMT</pubDate>
    <dc:creator>amoreira</dc:creator>
    <dc:date>2005-06-28T23:34:36Z</dc:date>
    <item>
      <title>spliting any image int its planes</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/spliting-any-image-int-its-planes/m-p/988112#M22002</link>
      <description>Hello&lt;BR /&gt;&lt;BR /&gt;I need to split an RGB or HSV image into the diferent channels.&lt;BR /&gt;&lt;BR /&gt;In openCV I can do this with cvSplit. I "need" to work with the data  on each channel separatly. This can be implemented quite easily (the next step if there is no other way), but is there any function that can performe something like an ippiSplit_8u_C3CR?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;thanks in advance&lt;BR /&gt;Andr Moreira</description>
      <pubDate>Wed, 22 Jun 2005 22:07:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/spliting-any-image-int-its-planes/m-p/988112#M22002</guid>
      <dc:creator>amoreira</dc:creator>
      <dc:date>2005-06-22T22:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: spliting any image int its planes</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/spliting-any-image-int-its-planes/m-p/988113#M22003</link>
      <description>&lt;DIV&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy"&gt;&lt;NAMESPACE prefix="o" ns="urn:schemas-microsoft-com:office:office"&gt;&lt;P&gt;&lt;/P&gt;&lt;/NAMESPACE&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy"&gt;In ippi there are functions like ippiCopy_&amp;lt;&amp;gt;_C3P3R etc. that split the interleaved planes into separate ones,&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy"&gt;and there are ippiCopy_&amp;lt;&amp;gt;_P3C3R that do the opposite thing.&lt;BR /&gt;&lt;BR /&gt;Hope it helps.&lt;BR /&gt;Thanks,&lt;BR /&gt;Ying&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 24 Jun 2005 23:33:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/spliting-any-image-int-its-planes/m-p/988113#M22003</guid>
      <dc:creator>Ying_S_Intel</dc:creator>
      <dc:date>2005-06-24T23:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: spliting any image int its planes</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/spliting-any-image-int-its-planes/m-p/988114#M22004</link>
      <description>There is always a simple answer that I just don't see!&lt;BR /&gt;&lt;BR /&gt;I'm going to check it out, and you probably wont hear from me again ;) (on this topic at least!)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;best regards and thanks for the reply!</description>
      <pubDate>Tue, 28 Jun 2005 21:08:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/spliting-any-image-int-its-planes/m-p/988114#M22004</guid>
      <dc:creator>amoreira</dc:creator>
      <dc:date>2005-06-28T21:08:23Z</dc:date>
    </item>
    <item>
      <title>ipp for dumies (as I am) ;)</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/spliting-any-image-int-its-planes/m-p/988115#M22005</link>
      <description>After the wise sugestion of Ying, I tried out ippiCopy_8u_C3P3R() and here is the result.&lt;BR /&gt;&lt;BR /&gt;I'm new to ipp and sometimes I find myself lost in the code. Here goes a simple example that uses ippi for all the operations and openCV for the display.&lt;BR /&gt;&lt;BR /&gt;This code was tested under Linux Fedora Core 3 (compiled with GCC ) and XP (compiled in Visual Studio 6).&lt;BR /&gt;&lt;BR /&gt;I found the original code for ipp and openCv mix in this forum. I don't remember who I got it from, but you can probably still find it here somewhere.&lt;BR /&gt;&lt;BR /&gt;Hope it helps someone!&lt;BR /&gt;&lt;BR /&gt;******************************************************************&lt;BR /&gt;&lt;BR /&gt;#include cv.h&amp;gt;&lt;BR /&gt;#include highgui.h&amp;gt;&lt;BR /&gt;#include ipp.h&amp;gt;&lt;BR /&gt;#include &lt;BR /&gt;#include &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;char name[] = "images/lena.jpg";&lt;BR /&gt;&lt;BR /&gt;// functions defined after main()&lt;BR /&gt;void openWindow_8u( Ipp8u *img, IppiSize size, int nChannels, char *name, int wait );&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;void main(void) {&lt;BR /&gt;&lt;BR /&gt;IppiSize size;&lt;BR /&gt;IplImage* img = NULL;&lt;BR /&gt;int stride, stride1;&lt;BR /&gt;&lt;BR /&gt;img = cvLoadImage( name, -1 );&lt;BR /&gt;&lt;BR /&gt;size.width = img-&amp;gt;width;&lt;BR /&gt;size.height = img-&amp;gt;height;&lt;BR /&gt;&lt;BR /&gt;Ipp8u *ipprgb = ippiMalloc_8u_C3(size.width, size.height, &amp;amp;stride);&lt;BR /&gt;Ipp8u *C1 = ippiMalloc_8u_C1(size.width, size.height, &amp;amp;stride1);&lt;BR /&gt;Ipp8u *C2 = ippiMalloc_8u_C1(size.width, size.height, &amp;amp;stride1);&lt;BR /&gt;Ipp8u *C3 = ippiMalloc_8u_C1(size.width, size.height, &amp;amp;stride1);&lt;BR /&gt;Ipp8u * Q[3] = {C1, C2, C3};&lt;BR /&gt;&lt;BR /&gt;ippiCopy_8u_C3R( img-&amp;gt;imageData, stride, ipprgb, stride, size );&lt;BR /&gt;ippiCopy_8u_C3P3R(img-&amp;gt;imageData, stride, Q, stride1, size);&lt;BR /&gt;&lt;BR /&gt;openWindow_8u( img-&amp;gt;imageData, size, 3, "24bit original", 0 );&lt;BR /&gt;openWindow_8u( C1, size, 1, "C1", 0 );&lt;BR /&gt;openWindow_8u( C2, size, 1, "C2", 0 );&lt;BR /&gt;openWindow_8u( C3, size, 1, "C3", 0 );&lt;BR /&gt;&lt;BR /&gt;cvWaitKey(0);&lt;BR /&gt;cvDestroyWindow( "24bit original" );&lt;BR /&gt;cvDestroyWindow( "C1" );&lt;BR /&gt;cvDestroyWindow( "C2" );&lt;BR /&gt;cvDestroyWindow( "C3" );&lt;BR /&gt;ippiFree( ipprgb ); // memory release with IPP&lt;BR /&gt;ippiFree( C1 );&lt;BR /&gt;ippiFree( C2 );&lt;BR /&gt;ippiFree( C3 );&lt;BR /&gt;cvReleaseImage( &amp;amp;img ); // memory release with OpenCV&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;// openWindow_8u used to display IPP images with OpenCV highgui&lt;BR /&gt;void openWindow_8u( Ipp8u *img, IppiSize size, int nChannels, char *name, int wait )&lt;BR /&gt;{&lt;BR /&gt;IplImage *cvImg;&lt;BR /&gt;CvSize sizeCv;&lt;BR /&gt;Ipp8u *tmp;&lt;BR /&gt;int line_type = CV_AA;&lt;BR /&gt;&lt;BR /&gt;sizeCv.width = size.width;&lt;BR /&gt;sizeCv.height = size.height;&lt;BR /&gt;&lt;BR /&gt;cvImg = cvCreateImage( sizeCv, IPL_DEPTH_8U, nChannels );&lt;BR /&gt;tmp = ippsMalloc_8u( size.width * size.height * nChannels );&lt;BR /&gt;if(nChannels == 3) ippiCopy_8u_C3R( img, size.width * nChannels, tmp, size.width * nChannels, size );&lt;BR /&gt;if(nChannels == 1) ippiCopy_8u_C3R( img, size.width * nChannels, tmp, size.width * nChannels, size );&lt;BR /&gt;cvSetData( cvImg, (void *) tmp, sizeCv.width * nChannels );&lt;BR /&gt;&lt;BR /&gt;cvNamedWindow( name, 1 );&lt;BR /&gt;cvShowImage( name, cvImg );&lt;BR /&gt;cvDestroyWindow( &amp;amp;cvImg );&lt;BR /&gt;}</description>
      <pubDate>Tue, 28 Jun 2005 23:34:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/spliting-any-image-int-its-planes/m-p/988115#M22005</guid>
      <dc:creator>amoreira</dc:creator>
      <dc:date>2005-06-28T23:34:36Z</dc:date>
    </item>
  </channel>
</rss>

