<?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 Rajendra, in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956095#M19105</link>
    <description>&lt;P&gt;Hi Rajendra,&lt;/P&gt;
&lt;P&gt;As i undstand, whatever the wrapper class&amp;nbsp;is, the key is&amp;nbsp;the block of successive data memory, where image are stored.&amp;nbsp; So you should be able to do this by either pass the pointer of data or copy the data to corresponding parameter.&lt;/P&gt;
&lt;P&gt;I happened find one piece code in my machine&amp;nbsp;to do the conversion between IplImage to CippiImage as below, for your reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;IplImage* img = NULL;&lt;/P&gt;
&lt;P&gt;img = cvLoadImage(argv[1], CV_LOAD_IMAGE_COLOR);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!img)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Could not load image file: %s\n", argv[1]);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(0);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //convert src IplImage to CIppImage&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CIppImage srcImage;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //set elements of srcImage&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.Width(img-&amp;gt;width);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.Height(img-&amp;gt;height);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.Color(IC_RGB);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.Format(IF_FIXED);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.Sampling(IS_422);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.ComponentOrder(0);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.NChannels(img-&amp;gt;nChannels);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.Precision(img-&amp;gt;depth);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;srcImage.DataPtr(img-&amp;gt;imageData&lt;/STRONG&gt;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps,&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ying&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jun 2013 08:27:28 GMT</pubDate>
    <dc:creator>Ying_H_Intel</dc:creator>
    <dc:date>2013-06-06T08:27:28Z</dc:date>
    <item>
      <title>Using IPP with OpenCV</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956088#M19098</link>
      <description>&lt;P&gt;I have been using OpenCV (without IPP) for some time. I understand that OpenCV calls the IPP functions automatically if available. In that case, if I'm interested only in image-processing, do I need to know IPP syntax at all? I mean, will using the IPP syntax (such as the Ipp8u structure) have any advantages at all? Or can I simply continue writing the OpenCV code that I already know, and install and link the IPP libraries to get full advantage?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2005 11:54:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956088#M19098</guid>
      <dc:creator>adityar7</dc:creator>
      <dc:date>2005-12-22T11:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using IPP with OpenCV</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956089#M19099</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;OpenCV does not use all the functions you can find in IPP. So, of course you should be interested in using IPP directly (in addition to OpenCV native API). Remember, IPP image processing domain contains about 2500 functions (and only small subset of them are used by OpenCV)!&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Dec 2005 02:53:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956089#M19099</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2005-12-23T02:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using IPP with OpenCV</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956090#M19100</link>
      <description>Vladimir,&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply. The question then becomes, when do I use OpenCV functions and when do I use the IPP ones? I'm sure the answer must be simple, I just can't think of it!&lt;BR /&gt;&lt;BR /&gt;I saw a couple of tutorials explaining the use of OpenCV with IPP. One of them says that native IPP functions should be used for the processing, while OpenCV needs to be used for displaying the results. But to me it doesn't make sense to use a large library like OpenCV just to display the results.&lt;BR /&gt;&lt;BR /&gt;How do I know which library to use in every situation?&lt;BR /&gt;&lt;BR /&gt;-Aditya</description>
      <pubDate>Fri, 23 Dec 2005 06:13:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956090#M19100</guid>
      <dc:creator>adityar7</dc:creator>
      <dc:date>2005-12-23T06:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using IPP with OpenCV</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956091#M19101</link>
      <description>&lt;P&gt;Aditya,&lt;/P&gt;
