<?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 Realsense D415 OpenCV face detection error in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/Realsense-D415-OpenCV-face-detection-error/m-p/555677#M9028</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am new to Realsense. I am trying to use Realsense with openCV by C++.&lt;/P&gt;&lt;P&gt;I already tried it. However, Something does not work pretty well.&lt;/P&gt;&lt;P&gt;By openCV I made Realsense streaming with gray scale. However, when the&lt;/P&gt;&lt;P&gt;Debug reach to CascadeClassifier, which is just like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;face_cascade(frame_gray, faces,1.1,5,0|CASCADE_SCALE_IMAGE,Size(50,50));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the memory violation came out and stop debugging.&lt;/P&gt;&lt;P&gt;At first time, I assume that something is wrong with pointer.&lt;/P&gt;&lt;P&gt;Therefore, I tried changing gray scale channel, but did not gone well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;error shows like this : &lt;/P&gt;&lt;P&gt;예외 발생(0x00007FFD00A14008, camera_test001.exe): Microsoft C++ 예외: std::exception, 메모리 위치 0x000000642ACFCF90. 0x784 스레드가 종료되었습니다(코드: 0 (0x0))&lt;/P&gt;&lt;P&gt;(exception occur(0x00007FFD00A14008, camera_test001.exe): Microsoft C++ Exception: std::exception, memory location 0x000000642ACFCF90. 0x784 thread has been closed(code:0 (0x0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and my complete code is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// License: Apache 2.0.See LICENSE file in root directory.&lt;/P&gt;&lt;P&gt;// Copyright(c) 2017 Intel Corporation. All Rights Reserved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# include  // Include RealSense Cross Platform API&lt;/P&gt;&lt;P&gt;# include    // Include OpenCV API&lt;/P&gt;&lt;P&gt;# include "opencv2/objdetect.hpp"&lt;/P&gt;&lt;P&gt;# include "opencv2/videoio.hpp"&lt;/P&gt;&lt;P&gt;# include "opencv2/highgui.hpp"&lt;/P&gt;&lt;P&gt;# include "opencv2/imgproc.hpp"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using namespace std;&lt;/P&gt;&lt;P&gt;using namespace cv;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//String face_cascade_name;&lt;/P&gt;&lt;P&gt;CascadeClassifier face_cascade;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void detectAndDisplay(Mat frame) {&lt;/P&gt;&lt;P&gt;  std::vector faces;&lt;/P&gt;&lt;P&gt;  Mat frame_gray;// (Size(640, 480));&lt;/P&gt;&lt;P&gt;  string window_name = "Test";&lt;/P&gt;&lt;P&gt;  //frame.convertTo(frame, CV_8UC3);&lt;/P&gt;&lt;P&gt;  cvtColor(frame, frame, COLOR_BGR2RGB);&lt;/P&gt;&lt;P&gt;  cvtColor(frame, frame_gray, COLOR_RGB2GRAY);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  equalizeHist(frame_gray, frame_gray);&lt;/P&gt;&lt;P&gt;  //frame_gray.convertTo(frame_gray, CV_8UC3);&lt;/P&gt;&lt;P&gt;  if (frame.empty() || frame_gray.empty()) {&lt;/P&gt;&lt;P&gt;  printf("error, no data\n");&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;  else {&lt;/P&gt;&lt;P&gt;  printf("nothing\n");&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  face_cascade.detectMultiScale(frame_gray, faces , 1.1, 5, 0 | CASCADE_SCALE_IMAGE, Size(50, 50));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  imshow(window_name, frame_gray);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(int argc, char * argv[]) try&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  rs2::colorizer color_map;&lt;/P&gt;&lt;P&gt;  rs2::pipeline pipe;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  face_cascade.load("&lt;A&gt;C:\\opencv\\sources\\data\\haarcascades\\haarcascade_frontalface_default.xml&lt;/A&gt;");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  pipe.start();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  const auto window_name = "Display Image";&lt;/P&gt;&lt;P&gt;  namedWindow(window_name, WINDOW_AUTOSIZE);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  while (waitKey(1) &amp;lt; 0 &amp;amp;&amp;amp; cvGetWindowHandle(window_name))&lt;/P&gt;&amp;lt;...</description>
    <pubDate>Mon, 28 May 2018 16:14:26 GMT</pubDate>
    <dc:creator>KJang1</dc:creator>
    <dc:date>2018-05-28T16:14:26Z</dc:date>
    <item>
      <title>Realsense D415 OpenCV face detection error</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Realsense-D415-OpenCV-face-detection-error/m-p/555677#M9028</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am new to Realsense. I am trying to use Realsense with openCV by C++.&lt;/P&gt;&lt;P&gt;I already tried it. However, Something does not work pretty well.&lt;/P&gt;&lt;P&gt;By openCV I made Realsense streaming with gray scale. However, when the&lt;/P&gt;&lt;P&gt;Debug reach to CascadeClassifier, which is just like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;face_cascade(frame_gray, faces,1.1,5,0|CASCADE_SCALE_IMAGE,Size(50,50));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the memory violation came out and stop debugging.&lt;/P&gt;&lt;P&gt;At first time, I assume that something is wrong with pointer.&lt;/P&gt;&lt;P&gt;Therefore, I tried changing gray scale channel, but did not gone well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;error shows like this : &lt;/P&gt;&lt;P&gt;예외 발생(0x00007FFD00A14008, camera_test001.exe): Microsoft C++ 예외: std::exception, 메모리 위치 0x000000642ACFCF90. 0x784 스레드가 종료되었습니다(코드: 0 (0x0))&lt;/P&gt;&lt;P&gt;(exception occur(0x00007FFD00A14008, camera_test001.exe): Microsoft C++ Exception: std::exception, memory location 0x000000642ACFCF90. 0x784 thread has been closed(code:0 (0x0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and my complete code is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// License: Apache 2.0.See LICENSE file in root directory.&lt;/P&gt;&lt;P&gt;// Copyright(c) 2017 Intel Corporation. All Rights Reserved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# include  // Include RealSense Cross Platform API&lt;/P&gt;&lt;P&gt;# include    // Include OpenCV API&lt;/P&gt;&lt;P&gt;# include "opencv2/objdetect.hpp"&lt;/P&gt;&lt;P&gt;# include "opencv2/videoio.hpp"&lt;/P&gt;&lt;P&gt;# include "opencv2/highgui.hpp"&lt;/P&gt;&lt;P&gt;# include "opencv2/imgproc.hpp"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using namespace std;&lt;/P&gt;&lt;P&gt;using namespace cv;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//String face_cascade_name;&lt;/P&gt;&lt;P&gt;CascadeClassifier face_cascade;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void detectAndDisplay(Mat frame) {&lt;/P&gt;&lt;P&gt;  std::vector faces;&lt;/P&gt;&lt;P&gt;  Mat frame_gray;// (Size(640, 480));&lt;/P&gt;&lt;P&gt;  string window_name = "Test";&lt;/P&gt;&lt;P&gt;  //frame.convertTo(frame, CV_8UC3);&lt;/P&gt;&lt;P&gt;  cvtColor(frame, frame, COLOR_BGR2RGB);&lt;/P&gt;&lt;P&gt;  cvtColor(frame, frame_gray, COLOR_RGB2GRAY);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  equalizeHist(frame_gray, frame_gray);&lt;/P&gt;&lt;P&gt;  //frame_gray.convertTo(frame_gray, CV_8UC3);&lt;/P&gt;&lt;P&gt;  if (frame.empty() || frame_gray.empty()) {&lt;/P&gt;&lt;P&gt;  printf("error, no data\n");&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;  else {&lt;/P&gt;&lt;P&gt;  printf("nothing\n");&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  face_cascade.detectMultiScale(frame_gray, faces , 1.1, 5, 0 | CASCADE_SCALE_IMAGE, Size(50, 50));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  imshow(window_name, frame_gray);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(int argc, char * argv[]) try&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  rs2::colorizer color_map;&lt;/P&gt;&lt;P&gt;  rs2::pipeline pipe;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  face_cascade.load("&lt;A&gt;C:\\opencv\\sources\\data\\haarcascades\\haarcascade_frontalface_default.xml&lt;/A&gt;");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  pipe.start();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  const auto window_name = "Display Image";&lt;/P&gt;&lt;P&gt;  namedWindow(window_name, WINDOW_AUTOSIZE);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  while (waitKey(1) &amp;lt; 0 &amp;amp;&amp;amp; cvGetWindowHandle(window_name))&lt;/P&gt;&amp;lt;...</description>
      <pubDate>Mon, 28 May 2018 16:14:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Realsense-D415-OpenCV-face-detection-error/m-p/555677#M9028</guid>
      <dc:creator>KJang1</dc:creator>
      <dc:date>2018-05-28T16:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Realsense D415 OpenCV face detection error</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Realsense-D415-OpenCV-face-detection-error/m-p/555678#M9029</link>
      <description>&lt;P&gt;Hello Justin_j,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Can you please share with me the exact error code and the complete code? &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;This is in order for us to determinate the root cause of this issue. &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>Tue, 29 May 2018 22:19:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Realsense-D415-OpenCV-face-detection-error/m-p/555678#M9029</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-05-29T22:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Realsense D415 OpenCV face detection error</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Realsense-D415-OpenCV-face-detection-error/m-p/555679#M9030</link>
      <description>&lt;P&gt;Sure! I just added my complete code.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 14:35:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Realsense-D415-OpenCV-face-detection-error/m-p/555679#M9030</guid>
      <dc:creator>KJang1</dc:creator>
      <dc:date>2018-05-31T14:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Realsense D415 OpenCV face detection error</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Realsense-D415-OpenCV-face-detection-error/m-p/555680#M9031</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Thanks for your update. &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;We have attempted to reproduce your issue and we have not been able to. We compiled your code and it worked fine. &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Did you followed the instructions on  &lt;A href="https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv"&gt;https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv&lt;/A&gt; to build the OpenCV samples from librealsense? Do the other samples work? &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;What version of Windows and Visual Studio are you using? We have tested the issue with Visual Studio 2015. &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Microsoft Visual Studio Community 2015&lt;P&gt;&amp;nbsp;&lt;/P&gt;Version 14.0.25431.01 Update 3&lt;P&gt;&amp;nbsp;&lt;/P&gt;Microsoft .NET Framework&lt;P&gt;&amp;nbsp;&lt;/P&gt;Version 4.6.01590&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;You can also try to reinstall your vcomp140.dll file: &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Go to Microsoft website and download the Visual C++ Redistributable for Visual Studio 2015 from  &lt;A href="https://www.microsoft.com/en-ca/download/details.aspx?id=48145"&gt;https://www.microsoft.com/en-ca/download/details.aspx?id=48145&lt;/A&gt;. You are going to want to select both 'vc_redist.x64.exe' and 'vc_redist.x86.exe' files to download. Once the files are downloaded, restart the computer as prompted.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Hope this information helps, We will be waiting for your feedback. &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>Fri, 01 Jun 2018 20:05:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Realsense-D415-OpenCV-face-detection-error/m-p/555680#M9031</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-06-01T20:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Realsense D415 OpenCV face detection error</title>
      <link>https://community.intel.com/t5/Items-with-no-label/Realsense-D415-OpenCV-face-detection-error/m-p/555681#M9032</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank your for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Microsoft Visual Studio Community 2017&lt;/P&gt;&lt;P&gt;Version 15,7.1&lt;/P&gt;&lt;P&gt;Microsoft .NET Framework&lt;/P&gt;&lt;P&gt;Version 4.7.02556&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried examples. Everything works except rs-dnn,rs-grabcuts-rs-latency-tool in OpenCV.&lt;/P&gt;&lt;P&gt;The output shows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 예외발생 (0x75843F12(KernelBase.dll), rs-dnn.exe): WinRT originate error - 0xC00D36B3 : '제공된 스트림 번호가 잘못되었습니다.'&lt;/P&gt;&lt;P&gt;Exception occurs(0x75843F12(KernelBase.dll), rs-dnn.exe): WinRT originate error - 0xC00D36B3 : 'The stream number is wrong'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will install Visual Studio Community 2015 and let you know the result again.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jun 2018 14:17:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/Realsense-D415-OpenCV-face-detection-error/m-p/555681#M9032</guid>
      <dc:creator>KJang1</dc:creator>
      <dc:date>2018-06-03T14:17:33Z</dc:date>
    </item>
  </channel>
</rss>

