<?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 Face Recognition problem in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Face-Recognition-problem/m-p/1035510#M43768</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;

&lt;P&gt;I've created a small face recognition program, based on the SDK documentation and I believe the detected user is not registering to the database as it should. The program only returns "New USER registered: -1" (which is the return value for QueryUserID() for an unregistered user)&amp;nbsp;. I must be doing something wrong there...&lt;/P&gt;

&lt;P&gt;I am pasting the code in here, can anyone help please?&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;PXCFaceConfiguration *facecfg = faceModule-&amp;gt;CreateActiveConfiguration();
PXCFaceConfiguration::RecognitionConfiguration *rcfg = facecfg-&amp;gt;QueryRecognition();
// Enable face recognition:
rcfg-&amp;gt;Enable();
// Create a recognition database:
PXCFaceConfiguration::RecognitionConfiguration::RecognitionStorageDesc desc={};
desc.maxUsers =10;
rcfg-&amp;gt;CreateStorage(L"DB1", &amp;amp;desc);
rcfg-&amp;gt;UseStorage(L"DB1");
// Set the Face Registration Mode:
rcfg-&amp;gt;SetRegistrationMode(PXCFaceConfiguration::RecognitionConfiguration::REGISTRATION_MODE_CONTINUOUS);
		
facecfg-&amp;gt;EnableAllAlerts();
facecfg-&amp;gt;ApplyChanges();
facecfg-&amp;gt;Release();

PXCFaceData *fdata = faceModule-&amp;gt;CreateOutput();
fdata-&amp;gt;Update();

if (fdata == NULL)
{
	wprintf_s(L"PXCFaceData fdata is NULL!!!\n");
}
wprintf_s(L"Number of faces detected: %d \n", fdata-&amp;gt;QueryNumberOfDetectedFaces());
if(fdata-&amp;gt;QueryNumberOfDetectedFaces()&amp;gt;0)
{
	PXCFaceData::Face *faceData = fdata-&amp;gt;QueryFaceByIndex(0);
	PXCFaceData::RecognitionData *recognitionData = faceData-&amp;gt;QueryRecognition();

	if (recognitionData != NULL)
	{
	       // recognize the current face?
		pxcI32 uid = recognitionData-&amp;gt;QueryUserID(); 
		if (uid &amp;gt;= 0)
		{
			// User recognized:
			wprintf_s(L"	USER recognized: %d\n", uid);
		} else
		{
			recognitionData-&amp;gt;RegisterUser();
			wprintf_s(L"	New USER registered: %d\n", recognitionData-&amp;gt;QueryUserID());
		}
	}		
}
		fdata-&amp;gt;Release();&lt;/PRE&gt;

&lt;P&gt;Thank you and Happy New Year!&lt;/P&gt;</description>
    <pubDate>Tue, 30 Dec 2014 09:10:03 GMT</pubDate>
    <dc:creator>tony2</dc:creator>
    <dc:date>2014-12-30T09:10:03Z</dc:date>
    <item>
      <title>Face Recognition problem</title>
      <link>https://community.intel.com/t5/Software-Archive/Face-Recognition-problem/m-p/1035510#M43768</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;

&lt;P&gt;I've created a small face recognition program, based on the SDK documentation and I believe the detected user is not registering to the database as it should. The program only returns "New USER registered: -1" (which is the return value for QueryUserID() for an unregistered user)&amp;nbsp;. I must be doing something wrong there...&lt;/P&gt;

&lt;P&gt;I am pasting the code in here, can anyone help please?&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;PXCFaceConfiguration *facecfg = faceModule-&amp;gt;CreateActiveConfiguration();
PXCFaceConfiguration::RecognitionConfiguration *rcfg = facecfg-&amp;gt;QueryRecognition();
// Enable face recognition:
rcfg-&amp;gt;Enable();
// Create a recognition database:
PXCFaceConfiguration::RecognitionConfiguration::RecognitionStorageDesc desc={};
desc.maxUsers =10;
rcfg-&amp;gt;CreateStorage(L"DB1", &amp;amp;desc);
rcfg-&amp;gt;UseStorage(L"DB1");
// Set the Face Registration Mode:
rcfg-&amp;gt;SetRegistrationMode(PXCFaceConfiguration::RecognitionConfiguration::REGISTRATION_MODE_CONTINUOUS);
		