&lt;P&gt;OpenCV uses IPP functions automatically ifIPP is installed (see INSTALL file from OpenCV root directory). Not all OpenCV functions have corresponding optimized analogues in IPP. The same, IPP contains more functions that is necessary to support OpenCV.&lt;/P&gt;
&lt;P&gt;So, if you are comfortable with OpenCV features and data types you need notcall IPP functions directly. Some overhead exists but it is not big. &lt;/P&gt;
&lt;P&gt;IPP is low level library that contains highly optimized functions and supports a lot of platforms. OpenCV is higher level open source library that oriented rather to research &amp;amp; development.&lt;/P&gt;
&lt;P&gt;Alexander&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Dec 2005 16:00:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956091#M19101</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2005-12-23T16:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using IPP with OpenCV</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956092#M19102</link>
      <description>I created a couple of small programs using IPP functions. It seems that the answer to my question of which library's (OpenCV or IPP) functions to use in which situation would be that whenever I need a function that is present only in IPP (and not in OpenCV) I simply convert the required arguments to IPP data types and call the IPP function, then convert the result back to OpenCV data type. Is that correct?&lt;BR /&gt;&lt;BR /&gt;One more thing: OpenCV calls the IPP functions automatically whenever possible. But the data types for the equivalent functions are still different for OpenCV and IPP (for example the OpenCV function may require IplImage while the equivalent IPP function would require Ipp8u etc.). In that case, when OpenCV calls the IPP automatically, does it do all this conversion automatically?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Aditya</description>
      <pubDate>Fri, 23 Dec 2005 16:37:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956092#M19102</guid>
      <dc:creator>adityar7</dc:creator>
      <dc:date>2005-12-23T16:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using IPP with OpenCV</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956093#M19103</link>
      <description>&lt;P&gt;Aditya,&lt;/P&gt;
&lt;P&gt;OpenCV is high-level library and IPP is low-level library. Image described in OpenCV as IplImage structure somewhere inside contains pointer to Ipp8u* data which you can use in IPP function call. If it is conversion that you are mentioned - yes, such conversion is necessary.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 24 Dec 2005 03:14:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956093#M19103</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2005-12-24T03:14:18Z</dc:date>
    </item>
    <item>
      <title>I wanted to detect face from</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956094#M19104</link>
      <description>&lt;P&gt;I wanted to detect face from a web camera. I found an example of face detection in samples folder.But they have provided a wrapper class called as CIppiImage . I am retriving frame using open cv,so I am not able to figure out that How I will be able to convert Mat Image or IplImage to the type of CIppiImage.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2013 09:28:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956094#M19104</guid>
      <dc:creator>Rajendra_S_</dc:creator>
      <dc:date>2013-06-03T09:28:22Z</dc:date>
    </item>
    <item>
      <title>Hi Rajendra,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956095#M19105</link>
      <description>&lt;P&gt;Hi Rajendra,&lt;/P&gt;
&lt;P&gt;As i undstand, whatever the wrapper class&amp;nbsp;is, the key is&amp;nbsp;the block of successive data memory, where image are stored.&amp;nbsp; So you should be able to do this by either pass the pointer of data or copy the data to corresponding parameter.&lt;/P&gt;
&lt;P&gt;I happened find one piece code in my machine&amp;nbsp;to do the conversion between IplImage to CippiImage as below, for your reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;IplImage* img = NULL;&lt;/P&gt;
&lt;P&gt;img = cvLoadImage(argv[1], CV_LOAD_IMAGE_COLOR);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!img)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Could not load image file: %s\n", argv[1]);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(0);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //convert src IplImage to CIppImage&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CIppImage srcImage;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //set elements of srcImage&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.Width(img-&amp;gt;width);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.Height(img-&amp;gt;height);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.Color(IC_RGB);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.Format(IF_FIXED);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.Sampling(IS_422);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.ComponentOrder(0);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.NChannels(img-&amp;gt;nChannels);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srcImage.Precision(img-&amp;gt;depth);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;srcImage.DataPtr(img-&amp;gt;imageData&lt;/STRONG&gt;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps,&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2013 08:27:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956095#M19105</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2013-06-06T08:27:28Z</dc:date>
    </item>
    <item>
      <title>Hello Zing,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956096#M19106</link>
      <description>&lt;P&gt;Hello Zing,&lt;/P&gt;
