<?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 Chistopher, in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/OpenCV-IntelSDK-and-user-input/m-p/997157#M28583</link>
    <description>&lt;P&gt;Hi Chistopher,&lt;/P&gt;

&lt;P&gt;There are a few things not quite right:&lt;/P&gt;

&lt;P&gt;- You are mixing the old OpenCV C interface (cvWaitKey) mixed with the new C++ interface (cv::imshow). It may not be the cause, but either way, I suggest you to use the new OpenCV C++ interface.&lt;/P&gt;

&lt;P&gt;- Why are you using ACCESS_READ_WRITE?, you should be using ACCESS_READ, as you are only reading from the camera.&lt;/P&gt;

&lt;P&gt;- There is no need to manually allocate the memory, with memCopy, the cv::Mat constructor should do all that work for you.&lt;/P&gt;

&lt;P&gt;- You should separate the image acquisiton from the camera with the processing of the frame, and its display. You should be using a thread to grab the images from the camera, and the main thread should be the one displaying it, and reading the user input.&lt;/P&gt;

&lt;P&gt;Probably there are other things going on with your code as well, but at least this would give you a starting point to debug it.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Feb 2015 00:46:18 GMT</pubDate>
    <dc:creator>samontab</dc:creator>
    <dc:date>2015-02-05T00:46:18Z</dc:date>
    <item>
      <title>OpenCV, IntelSDK and user input</title>
      <link>https://community.intel.com/t5/Software-Archive/OpenCV-IntelSDK-and-user-input/m-p/997154#M28580</link>
      <description>&lt;P&gt;Right now, I'm currently using tutorial 2 (main_raw_color_streams) as my base. However inside my while loop,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;while (psm-&amp;gt;AcquireFrame(true) &amp;gt;= PXC_STATUS_NO_ERROR){&lt;/P&gt;

&lt;P&gt;I want to use a mouse click in order to manipulate (in particular, draw) on my opencv image stream.&lt;/P&gt;

&lt;P&gt;I had initially planned to put something along the lines of:&amp;nbsp;&lt;/P&gt;

&lt;P&gt;for (char user_input = cv::waitKey(20); user_input != 28; user_input = cv::waitKey(20)){&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;rgb |= Circle.drawing_canvas;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;imshow("Color_cv2", rgb);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;

&lt;P&gt;due to the fact that my program displays through imshow, it needs to be followed up with a wait key&amp;nbsp;or nothing will show up on the screen because highgui doesn't have enough time to process the drawn requests from imshow(). But by doing this:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="" src="http://puu.sh/fpFoJ/8322d007da.png" style="font-size: 1em; line-height: 1.5;" /&gt;&lt;/P&gt;

&lt;P&gt;I get a bug seeing how it will never reach my if(!renderColor-&amp;gt; Renderframe... (NOTE: I have this here just to check if my code ever reaches here)&lt;/P&gt;

&lt;P&gt;If you have suggestions on how to implement the part where I follow up my imshow("Color_cv2", rgb) with a wait key please comment below!&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Feb 2015 10:32:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/OpenCV-IntelSDK-and-user-input/m-p/997154#M28580</guid>
      <dc:creator>Christopher_C_</dc:creator>
      <dc:date>2015-02-03T10:32:03Z</dc:date>
    </item>
    <item>
      <title>If it helps, this is the</title>
      <link>https://community.intel.com/t5/Software-Archive/OpenCV-IntelSDK-and-user-input/m-p/997155#M28581</link>
      <description>&lt;P&gt;If it helps, this is the original code I had before trying to implement the for loop for the wait key&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="" src="http://puu.sh/fpGGd/923e87e9cc.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Feb 2015 10:43:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/OpenCV-IntelSDK-and-user-input/m-p/997155#M28581</guid>
      <dc:creator>Christopher_C_</dc:creator>
      <dc:date>2015-02-03T10:43:28Z</dc:date>
    </item>
    <item>
      <title>bumping for help</title>
      <link>https://community.intel.com/t5/Software-Archive/OpenCV-IntelSDK-and-user-input/m-p/997156#M28582</link>
      <description>&lt;P&gt;bumping for help&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2015 03:59:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/OpenCV-IntelSDK-and-user-input/m-p/997156#M28582</guid>
      <dc:creator>Christopher_C_</dc:creator>
      <dc:date>2015-02-04T03:59:36Z</dc:date>
    </item>
    <item>
      <title>Hi Chistopher,</title>
      <link>https://community.intel.com/t5/Software-Archive/OpenCV-IntelSDK-and-user-input/m-p/997157#M28583</link>
      <description>&lt;P&gt;Hi Chistopher,&lt;/P&gt;

&lt;P&gt;There are a few things not quite right:&lt;/P&gt;

&lt;P&gt;- You are mixing the old OpenCV C interface (cvWaitKey) mixed with the new C++ interface (cv::imshow). It may not be the cause, but either way, I suggest you to use the new OpenCV C++ interface.&lt;/P&gt;

&lt;P&gt;- Why are you using ACCESS_READ_WRITE?, you should be using ACCESS_READ, as you are only reading from the camera.&lt;/P&gt;

&lt;P&gt;- There is no need to manually allocate the memory, with memCopy, the cv::Mat constructor should do all that work for you.&lt;/P&gt;

&lt;P&gt;- You should separate the image acquisiton from the camera with the processing of the frame, and its display. You should be using a thread to grab the images from the camera, and the main thread should be the one displaying it, and reading the user input.&lt;/P&gt;

&lt;P&gt;Probably there are other things going on with your code as well, but at least this would give you a starting point to debug it.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2015 00:46:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/OpenCV-IntelSDK-and-user-input/m-p/997157#M28583</guid>
      <dc:creator>samontab</dc:creator>
      <dc:date>2015-02-05T00:46:18Z</dc:date>
    </item>
  </channel>
</rss>