facecfg-&amp;gt;EnableAllAlerts();
facecfg-&amp;gt;ApplyChanges();
facecfg-&amp;gt;Release();

PXCFaceData *fdata = faceModule-&amp;gt;CreateOutput();
fdata-&amp;gt;Update();

if (fdata == NULL)
{
	wprintf_s(L"PXCFaceData fdata is NULL!!!\n");
}
wprintf_s(L"Number of faces detected: %d \n", fdata-&amp;gt;QueryNumberOfDetectedFaces());
if(fdata-&amp;gt;QueryNumberOfDetectedFaces()&amp;gt;0)
{
	PXCFaceData::Face *faceData = fdata-&amp;gt;QueryFaceByIndex(0);
	PXCFaceData::RecognitionData *recognitionData = faceData-&amp;gt;QueryRecognition();

	if (recognitionData != NULL)
	{
	       // recognize the current face?
		pxcI32 uid = recognitionData-&amp;gt;QueryUserID(); 
		if (uid &amp;gt;= 0)
		{
			// User recognized:
			wprintf_s(L"	USER recognized: %d\n", uid);
		} else
		{
			recognitionData-&amp;gt;RegisterUser();
			wprintf_s(L"	New USER registered: %d\n", recognitionData-&amp;gt;QueryUserID());
		}
	}		
}
		fdata-&amp;gt;Release();&lt;/PRE&gt;

&lt;P&gt;Thank you and Happy New Year!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Dec 2014 09:10:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Face-Recognition-problem/m-p/1035510#M43768</guid>
      <dc:creator>tony2</dc:creator>
      <dc:date>2014-12-30T09:10:03Z</dc:date>
    </item>
    <item>
      <title>Please see the link below</title>
      <link>https://community.intel.com/t5/Software-Archive/Face-Recognition-problem/m-p/1035511#M43769</link>
      <description>&lt;P&gt;Please see the link below which is the forum topic for the same:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/forums/topic/536453" target="_blank"&gt;https://software.intel.com/en-us/forums/topic/536453&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2014 06:06:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Face-Recognition-problem/m-p/1035511#M43769</guid>
      <dc:creator>Linda_M_</dc:creator>
      <dc:date>2014-12-31T06:06:21Z</dc:date>
    </item>
    <item>
      <title>Hi Linda!</title>
      <link>https://community.intel.com/t5/Software-Archive/Face-Recognition-problem/m-p/1035512#M43770</link>
      <description>&lt;P&gt;Hi Linda!&lt;/P&gt;

&lt;P&gt;I understand the User ID incremental problem, which is described in your link, but the problem posted here&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;is that I cannot register the user to the database... even if I perform RegisterUser() and straight afterwards I&amp;nbsp;&lt;/SPAN&gt;perform&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;QueryUserID(), I still get -1 in return.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2014 09:37:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Face-Recognition-problem/m-p/1035512#M43770</guid>
      <dc:creator>tony2</dc:creator>
      <dc:date>2014-12-31T09:37:28Z</dc:date>
    </item>
    <item>
      <title>Try on demand instead of</title>
      <link>https://community.intel.com/t5/Software-Archive/Face-Recognition-problem/m-p/1035513#M43771</link>
      <description>&lt;P&gt;Try on demand instead of continuous registration mode.&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 31 Dec 2014 16:52:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Face-Recognition-problem/m-p/1035513#M43771</guid>
      <dc:creator>Colleen_C_Intel</dc:creator>
      <dc:date>2014-12-31T16:52:24Z</dc:date>
    </item>
    <item>
      <title>Thanks Colleen!</title>
      <link>https://community.intel.com/t5/Software-Archive/Face-Recognition-problem/m-p/1035514#M43772</link>
      <description>&lt;P&gt;Thanks Colleen!&lt;/P&gt;

&lt;P&gt;I solved the problem: it was simply the mistake that I was creating the database in the &amp;nbsp;&lt;STRONG&gt;while (AcquireFrame) &lt;/STRONG&gt;loop, thus having a new database each frame...&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 08:46:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Face-Recognition-problem/m-p/1035514#M43772</guid>
      <dc:creator>tony2</dc:creator>
      <dc:date>2015-01-05T08:46:40Z</dc:date>
    </item>
  </channel>
</rss>

