<?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 In the code below handData is in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040445#M45847</link>
    <description>&lt;P&gt;In the code below handData is a PXCHandData* that has already been initialized..&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;PXCHandData::IHand* iHand;
				
// Get hand by time of appearance 
// The value 0 means that we are only interested in the first hand that was detected
// If you want to track multiple hands then you will need to loop this
if(handData-&amp;gt;QueryHandData(PXCHandData::AccessOrderType::ACCESS_ORDER_BY_TIME,0,iHand) == PXC_STATUS_NO_ERROR)
{ 
   for(int j = 0; j &amp;lt; PXCHandData::NUMBER_OF_JOINTS ; j++)
	iHand-&amp;gt;QueryTrackedJoint((PXCHandData::JointType)j,nodes[0]&lt;J&gt;);
}&lt;/J&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jan 2015 15:04:07 GMT</pubDate>
    <dc:creator>Alain_Labrie</dc:creator>
    <dc:date>2015-01-07T15:04:07Z</dc:date>
    <item>
      <title>Finger Coordinates question + OpenGL question</title>
      <link>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040441#M45843</link>
      <description>&lt;P&gt;I having a bit of trouble finding how to return the coordinates of a certain finger (the index finger specifically) in the documentation. I'm assuming it has something with JointData, but I only need the coordinats of the last "point" of the index finger. More specifically, I need the index finger acting like the mouse.&lt;/P&gt;

&lt;P&gt;Another question:&lt;/P&gt;

&lt;P&gt;I'm using OpenGL to develop my app. However, I don't know how make a finger tap gesture act as a mouse click. Does anyone have a clue on what to do? I'm not sure if I'd have to bind gestures to a key/mouse operation because while OpenGL has key/mouse action recognition, it does not have specific recognition for finger gestures. Would I do something such as using an if statement to see if the querygesturedata was a tap, and if it was, then make it act like a mouse tap? (I'm not sure how this would look like in code)&lt;/P&gt;

&lt;P&gt;All help is appreciated! Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 07:30:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040441#M45843</guid>
      <dc:creator>Christopher_C_</dc:creator>
      <dc:date>2015-01-05T07:30:11Z</dc:date>
    </item>
    <item>
      <title>Here is some basic steps on</title>
      <link>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040442#M45844</link>
      <description>&lt;P&gt;Here is some basic steps on what you need to do:&lt;/P&gt;

&lt;P&gt;I) Use QueryTrackedJoint to retrieve current index position with label JOINT_INDEX_TIP.&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;PXCHandData::JointData data;
iHand-&amp;gt;QueryTrackedJoint(PXCHandData::JOINT_INDEX_TIP,data);&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;2) Store the current position&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;if(data.confidence &amp;gt; 0)
{
    mFingerPos =data.positionImage;
// or    mFingerPos = data.positionWorld;
}&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;3) To control user input you can use the&amp;nbsp;&lt;SPAN class="f_Heading1"&gt;Touchless Controller class&lt;/SPAN&gt;. Or you can control the mouse cursor by translating the current index finger positionImage to your window's coordinate system and use win32&amp;nbsp;SendInput function to move the mouse and send click events when a you detect a "Tap" gesture.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Good Luck&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 15:56:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040442#M45844</guid>
      <dc:creator>Alain_Labrie</dc:creator>
      <dc:date>2015-01-05T15:56:06Z</dc:date>
    </item>
    <item>
      <title>Thanks for the help! I really</title>
      <link>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040443#M45845</link>
      <description>&lt;P&gt;Thanks for the help! I really appreciate it. I'll probably have another question in the near future.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 22:19:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040443#M45845</guid>
      <dc:creator>Christopher_C_</dc:creator>
      <dc:date>2015-01-05T22:19:00Z</dc:date>
    </item>
    <item>
      <title>Say I'm testing the method to</title>
      <link>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040444#M45846</link>
      <description>&lt;P style="line-height: 19.5120010375977px;"&gt;Say I'm testing the method to retrieve the index finger coordinates in the tutorial's HandAnalysis sample and I want to print the finger's coordinates as soon as it's detected, meaning I want to insert that snippet of code into:&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:;" style="font-size: 13px; line-height: 19.5120010375977px;"&gt;case PXCHandData::ALERT_HAND_DETECTED:
					{
						wprintf_s(L"Last Alert: Hand Detected\n");
						break;
					}&lt;/PRE&gt;

