<?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 Re: Anyone successfully converted a Firewire camera image? in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933505#M16956</link>
    <description>The fact that OpenCV uses BGR, IPP usually uses RGB, IPP uses a different pixel order with the YUV422 than firewire cameras (UY), can get very confusing, but finnaly I managed to get it working.&lt;BR /&gt;&lt;BR /&gt;Sorry for the trouble and thanks for the help anyway.&lt;BR /&gt;&lt;BR /&gt;Cheers.&lt;BR /&gt;&lt;BR /&gt;Hugo</description>
    <pubDate>Wed, 20 Oct 2004 19:52:52 GMT</pubDate>
    <dc:creator>hcostelha</dc:creator>
    <dc:date>2004-10-20T19:52:52Z</dc:date>
    <item>
      <title>Anyone successfully converted a Firewire camera image?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933502#M16953</link>
      <description>I'm trying to convert an image in the format YUV422 given by a firewire camera to an RGB image, but unsuccessfull. No matter what I do I always get a very weird image.&lt;BR /&gt;&lt;BR /&gt;I'm not sure which step to use, but I think that for an image width 320x240 the YUV422 image step would be 640, right?&lt;BR /&gt;&lt;BR /&gt;This is what I do:&lt;BR /&gt;&lt;BR /&gt;imgSize.width = 320;&lt;BR /&gt;imgSize.height = 240;&lt;BR /&gt;&lt;BR /&gt;rgbImg = ippiMalloc_8u_C3( 320, 240, &amp;amp;step );&lt;BR /&gt;ippiYUV422ToRGB_8u_C2C3R( img, 640, rgbImg, &lt;BR /&gt;                          step, imgSize );&lt;BR /&gt;&lt;BR /&gt;Thanks in advanced for any help.&lt;BR /&gt;&lt;BR /&gt;Hugo</description>
      <pubDate>Sat, 16 Oct 2004 06:24:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933502#M16953</guid>
      <dc:creator>hcostelha</dc:creator>
      <dc:date>2004-10-16T06:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone successfully converted a Firewire camera image?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933503#M16954</link>
      <description>I also tryed using the function ippiUYToYU422_8u_C2R firts to change the order in wich in wich values appear, but still with no success.</description>
      <pubDate>Sun, 17 Oct 2004 01:04:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933503#M16954</guid>
      <dc:creator>hcostelha</dc:creator>
      <dc:date>2004-10-17T01:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone successfully converted a Firewire camera image?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933504#M16955</link>
      <description>&lt;DIV&gt;Hi,&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;do you know exactly format of data you got from your camera?&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Regards,&lt;/DIV&gt;
&lt;DIV&gt; Vladimir&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Oct 2004 19:36:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933504#M16955</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2004-10-20T19:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone successfully converted a Firewire camera image?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933505#M16956</link>
      <description>The fact that OpenCV uses BGR, IPP usually uses RGB, IPP uses a different pixel order with the YUV422 than firewire cameras (UY), can get very confusing, but finnaly I managed to get it working.&lt;BR /&gt;&lt;BR /&gt;Sorry for the trouble and thanks for the help anyway.&lt;BR /&gt;&lt;BR /&gt;Cheers.&lt;BR /&gt;&lt;BR /&gt;Hugo</description>
      <pubDate>Wed, 20 Oct 2004 19:52:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933505#M16956</guid>
      <dc:creator>hcostelha</dc:creator>
      <dc:date>2004-10-20T19:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone successfully converted a Firewire camera image?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933506#M16957</link>
      <description>&lt;DIV&gt;Oh, that's great that youfind solution. If it is IPP based, could you please share here you experience, it may help other people. And even if it is not IPP based it will be useful for us to know what we can improve or extend in IPP functionality.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Thanks,&lt;/DIV&gt;
