<?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 RGBToGray with cv::Mat in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/RGBToGray-with-cv-Mat/m-p/1145811#M26224</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;i'm trying to use ipp to convert rgb image to grayscale one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;following code:&lt;/P&gt;
&lt;PRE class="brush:; class-name:dark;"&gt;        gray_frame = Mat(color_frame.size().width, color_frame.size().height, CV_8UC1);

        IppiSize roi;
        roi.width = color_frame.size().width;
        roi.height = color_frame.size().height;
        Ipp8u* ippRGBPtr = (Ipp8u*)&amp;amp;color_frame.data[0]; // Get pointer to the data
        int ipprgbStep = color_frame.step; // get step value in bytes
        Ipp8u* ippGrayPtr = (Ipp8u*)&amp;amp;gray_frame.data[0]; // Get pointer to the data
        int ippGrayStep = gray_frame.step; // get step value in bytes
        ippiRGBToGray_8u_C3C1R(ippRGBPtr, ipprgbStep, ippGrayPtr, ippGrayStep, roi); // do the color conversion&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the problem i'm facing is that the image i now fully procced,&lt;/P&gt;
&lt;P&gt;when i cv::imshow(gray_frame) i see half of the image.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what can be the problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you!&lt;/P&gt;</description>
    <pubDate>Sun, 22 Mar 2020 19:55:46 GMT</pubDate>
    <dc:creator>Dahan__Dor</dc:creator>
    <dc:date>2020-03-22T19:55:46Z</dc:date>
    <item>
      <title>RGBToGray with cv::Mat</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/RGBToGray-with-cv-Mat/m-p/1145811#M26224</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;i'm trying to use ipp to convert rgb image to grayscale one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;following code:&lt;/P&gt;
&lt;PRE class="brush:; class-name:dark;"&gt;        gray_frame = Mat(color_frame.size().width, color_frame.size().height, CV_8UC1);

        IppiSize roi;
        roi.width = color_frame.size().width;
        roi.height = color_frame.size().height;
        Ipp8u* ippRGBPtr = (Ipp8u*)&amp;amp;color_frame.data[0]; // Get pointer to the data
        int ipprgbStep = color_frame.step; // get step value in bytes
        Ipp8u* ippGrayPtr = (Ipp8u*)&amp;amp;gray_frame.data[0]; // Get pointer to the data
        int ippGrayStep = gray_frame.step; // get step value in bytes
        ippiRGBToGray_8u_C3C1R(ippRGBPtr, ipprgbStep, ippGrayPtr, ippGrayStep, roi); // do the color conversion&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the problem i'm facing is that the image i now fully procced,&lt;/P&gt;
&lt;P&gt;when i cv::imshow(gray_frame) i see half of the image.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what can be the problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 22 Mar 2020 19:55:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/RGBToGray-with-cv-Mat/m-p/1145811#M26224</guid>
      <dc:creator>Dahan__Dor</dc:creator>
      <dc:date>2020-03-22T19:55:46Z</dc:date>
    </item>
    <item>
      <title>Hi Dahan Dor.</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/RGBToGray-with-cv-Mat/m-p/1145812#M26225</link>
      <description>&lt;P&gt;Hi Dahan&amp;nbsp;Dor.&lt;/P&gt;&lt;P&gt;I've reproduced your issue.&lt;/P&gt;&lt;P&gt;Swap please width and height in this line&lt;/P&gt;&lt;P&gt;gray_frame = Mat(color_frame.size().width, color_frame.size().height, CV_8UC1)&amp;nbsp;&lt;/P&gt;&lt;P&gt;with&lt;/P&gt;&lt;P&gt;gray_frame = Mat(color_frame.size().height, color_frame.size().width, CV_8UC1)&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 23:26:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/RGBToGray-with-cv-Mat/m-p/1145812#M26225</guid>
      <dc:creator>Andrey_B_Intel</dc:creator>
      <dc:date>2020-04-08T23:26:13Z</dc:date>
    </item>
  </channel>
</rss>