&lt;P&gt;Really appreciate for your help.&lt;/P&gt;
&lt;P&gt;However there are few issues in the code given by you for conversion of IPlImage* to CIppImage. I am sending you the definition of CIppImage class so that you can guide me accordingly.&lt;/P&gt;
&lt;P&gt;class CIppiImage : public CImgHeader&lt;BR /&gt;{&lt;BR /&gt;public:&lt;BR /&gt;CIppiImage();&lt;BR /&gt;CIppiImage(const CIppiImage&amp;amp; img);&lt;BR /&gt;virtual ~CIppiImage();&lt;BR /&gt;CIppiImage&amp;amp; operator =(const CIppiImage&amp;amp; image);&lt;/P&gt;
&lt;P&gt;// General Operations&lt;BR /&gt;// Set image header and allocate data&lt;BR /&gt;BOOL CreateImage(int width, int height, int nChannels = 3, ppType type = pp8u, BOOL bPlane = FALSE);&lt;BR /&gt;BOOL CreateImage(CImgHeader header);&lt;BR /&gt;// Load image from bmp file&lt;BR /&gt;BOOL LoadImage(CFile* pFile);&lt;BR /&gt;// Save image to bmp file&lt;BR /&gt;BOOL SaveImage(CFile* pFile);&lt;BR /&gt;// Reset image size&lt;BR /&gt;BOOL SetSize(int width, int height);&lt;/P&gt;
&lt;P&gt;// Attributes&lt;BR /&gt;// Get image header&lt;BR /&gt;CImgHeader GetHeader() const { return *(CImgHeader*)this;}&lt;BR /&gt;// Get pointer to data&lt;BR /&gt;void* DataPtr();&lt;BR /&gt;// Get image size&lt;BR /&gt;IppiSize Size() const { IppiSize size = {Width(), Height()}; return size;}&lt;BR /&gt;// Get scanline size in bytes&lt;BR /&gt;int Step() const;&lt;BR /&gt;// Get data size in bytes&lt;BR /&gt;int DataSize() const;&lt;BR /&gt;// Get image width&lt;BR /&gt;int Width() const { return m_width;}&lt;BR /&gt;// Get image height&lt;BR /&gt;int Height() const { return m_height;}&lt;BR /&gt;// Get number of image channels&lt;BR /&gt;int Channels() const { return m_channels;}&lt;BR /&gt;// Get plane order flag&lt;BR /&gt;BOOL Plane() const { return m_plane;}&lt;BR /&gt;// Get data type&lt;BR /&gt;ppType Type() const { return m_type;}&lt;BR /&gt;// Get size of data element in bits&lt;BR /&gt;int Depth() const { return m_type &amp;amp; PP_MASK;}&lt;BR /&gt;// Get signed data flag&lt;BR /&gt;BOOL Sign() const { return m_type &amp;amp; PP_SIGN ? TRUE : FALSE;}&lt;BR /&gt;// Get float data flag&lt;BR /&gt;BOOL Float() const { return m_type &amp;amp; PP_FLOAT ? TRUE : FALSE;}&lt;BR /&gt;// Get complex data flag&lt;BR /&gt;BOOL Complex() const { return m_type &amp;amp; PP_CPLX ? TRUE : FALSE;}&lt;BR /&gt;// Get string with data type description&lt;BR /&gt;CString TypeString() const;&lt;BR /&gt;// Get string with channels and plane description&lt;BR /&gt;CString ChannelString() const;&lt;BR /&gt;// Set data changed / unchanged flag&lt;BR /&gt;// This flag must be set to TRUE if data has been changed&lt;BR /&gt;// Then CView::OnDraw function will update bitmap and &lt;BR /&gt;// set this flag to FALSE&lt;BR /&gt;void IsUpdated(BOOL updated) {m_Updated = updated;}&lt;BR /&gt;// Get data changed / unchanged flag&lt;BR /&gt;// Used by CView::OnDraw function&lt;BR /&gt;BOOL IsUpdated() const {return m_Updated;}&lt;BR /&gt;protected:&lt;BR /&gt;void* m_pData;&lt;BR /&gt;BOOL m_Updated;&lt;BR /&gt;void Reset();&lt;BR /&gt;void AllocateData();&lt;BR /&gt;void FreeData();&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;You can easily visualize that CIppImage height,width or get data function doesn't take parameter .&lt;/P&gt;
&lt;P&gt;CIppImage class also does not contain function like sampling,format,color.&lt;/P&gt;
&lt;P&gt;The identifiers IS_422,IF_FIXED is also not recognized by compiler.&lt;/P&gt;
&lt;P&gt;Please check and guide accordingly.\&lt;/P&gt;
&lt;P&gt;Thanks in advance,&lt;/P&gt;
&lt;P&gt;Raj&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2013 10:15:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956096#M19106</guid>
      <dc:creator>Rajendra_S_</dc:creator>
      <dc:date>2013-06-07T10:15:40Z</dc:date>
    </item>
    <item>
      <title>Hi Raj,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956097#M19107</link>
      <description>&lt;P&gt;Hi Raj,&lt;/P&gt;
&lt;P&gt;As far as I see, you base your code on IPP face detection sample (i.e. on its CIppiImage class). Unfortunately, there is no easy way from OpenCV's IplImage to that CIppiImage object. You need to create a new CIppiImage constructor, which takes, for example, (const IplImage*) argument). In this constructor you need to copy wight/height/type fields from IplImage. You need to rewrite data allocation/freeing code in CIppiImage class in order not to deallocate alien's buffer. Something needs to be done with Step() function, its code is too bad.&lt;/P&gt;
&lt;P&gt;May be the easier way could be:&lt;BR /&gt;&amp;nbsp; &amp;nbsp;take FaceDetection sample or cut'n'paste whatever you want from FaceDetection to your application,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;substitute CIppiImage class with IpiImage class from OpenCV,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;compile the result source code.&lt;BR /&gt;You'll get lot of compilation errors. Eliminate them one-by-one by substitution methods from CIppiImage with data members from IplImage. For example, the compiler will say that 'IplImage has no Width() method'. Just substitute the code from, say&lt;BR /&gt;&amp;nbsp; src-&amp;gt;Width()&lt;BR /&gt;to&lt;BR /&gt;&amp;nbsp; src-&amp;gt;width&lt;BR /&gt;And so on. Hopefully, you will find &amp;nbsp;OpenCV's equivalents for all CIppiImage member functions.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Sergey&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2013 12:36:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956097#M19107</guid>
      <dc:creator>Sergey_K_Intel</dc:creator>
      <dc:date>2013-06-10T12:36:57Z</dc:date>
    </item>
    <item>
      <title>Hi Raj,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956098#M19108</link>
      <description>&lt;P&gt;Hi Raj,&lt;/P&gt;
&lt;P&gt;I guess, you have move forward about the convertion.&amp;nbsp; Just summarize again so other user may&amp;nbsp;use&lt;/P&gt;
&lt;P&gt;There are two CIppiImage in IPP, one in image Proc, one in UIC sample.&amp;nbsp; I mentioned last time is the latter&lt;/P&gt;
&lt;P&gt;All of them, include &amp;nbsp;IplImage in OpenCV&amp;nbsp; are almost&amp;nbsp;from the IPL.&amp;nbsp; Each of them have part of them. You can align them by change the member&amp;nbsp;or member functions.&amp;nbsp;&amp;nbsp; But it is actually not too complex to&amp;nbsp;align the&amp;nbsp;class of CIppiImage in IPP and IplImage of OpenCV.&lt;/P&gt;
&lt;P&gt;1. For example, if for IPP function, we can feed the IpLImage pointer dierctly, (don't need conversion),&amp;nbsp; &lt;BR /&gt;IplImage* pSrcImg = cvLoadImage( "testing.bmp", 1 ); &amp;nbsp;&lt;BR /&gt;ippiResize_8u_C3R((Ipp8u*) pSrcImg-&amp;gt;imageData,&amp;nbsp; pSrcImg-&amp;gt;widthStep...).&lt;/P&gt;
&lt;P&gt;2. But if you need to do the conversion,&lt;/P&gt;
&lt;P&gt;CIippImage in imagProc sample&amp;nbsp; &amp;lt;&amp;gt; IplImage&lt;/P&gt;
&lt;P&gt;the code like,&lt;/P&gt;
&lt;P&gt;IplImage * frame2=cvQueryFrame(cap); &lt;BR /&gt;&amp;nbsp;IppiSize size;&lt;BR /&gt;&amp;nbsp;size.width = frame2-&amp;gt;width; // size of IPP images is the same&lt;BR /&gt;&amp;nbsp;size.height = frame2-&amp;gt;height;&lt;BR /&gt;&amp;nbsp;int imgWidthStep=frame2-&amp;gt;widthStep;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;CIppiImage *tmpimg=new CIppiImage();&lt;BR /&gt;&amp;nbsp;tmpimg-&amp;gt;CreateImage(frame2-&amp;gt;width,frame2-&amp;gt;height,3,pp8u);&lt;/P&gt;
&lt;P&gt;//convert CIppImage, IplImage&amp;lt;-&amp;gt; &lt;BR /&gt;&amp;nbsp;ret=ippiCopy_8u_C3R((const Ipp8u*)frame2,frame2-&amp;gt;widthStep,(Ipp8u*)tmpimg-&amp;gt;DataPtr(),tmpimg-&amp;gt;Step(),size);&lt;BR /&gt;//vice-versa&lt;/P&gt;
&lt;P&gt;2.1&amp;nbsp;Another issue,&amp;nbsp;as&amp;nbsp;&amp;nbsp;&amp;nbsp;bmp image was stored in reversed order, so the copy should be like the below&lt;/P&gt;
&lt;P&gt;IplImage* frame2 = cvLoadImage( originalfile, 1 );&lt;BR /&gt;&amp;nbsp;//&amp;nbsp;IplImage * frame2=cvQueryFrame(cap); &lt;BR /&gt;&amp;nbsp;IppiSize size;&lt;BR /&gt;&amp;nbsp;size.width = frame2-&amp;gt;width; // size of IPP images is the same&lt;BR /&gt;&amp;nbsp;size.height = frame2-&amp;gt;height;&lt;BR /&gt;&amp;nbsp;int imgWidthStep=frame2-&amp;gt;widthStep;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;srcld-&amp;gt;CreateImage(frame2-&amp;gt;width,frame2-&amp;gt;height,3,pp8u);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;Ipp8u* pSrc=(Ipp8u*)srcld-&amp;gt;DataPtr()+srcld-&amp;gt;Step()*(srcld-&amp;gt;Height()-1);&lt;BR /&gt;&amp;nbsp;ret=ippiCopy_8u_C3R((const Ipp8u*)frame2-&amp;gt;imageData,frame2-&amp;gt;widthStep,pSrc,-1*srcld-&amp;gt;Step(),size);&lt;/P&gt;
&lt;P&gt;and copy back&lt;/P&gt;
&lt;P&gt;IplImage* pDstImgIPP = cvCreateImage( cvSize(dst-&amp;gt;Width(),dst-&amp;gt;Height() ), dst-&amp;gt;Depth(),dst-&amp;gt;Channels());&lt;BR /&gt;&amp;nbsp;Ipp8u* tmpI= (Ipp8u*)dst-&amp;gt;DataPtr()+ dst-&amp;gt;Step()* (dst-&amp;gt;Height()-1);&lt;/P&gt;
&lt;P&gt;ret=ippiCopy_8u_C3R((const Ipp8u*)tmpI,-dst-&amp;gt;Step(),(Ipp8u*)pDstImgIPP-&amp;gt;imageData,pDstImgIPP-&amp;gt;widthStep,size);&lt;/P&gt;
&lt;P&gt;3. CIppImage in UIC sample &amp;lt;&amp;gt; IplIimage ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If use the pointer instead of data copy&lt;/P&gt;
&lt;P&gt;cap = cvCaptureFromCAM(0);&lt;BR /&gt;IplImage * img=cvQueryFrame(cap);&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;CIppImage srcImage;&lt;BR /&gt;&amp;nbsp;srcImage.Attach(size,3,8,img-&amp;gt;imageData,img-&amp;gt;widthStep);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;CIppImage dstImage;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int ret;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ret = dstImage.Alloc(srcImage.Size(),srcImage.NChannels(),srcImage.Precision());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(0 != ret) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return -1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //detect face&lt;BR /&gt;&amp;nbsp;&amp;nbsp; facedetection_filter(srcImage, params, dstImage);&lt;/P&gt;
&lt;P&gt;IplImage dstImg;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; memset((void*)&amp;amp;dstImg, 0, sizeof(dstImg));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dstImg.nSize = sizeof(dstImg);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dstImg.nChannels = dstImage.NChannels();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dstImg.depth = dstImage.Precision();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strcpy(dstImg.colorModel, "RGB");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strcpy(dstImg.channelSeq, "BGR");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dstImg.align = 4; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dstImg.width = dstImage.Width();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dstImg.height = dstImage.Height();&lt;BR /&gt;&amp;nbsp;dstImg.widthStep = dstImage.Step();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dstImg.imageSize = dstImg.widthStep*dstImg.height; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dstImg.imageData = (char*)dstImage.DataPtr();&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2013 03:01:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-IPP-with-OpenCV/m-p/956098#M19108</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2013-06-13T03:01:19Z</dc:date>
    </item>
  </channel>
</rss>