&lt;DIV&gt; Vladimir&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Oct 2004 19:57:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933506#M16957</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2004-10-20T19:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone successfully converted a Firewire camera image?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933507#M16958</link>
      <description>Sure,&lt;BR /&gt;&lt;BR /&gt;In my program, besides 24-bit RGB images, I also need to use an BGR565 image, so my main concern was obatinning these images from the firewire camera. The main problem was converting a 24-bit RGB image to a BGR565 image (I don't think IPP has a function to do that, right?, or an ippiUY422ToRGB_8u_C2C3R?). I started testing it using OpenCV to show the image, to make sure that the conversion to RGB was going ok (one of the cases in the code below) and, after having it done successfully, I went to program the conversion from RGB to BGR565. One of my problems (probably lack of experience) was with the bit order when creating the RGB565 pixel value. I was a litle misguided by the IPP manual, since you have&lt;BR /&gt;    G2 G1 G0 B4 B3 B2 B1 B0 | R4 R3 R2 R1 R0 G5 G4 G3&lt;BR /&gt;and actually I see it more has&lt;BR /&gt;    G4 G3 G2 B7 B6 B5 B5 B3 | R7 R6 R5 R4 R3 G7 G6 G5&lt;BR /&gt;Nevertheless, it seems to me that although you have done a good job in increasing the available color conversion functions, there are still missing some.&lt;BR /&gt;&lt;BR /&gt;This is more or less the code I had to use to be able to do it (I made a few changes to increase readability, so you might need to change things to become compilable).&lt;BR /&gt;&lt;BR /&gt;Hope I could be of some help.&lt;BR /&gt;&lt;BR /&gt;Cheers.&lt;BR /&gt;&lt;BR /&gt;Hugo&lt;BR /&gt;    &lt;BR /&gt;---------------------------------&amp;gt; CODE START&lt;BR /&gt;&lt;BR /&gt;Ipp8u *rgbImg, *imgYUV422_IPP;&lt;BR /&gt;int     step, step1;&lt;BR /&gt;IppiSize imgSize;&lt;BR /&gt;&lt;BR /&gt;rgbImg = ippiMalloc_8u_C3( width, height, &amp;amp;step );&lt;BR /&gt;imgYUV422_IPP = ippiMalloc_8u_C2( width, height, &amp;amp;step1 );&lt;BR /&gt;imgSize.width = width;&lt;BR /&gt;imgSize.height = height;&lt;BR /&gt;&lt;BR /&gt;/* Actually step1 == width*2 */&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/* Change pixel order */&lt;BR /&gt;ippiUYToYU422_8u_C2R( imgFirewire, &lt;BR /&gt;                      width*2, &lt;BR /&gt;                      tmpImg,&lt;BR /&gt;                      step1,&lt;BR /&gt;                      imgSize );&lt;BR /&gt;&lt;BR /&gt;/* Convert to RGB */&lt;BR /&gt;ippiYUV422ToRGB_8u_C2C3R( tmpImg,&lt;BR /&gt;                          step1, &lt;BR /&gt;                          rgbImg, &lt;BR /&gt;                          step, &lt;BR /&gt;                          imgSize );&lt;BR /&gt;&lt;BR /&gt;if (usingOpenCV )&lt;BR /&gt;{&lt;BR /&gt;    /* Set iplImage with same data has ipp image */&lt;BR /&gt;    cvSetData( iplImageRGB, rgbImg,&lt;BR /&gt;               iplImageRGB-&amp;gt;widthStep );&lt;BR /&gt;&lt;BR /&gt;    /* Convert to BGR */&lt;BR /&gt;    cvCvtColor( iplImageRGB, iplImageBGR, CV_RGB2BGR );&lt;BR /&gt;&lt;BR /&gt;    /* Show image */&lt;BR /&gt;    cvvNamedWindow("teste", 1);&lt;BR /&gt;    cvvShowImage("teste", iplImageBGR);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;    /* Use a function of mine to convert from rgbImg to a&lt;BR /&gt;     * BGR565 */&lt;BR /&gt;     RGB24toBGR565( rgbImage, rgb565image, width, height);&lt;BR /&gt;     &lt;BR /&gt;     /* Show the image using X*/&lt;BR /&gt;     showImage(rgb565image)&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;RGB24toBGR565( rgbImage, rgb565image, width, height);&lt;BR /&gt;{&lt;BR /&gt;    int i, r, g, b;&lt;BR /&gt;    &lt;BR /&gt;    for ( i=0 ; i&amp;lt;2*(width)*(height) ; i+=2 )&lt;BR /&gt;    {&lt;BR /&gt;        r = *(rgbImage++);&lt;BR /&gt;        g = *(rgbImage++);&lt;BR /&gt;        b = *(rgbImage++);&lt;BR /&gt;&lt;BR /&gt;        /* BGR565&lt;BR /&gt;         * -------- High --------- |--------- Low ---------&lt;BR /&gt;         * R7 R6 R5 R4 R3 G7 G6 G5 | G4 G3 B7 B6 B5 B4 B3 B2&lt;BR /&gt;         */&lt;BR /&gt;        rgb565image&lt;I&gt;   = (g&amp;lt;&amp;lt;3 &amp;amp; 0xe0) | (b&amp;gt;&amp;gt;3 &amp;amp; 0x1f);&lt;BR /&gt;        rgb565image[i+1] = (r    &amp;amp; 0xf8) | (g&amp;gt;&amp;gt;5 &amp;amp; 0x07);&lt;BR /&gt;    }&lt;BR /&gt;                   &lt;BR /&gt;---------------------------------&amp;gt; CODE END&lt;/I&gt;</description>
      <pubDate>Wed, 20 Oct 2004 20:57:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933507#M16958</guid>
      <dc:creator>hcostelha</dc:creator>
      <dc:date>2004-10-20T20:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone successfully converted a Firewire camera image?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933508#M16959</link>
      <description>&lt;DIV&gt;Wow, thank you for so detailed description.&lt;/DIV&gt;
&lt;DIV&gt;You are right, we do not have all the possible color-conversion functions. You know, as only we add some new cc function, we got several requests for new variants. It seems as endless process, so we are prefer to have some format conversion functions to make it as two step process. First, you need to convert data from some format to more common YCbCr or RGB/BGR and after that you can use general color-conversion algorithm. But you are right, 888 &amp;lt;-&amp;gt; 565/555 conversion is interesting case. We should think about such functionality. You can submit it as feature request through IPP tech support channel, so we can consider it in our plans.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Regards,&lt;/DIV&gt;
&lt;DIV&gt; Vladimir&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Oct 2004 21:33:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933508#M16959</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2004-10-20T21:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone successfully converted a Firewire camera image?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933509#M16960</link>
      <description>Just to let people know that in Intel IPP 5.0 beta there is a function called ippiCbYCr422ToRGB which solves this problem for a Firewire camera delivering UYV422 images.&lt;BR /&gt;&lt;BR /&gt;Thanks for the help given and for the improvements in IPP 5.0 beta.</description>
      <pubDate>Sat, 06 Aug 2005 00:50:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933509#M16960</guid>
      <dc:creator>costelha1</dc:creator>
      <dc:date>2005-08-06T00:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone successfully converted a Firewire camera image?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933510#M16961</link>
      <description>&lt;DIV&gt;Hi,&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;thank you for mentioned it here!&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Regards,&lt;/DIV&gt;
&lt;DIV&gt; Vladimir&lt;/DIV&gt;</description>
      <pubDate>Sat, 13 Aug 2005 01:21:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Anyone-successfully-converted-a-Firewire-camera-image/m-p/933510#M16961</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2005-08-13T01:21:56Z</dc:date>
    </item>
  </channel>
</rss>