&lt;P style="line-height: 19.5120010375977px;"&gt;QUESTION: How would I initialize an iHand*?&lt;/P&gt;

&lt;P style="line-height: 19.5120010375977px;"&gt;I see that in the documentation:&lt;/P&gt;

&lt;P style="line-height: 19.5120010375977px;"&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: 'Courier New'; line-height: normal;"&gt;&lt;SPAN class="highlight" id="highlight" name="highlight" style="background: rgb(255, 255, 64);"&gt;QueryTrackedJoint&lt;/SPAN&gt;(&lt;/SPAN&gt;&lt;A class="topiclink" href="https://software.intel.com/sites/landingpage/realsense/camera-sdk/2014gold/documentation/html/jointtype_pxchanddata.html" style="font-family: 'Courier New'; line-height: normal;"&gt;JointType&lt;/A&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: 'Courier New'; line-height: normal;"&gt;&amp;nbsp;label,&amp;nbsp;&lt;/SPAN&gt;&lt;A class="topiclink" href="https://software.intel.com/sites/landingpage/realsense/camera-sdk/2014gold/documentation/html/jointdata_pxchanddata.html" style="font-family: 'Courier New'; line-height: normal;"&gt;JointData&lt;/A&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: 'Courier New'; line-height: normal;"&gt;&amp;nbsp;&amp;amp;data);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="line-height: 19.5120010375977px;"&gt;means that this function takes in a Joint type enumerator and a jointdata pointer (which I'm assuming I have to insert something like nodes[hand][index finger]. But when I try to create a local iHand* variable, it states that i have not initialized the pointer. This means I'm doing something like this:&lt;/P&gt;

&lt;PRE class="brush:;" style="font-size: 13px; line-height: 19.5120010375977px;"&gt;case PXCHandData::ALERT_HAND_DETECTED:
					{
						wprintf_s(L"Last Alert: Hand Detected\n");
						PXCHandData::IHand* handData;
handData-&amp;gt; QueryTrackedJoint(PXCHandData::JOINT_INDEX_TIP,nodes[1][4]);//the nodes array address isn't correct, using this as and example

						break;
					}&lt;/PRE&gt;

&lt;P style="line-height: 19.5120010375977px;"&gt;I know my error is somewhat treating the QueryTrackedJoint as a static function as it kind of seems intuitive to me that this function just returns the tracked joint data to the node I want to store it in. But apparently this is wrong and I'm having a hard time figuring out how to initialize the iHand* for this purpose.&lt;/P&gt;

&lt;P style="line-height: 19.5120010375977px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="line-height: 19.5120010375977px;"&gt;Also, given that we constructed nodes[][] in the&amp;nbsp;&lt;SPAN style="line-height: 19.5120010375977px;"&gt;the tutorial's HandAnalysis, which array index would we find the index finger tip at?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2015 08:58:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040444#M45846</guid>
      <dc:creator>Christopher_C_</dc:creator>
      <dc:date>2015-01-06T08:58:00Z</dc:date>
    </item>
    <item>
      <title>In the code below handData is</title>
      <link>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040445#M45847</link>
      <description>&lt;P&gt;In the code below handData is a PXCHandData* that has already been initialized..&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;PXCHandData::IHand* iHand;
				
// Get hand by time of appearance 
// The value 0 means that we are only interested in the first hand that was detected
// If you want to track multiple hands then you will need to loop this
if(handData-&amp;gt;QueryHandData(PXCHandData::AccessOrderType::ACCESS_ORDER_BY_TIME,0,iHand) == PXC_STATUS_NO_ERROR)
{ 
   for(int j = 0; j &amp;lt; PXCHandData::NUMBER_OF_JOINTS ; j++)
	iHand-&amp;gt;QueryTrackedJoint((PXCHandData::JointType)j,nodes[0]&lt;J&gt;);
}&lt;/J&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 15:04:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040445#M45847</guid>
      <dc:creator>Alain_Labrie</dc:creator>
      <dc:date>2015-01-07T15:04:07Z</dc:date>
    </item>
    <item>
      <title>I cannot stress how much I</title>
      <link>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040446#M45848</link>
      <description>&lt;P&gt;I cannot stress how much I appreciate your help!&lt;/P&gt;

