<?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. in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Convert-IplImage-to-CIppImage/m-p/1017161#M23473</link>
    <description>&lt;P&gt;&amp;nbsp;Hi.&amp;nbsp;&lt;A href="https://software.intel.com/en-us/user/440065?language=es"&gt;Sergey Khlystov&amp;nbsp;&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;Thank you for your response.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;I currently try to convert bmp image type to jpg image type using the IplImage and CIppImage.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;So, first,&amp;nbsp;loading&amp;nbsp;xxx.bmp image using the "&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;cvLoadImage&lt;/SPAN&gt;".&lt;/P&gt;

&lt;P&gt;&amp;nbsp;Second, converting IplImage to CIppImage.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;Finally, saving xxx.jpg image using the "CIppImage"&lt;/P&gt;

&lt;P&gt;&amp;nbsp;But, it don't make the xxx.jpg file. Clicking the Image file, i can see the message "The file is empty, you can not display this photo" &amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;I think it is a image type converting issue.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;Thanks in advance your help.&lt;/P&gt;</description>
    <pubDate>Mon, 19 May 2014 00:50:00 GMT</pubDate>
    <dc:creator>Changbu_Jeong</dc:creator>
    <dc:date>2014-05-19T00:50:00Z</dc:date>
    <item>
      <title>Convert IplImage to CIppImage</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Convert-IplImage-to-CIppImage/m-p/1017159#M23471</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;Hi~&lt;/P&gt;

&lt;P&gt;&amp;nbsp;I currently use the UIC sample code.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;I want to convert IplImage to CIppImage. and to save *.jpg using the CIppImage type.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;So, i try to convert, but i can't save to *.jpg.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;For example, My sample code is&lt;/P&gt;

&lt;P&gt;/////////////////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; CIppImage &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;IM_TYPE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fmtIn;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;IM_TYPE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fmtOut;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;Ipp8u* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;buf;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;CStdFileOutput &amp;nbsp;fo;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;CMemBuffOutput &amp;nbsp;mo;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;fmtOut = IT_BMP;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;fo.Open(cmdOptions.dst);&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;IplImage *img = cvLoadImage(cmdOptions.src,CV_LOAD_IMAGE_GRAYSCALE);&lt;BR /&gt;
	//&amp;nbsp;&amp;nbsp; &amp;nbsp;cvShowImage("test",cmdOptions.src);&lt;/P&gt;

&lt;P&gt;//&amp;nbsp;&amp;nbsp; &amp;nbsp;cvSaveImage(cmdOptions.dst,img);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;image.Width(img-&amp;gt;width);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;image.Height(img-&amp;gt;height);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;image.Color(IC_GRAY);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;image.Format(IF_FIXED);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;image.Sampling(IS_444);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;image.ComponentOrder(0);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;image.NChannels(img-&amp;gt;nChannels);&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;image.Precision(img-&amp;gt;depth);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;image.Step(4096);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;image.DataPtr((Ipp8u*)img-&amp;gt;imageData);&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// Encoder&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;BaseStream::TPosition pos = 0; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;size = image.Step()*image.Height()*2;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;buf = (Ipp8u*)ippMalloc((int)size);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;mo.Open(buf, (int)size);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;res = EncodeImage(image, mo, cmdOptions, fmtOut, &amp;amp;encTime);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;mo.Position(pos);&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;mo.Close();&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;fo.Write(buf, pos, cnt);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;ippFree(buf);&lt;/P&gt;

&lt;P&gt;///////////////////////////////////////////////////////////////////////////////////////////////////////&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Thanks in advance for your help!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2014 07:04:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Convert-IplImage-to-CIppImage/m-p/1017159#M23471</guid>
      <dc:creator>Changbu_Jeong</dc:creator>
      <dc:date>2014-05-16T07:04:16Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Convert-IplImage-to-CIppImage/m-p/1017160#M23472</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am preparing a test workspace for this. Meanwhile could you explain&amp;nbsp;what is&amp;nbsp;"can't save to *jpg"? The output file is broken? Any exception?&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2014 14:39:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Convert-IplImage-to-CIppImage/m-p/1017160#M23472</guid>
      <dc:creator>Sergey_K_Intel</dc:creator>
      <dc:date>2014-05-16T14:39:27Z</dc:date>
    </item>
    <item>
      <title> Hi.</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Convert-IplImage-to-CIppImage/m-p/1017161#M23473</link>
      <description>&lt;P&gt;&amp;nbsp;Hi.&amp;nbsp;&lt;A href="https://software.intel.com/en-us/user/440065?language=es"&gt;Sergey Khlystov&amp;nbsp;&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;Thank you for your response.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;I currently try to convert bmp image type to jpg image type using the IplImage and CIppImage.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;So, first,&amp;nbsp;loading&amp;nbsp;xxx.bmp image using the "&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;cvLoadImage&lt;/SPAN&gt;".&lt;/P&gt;

&lt;P&gt;&amp;nbsp;Second, converting IplImage to CIppImage.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;Finally, saving xxx.jpg image using the "CIppImage"&lt;/P&gt;

&lt;P&gt;&amp;nbsp;But, it don't make the xxx.jpg file. Clicking the Image file, i can see the message "The file is empty, you can not display this photo" &amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;I think it is a image type converting issue.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;Thanks in advance your help.&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2014 00:50:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Convert-IplImage-to-CIppImage/m-p/1017161#M23473</guid>
      <dc:creator>Changbu_Jeong</dc:creator>
      <dc:date>2014-05-19T00:50:00Z</dc:date>
    </item>
    <item>
      <title>I propose do that using the</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Convert-IplImage-to-CIppImage/m-p/1017162#M23474</link>
      <description>&lt;P&gt;I propose do that using the following code:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;/////////////////////////////////////////////////////////////////////////////////////////////

	fmtOut = IT_JPEG;
	fo.Open(cmdOptions.dst);
	IplImage *img = cvLoadImage(cmdOptions.src,CV_LOAD_IMAGE_GRAYSCALE);

	image.Attach(img-&amp;gt;width, img-&amp;gt;height, img-&amp;gt;nChannels, img-&amp;gt;depth, img-&amp;gt;imageData, img-&amp;gt;widthStep);
	image.Color(IC_GRAY);

    // Encoder
	BaseStream::TPosition pos = 0;  
	size = image.Step()*image.Height()*2;
	buf = (Ipp8u*)ippMalloc((int)size);
	mo.Open(buf, (int)size);
	res = EncodeImage(image, mo, cmdOptions, fmtOut, &amp;amp;encTime);
	mo.Position(pos);    

    mo.Close();
	fo.Write(buf, pos, cnt);

ippFree(buf);

///////////////////////////////////////////////////////////////////////////////////////////////////////
&lt;/PRE&gt;

&lt;P&gt;Should work.&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2014 09:26:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Convert-IplImage-to-CIppImage/m-p/1017162#M23474</guid>
      <dc:creator>Sergey_K_Intel</dc:creator>
      <dc:date>2014-05-19T09:26:30Z</dc:date>
    </item>
  </channel>
</rss>

