<?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: Interfacing R200 with OpenCV in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/Interfacing-R200-with-OpenCV/m-p/592462#M11368</link>
    <description>&lt;P&gt;Hi! Thanks for the links. For your last link though, it's a project set up in Ubuntu. But i'm working with Windows. &lt;/P&gt;</description>
    <pubDate>Sat, 13 Jan 2018 05:00:54 GMT</pubDate>
    <dc:creator>GGabr4</dc:creator>
    <dc:date>2018-01-13T05:00:54Z</dc:date>
    <item>
      <title>Interfacing R200 with OpenCV</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Interfacing-R200-with-OpenCV/m-p/592460#M11366</link>
      <description>&lt;P&gt;Hi! I'm following this link &lt;A href="http://www.samontab.com/web/2016/04/interfacing-intel-realsense-f200-with-opencv/"&gt;http://www.samontab.com/web/2016/04/interfacing-intel-realsense-f200-with-opencv/&lt;/A&gt; Interfacing Intel RealSense F200 with OpenCV – Sebastian Montabone but the device that i'm using is R200. I debugged the code and it showed the windows below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is not streaming at all. What is this error below?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code that i run as found from the link &lt;A href="http://www.samontab.com/web/2016/04/interfacing-intel-realsense-f200-with-opencv/"&gt;http://www.samontab.com/web/2016/04/interfacing-intel-realsense-f200-with-opencv/&lt;/A&gt; Interfacing Intel RealSense F200 with OpenCV – Sebastian Montabone  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# include &lt;/P&gt;&lt;P&gt;# include &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PXCSenseManager *pxcSenseManager;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PXCImage * CVMat2PXCImage(cv::Mat cvImage)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;PXCImage::ImageInfo iinfo;&lt;/P&gt;&lt;P&gt;memset(&amp;amp;iinfo, 0, sizeof(iinfo));&lt;/P&gt;&lt;P&gt;iinfo.width = cvImage.cols;&lt;/P&gt;&lt;P&gt;iinfo.height = cvImage.rows;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PXCImage::PixelFormat format;&lt;/P&gt;&lt;P&gt;int type = cvImage.type();&lt;/P&gt;&lt;P&gt;if (type == CV_8UC1)&lt;/P&gt;&lt;P&gt;format = PXCImage::PIXEL_FORMAT_Y8;&lt;/P&gt;&lt;P&gt;else if (type == CV_8UC3)&lt;/P&gt;&lt;P&gt;format = PXCImage::PIXEL_FORMAT_RGB24;&lt;/P&gt;&lt;P&gt;else if (type == CV_32FC1)&lt;/P&gt;&lt;P&gt;format = PXCImage::PIXEL_FORMAT_DEPTH_F32;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iinfo.format = format;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PXCImage *pxcImage = pxcSenseManager-&amp;gt;QuerySession()-&amp;gt;CreateImage(&amp;amp;iinfo);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PXCImage::ImageData data;&lt;/P&gt;&lt;P&gt;pxcImage-&amp;gt;AcquireAccess(PXCImage::ACCESS_WRITE, format, &amp;amp;data);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data.planes[0] = cvImage.data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pxcImage-&amp;gt;ReleaseAccess(&amp;amp;data);&lt;/P&gt;&lt;P&gt;return pxcImage;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cv::Mat PXCImage2CVMat(PXCImage *pxcImage, PXCImage::PixelFormat format)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;PXCImage::ImageData data;&lt;/P&gt;&lt;P&gt;pxcImage-&amp;gt;AcquireAccess(PXCImage::ACCESS_READ, format, &amp;amp;data);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int width = pxcImage-&amp;gt;QueryInfo().width;&lt;/P&gt;&lt;P&gt;int height = pxcImage-&amp;gt;QueryInfo().height;&lt;/P&gt;&lt;P&gt;if (!format)&lt;/P&gt;&lt;P&gt;format = pxcImage-&amp;gt;QueryInfo().format;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int type;&lt;/P&gt;&lt;P&gt;if (format == PXCImage::PIXEL_FORMAT_Y8)&lt;/P&gt;&lt;P&gt;type = CV_8UC1;&lt;/P&gt;&lt;P&gt;else if (format == PXCImage::PIXEL_FORMAT_RGB24)&lt;/P&gt;&lt;P&gt;type = CV_8UC3;&lt;/P&gt;&lt;P&gt;else if (format == PXCImage::PIXEL_FORMAT_DEPTH_F32)&lt;/P&gt;&lt;P&gt;type = CV_32FC1;&lt;/P&gt;&lt;P&gt;else if (format == PXCImage::PIXEL_FORMAT_DEPTH)&lt;/P&gt;&lt;P&gt;type = CV_16UC1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cv::Mat ocvImage = cv::Mat(cv::Size(width, height), type, data.planes[0]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pxcImage-&amp;gt;ReleaseAccess(&amp;amp;data);&lt;/P&gt;&lt;P&gt;return ocvImage;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(int argc, char* argv[])&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;//Define some parameters for the camera&lt;/P&gt;&lt;P&gt;cv::Size frameSize = cv::Size(640, 480);&lt;/P&gt;&lt;P&gt;float frameRate = 60;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Create the OpenCV windows and images&lt;/P&gt;&lt;P&gt;cv::namedWindow("IR", cv::WINDOW_NORMAL);&lt;/P&gt;&lt;P&gt;cv::namedWindow("Color", cv::WINDOW_NORMAL);&lt;/P&gt;&lt;P&gt;cv::namedWindow("Depth", cv::WINDOW_NORMAL);&lt;/P&gt;&lt;P&gt;cv::Mat frameIR = cv::Mat::zeros(frameSize, CV_8UC1);&lt;/P&gt;&lt;P&gt;cv::Mat frameColor = cv::Mat::zeros(frameSize, CV_8UC3);&lt;/P&gt;&lt;P&gt;cv::Mat frameDepth = cv::Mat::zeros(frameSize, CV_8UC1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Initialize the RealSense Manager&lt;/P&gt;&lt;P&gt;pxcSenseManager = PXCSenseManager::CreateInstance();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Enable the streams to be used&lt;/P&gt;&lt;P&gt;pxcSenseManager-&amp;gt;EnableStream(PXCCapture::STREAM_TYPE_IR, frameSize.width, frameSize.height, frameRate);&lt;/P&gt;&lt;P&gt;pxcSenseManager-&amp;gt;EnableStream(PXCCapture::STREAM_TYPE_COLOR, frameSize.width, frameSize.height, frameRate);&lt;/P&gt;&lt;P&gt;pxcSenseManager-&amp;gt;EnableStream(PXCCapture::STREAM_TYPE_DEPTH, frameSize.width, frameSize.height, frameRate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Initialize the pipeline&lt;/P&gt;&lt;P&gt;pxcSenseManager-&amp;gt;Init();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bool keepRunning = true;&lt;/P&gt;&lt;P&gt;while (keepRunning)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;//Acquire all the frames from the camera&lt;/P&gt;&lt;P&gt;pxcSenseManager-&amp;gt;AcquireFrame();&lt;/P&gt;&lt;P&gt;PXCCapture::Sample *sample = pxcSenseManager-&amp;gt;QuerySample();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Convert each frame into an OpenCV image&lt;/P&gt;&lt;P&gt;frameIR = PXCImage2CVMat(sample-&amp;gt;ir, PXCImage::PIXEL_FORMAT_Y8);&lt;/P&gt;&lt;P&gt;frameColor = PXCImage2CVMat(sample-&amp;gt;color, PXCImage::PIXEL_FORMAT_RGB24);&lt;/P&gt;&lt;P&gt;cv::Mat frameDepth_u16 = PXCImage2CVMat(sample-&amp;gt;depth, PXCImage::PIXEL_FORMAT_DEPTH);&lt;/P&gt;&lt;P&gt;frameDepth_u16.convertTo(frameDepth, CV_8UC1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cv::Mat frameDisplay;&lt;/P&gt;&lt;P&gt;cv::equalizeHist(frameDepth, frameDisplay);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Display the images&lt;/P&gt;&lt;P&gt;cv::imshow("IR", frameIR);&lt;/P&gt;&lt;P&gt;cv::imshow("Color", frameColor);&lt;/P&gt;&lt;P&gt;cv::imshow("Depth", frameDisplay);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Check for user input&lt;/P&gt;&lt;P&gt;int key = cv::waitKey(1);&lt;/P&gt;&lt;P&gt;if (key == 27)&lt;/P&gt;&lt;P&gt;keepRunning = false;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Release the memory from the frames&lt;/P&gt;&lt;P&gt;pxcSenseManager-&amp;gt;ReleaseFrame();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Release the memory from the RealSense manager&lt;/P&gt;&lt;P&gt;pxcSenseManager-&amp;gt;Release();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 02:52:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Interfacing-R200-with-OpenCV/m-p/592460#M11366</guid>
      <dc:creator>GGabr4</dc:creator>
      <dc:date>2018-01-10T02:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Interfacing R200 with OpenCV</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Interfacing-R200-with-OpenCV/m-p/592461#M11367</link>
      <description>&lt;P&gt;Hello Gretchen_SMG-team, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Thanks for contacting Intel customer support. &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Unfortunately through this channel we cannot debug your code or debug code from a third party site. &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;As a best effort to assist you I can share with you the following link from our developer zone were a developer was working on the OpenCV: &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;A href="https://software.intel.com/en-us/forums/realsense/topic/599415"&gt;https://software.intel.com/en-us/forums/realsense/topic/599415&lt;/A&gt; &lt;A href="https://software.intel.com/en-us/forums/realsense/topic/599415"&gt;https://software.intel.com/en-us/forums/realsense/topic/599415&lt;/A&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Additionally here is a video with an explanation on how to work on the OpenCV: &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;A href="https://www.youtube.com/watch?v=wIkIdjN6Oyw"&gt;https://www.youtube.com/watch?v=wIkIdjN6Oyw&lt;/A&gt; &lt;A href="https://www.youtube.com/watch?v=wIkIdjN6Oyw"&gt;https://www.youtube.com/watch?v=wIkIdjN6Oyw&lt;/A&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;And lastly here is a code sample on how to work on the OpenCV using LibrealSense: &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;A href="https://software.intel.com/en-us/articles/using-librealsense-and-opencv-to-stream-rgb-and-depth-data"&gt;https://software.intel.com/en-us/articles/using-librealsense-and-opencv-to-stream-rgb-and-depth-data&lt;/A&gt; &lt;A href="https://software.intel.com/en-us/articles/using-librealsense-and-opencv-to-stream-rgb-and-depth-data"&gt;https://software.intel.com/en-us/articles/using-librealsense-and-opencv-to-stream-rgb-and-depth-data&lt;/A&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Hope this information helps you with your project.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Best Regards, &lt;P&gt;&amp;nbsp;&lt;/P&gt;Juan N.</description>
      <pubDate>Wed, 10 Jan 2018 20:40:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Interfacing-R200-with-OpenCV/m-p/592461#M11367</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-01-10T20:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Interfacing R200 with OpenCV</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Interfacing-R200-with-OpenCV/m-p/592462#M11368</link>
      <description>&lt;P&gt;Hi! Thanks for the links. For your last link though, it's a project set up in Ubuntu. But i'm working with Windows. &lt;/P&gt;</description>
      <pubDate>Sat, 13 Jan 2018 05:00:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Interfacing-R200-with-OpenCV/m-p/592462#M11368</guid>
      <dc:creator>GGabr4</dc:creator>
      <dc:date>2018-01-13T05:00:54Z</dc:date>
    </item>
  </channel>
</rss>