&lt;P&gt;I finally found out I had the wrong tutorial files, meaning that a majority of the code had been changed (which I still don't get because I swear I'm downloading them from the correct link, it might have to do with my browser's cache).&lt;/P&gt;

&lt;P&gt;Anyways, I decided to scrap tutorial 3 (hand tracking analysis) and decided the implement my code in tutorial 2 (the raw streams tutorial). However, I'm coming to yet another problem.&lt;/P&gt;

&lt;P&gt;I decided to implement the same thing to tutorial 2, which is tracking the position of my index finger.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Attached below is basically what I changed to the file.&lt;/P&gt;

&lt;P&gt;However, when I run the program, I'm stuck with the console window only printing out -107374176.000000&lt;/P&gt;

&lt;P&gt;This means that I'm not correctly tracking my index finger (side note: I'm only trying to track the first available hand's index finger).&lt;/P&gt;

&lt;P&gt;If possible, could you tell me what I'm doing wrong/help me implement what I'm trying to do? I'm still unfamiliar with intel's realsense library even though I've been reading the documentation.&lt;/P&gt;

&lt;P&gt;Thanks for your time!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2015 09:28:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040446#M45848</guid>
      <dc:creator>Christopher_C_</dc:creator>
      <dc:date>2015-01-08T09:28:23Z</dc:date>
    </item>
    <item>
      <title>I took a look at the code you</title>
      <link>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040447#M45849</link>
      <description>&lt;P&gt;I took a look at the code you sent me, and you have 2 issues.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;1) You were not calling outputData-&amp;gt;Update() in your loop&lt;/P&gt;

&lt;P&gt;2) It's bad practice but you can declare an array of one object node[1][1]. The problem is that you were trying to access it with the wrong indecies. You need to use node[0][0]. I re-wrote your code and replaced node[1][1] with a variable called myIndex.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;	while (psm-&amp;gt;AcquireFrame(true) &amp;gt;= PXC_STATUS_NO_ERROR){

		// This function blocks until all streams are ready (depth and color)
		// if false streams will be unaligned
		if (psm-&amp;gt;AcquireFrame(true)&amp;lt;PXC_STATUS_NO_ERROR) break; 

		// retrieve all available image samples
		PXCCapture::Sample *sample = psm-&amp;gt;QuerySample();

		// retrieve the image or frame by type from the sample
		colorIm = sample-&amp;gt;color;
		depthIm = sample-&amp;gt;depth;

		// render the frame
		if (!renderColor-&amp;gt;RenderFrame(colorIm)) break;
		if (!renderDepth-&amp;gt;RenderFrame(depthIm)) break;

		outputData-&amp;gt;Update();
		PXCHandData::JointData myIndex = {};
		PXCHandData::IHand* iHand;
		if (outputData-&amp;gt;QueryHandData(PXCHandData::AccessOrderType::ACCESS_ORDER_BY_TIME, 0, iHand) == PXC_STATUS_NO_ERROR)
		{
			iHand-&amp;gt;QueryTrackedJoint(PXCHandData::JOINT_INDEX_TIP, myIndex);
		}

		wprintf_s(L"%f\n", myIndex.positionImage.x);

		// release or unlock the current frame to fetch the next frame
		psm-&amp;gt;ReleaseFrame();
	}&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Good Luck&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2015 15:24:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040447#M45849</guid>
      <dc:creator>Alain_Labrie</dc:creator>
      <dc:date>2015-01-08T15:24:00Z</dc:date>
    </item>
    <item>
      <title>Thanks so much for your time</title>
      <link>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040448#M45850</link>
      <description>&lt;P&gt;Thanks so much for your time and help! If I happen to place in the contest drinks will be on me&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2015 19:16:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Finger-Coordinates-question-OpenGL-question/m-p/1040448#M45850</guid>
      <dc:creator>Christopher_C_</dc:creator>
      <dc:date>2015-01-08T19:16:04Z</dc:date>
    </item>
  </channel>
</rss>

