<?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 Hello Bryan. Thanks for the in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Face-recognition-CreateStorage-fails/m-p/1098500#M67775</link>
    <description>&lt;P&gt;Hello Bryan. Thanks for the quick reply.&lt;/P&gt;

&lt;P&gt;I've tried the project you linked at it worked well. In the code, return values of CreateStore() and UseStore() functions are not checked for error though. I've checked their return values via debugger and found out that they both return&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 18px;"&gt;PXCM_STATUS_FEATURE_UNSUPPORTED, even though the program works as excepted afterwards. So it seems that the returned status should be&amp;nbsp;&lt;/SPAN&gt;PXCM_STATUS_NO_ERROR.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 19.512px;"&gt;Also, it seems that the `out' keyword cannot be used for an inout parameter, i.e. the `out' value needs to be initialized in the function. So the code in the manual (and even in the FaceID project), which initializes RecognitionStorageDesc structure/class before the call to CreateStore(), is wrong.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Dec 2015 12:11:00 GMT</pubDate>
    <dc:creator>Tomáš_N_</dc:creator>
    <dc:date>2015-12-08T12:11:00Z</dc:date>
    <item>
      <title>Face recognition, CreateStorage() fails</title>
      <link>https://community.intel.com/t5/Software-Archive/Face-recognition-CreateStorage-fails/m-p/1098498#M67773</link>
      <description>Hi. I'm trying to make very simple program in C# to test RealSense face recognition API. I've followed the manual but soon I discovered that there's probably a mistake in manual. In the example 74, in the "Face Recognition" section, there's

PXCMFaceConfiguration.RecognitionConfiguration.RecognitionStorageDesc desc=new PXCMFaceConfiguration.RecognitionConfiguration.RecognitionStorageDesc();
desc.maxUsers=10;
rcfg.CreateStorage("MyDB", desc);

However, the second parameter of CreateStorage() function is defined as `out' in the API. Does it even make sense to initialize the reference before the call? Is it some kind of in-out parameter? Sorry, I'm quite unfamiliar with C#. Nevertheless, the code in the manual doesn't compile.

Here's the portion of my code to initialize the face recognition (psm is PXCMSession):

        rc = psm.EnableFace();
        if (!rc.IsSuccessful())
            fail("PXCMSenseManager.EnableFace() failed", rc);
        var faceModule = psm.QueryFace();
        var faceCfg = faceModule.CreateActiveConfiguration();
        //rc = faceCfg.SetTrackingMode(PXCMFaceConfiguration.TrackingModeType.FACE_MODE_COLOR_PLUS_DEPTH);
        //if (!rc.IsSuccessful())
        //    fail("PXCMFaceConfiguration.SetTrackingMode() failed", rc);
        var recogCfg = faceCfg.QueryRecognition();
        recogCfg.Enable();
        if (!rc.IsSuccessful())
            fail("PXCMFaceConfiguration.RecognitionConfiguration.Enable() failed", rc);
        PXCMFaceConfiguration.RecognitionConfiguration.RecognitionStorageDesc recogDesc = new PXCMFaceConfiguration.RecognitionConfiguration.RecognitionStorageDesc();
        recogDesc.maxUsers = 10;
        rc = recogCfg.CreateStorage("UserDB", out recogDesc);
        if (!rc.IsSuccessful())
            fail("PXCMFaceConfiguration.RecognitionConfiguration.CreateStorage() failed", rc);
        rc = recogCfg.UseStorage("UserDB");
        if (!rc.IsSuccessful())
            fail("PXCMFaceConfiguration.RecognitionConfiguration.UseStorage() failed", rc);
        recogCfg.SetRegistrationMode(PXCMFaceConfiguration.RecognitionConfiguration.RecognitionRegistrationMode.REGISTRATION_MODE_CONTINUOUS);
        rc = faceCfg.ApplyChanges();
        if (!rc.IsSuccessful())
            fail("PXCMFaceConfiguration.ApplyChanges() failed", rc);
        faceCfg.Dispose();

The code fails everytime on the CreateStorage() with PXCM_STATUS_FEATURE_UNSUPPORTED.

I've F200 Camera. I'm testing it on Windows 10. RSSDK is r5_7.0.23.8048 (it happened with R4 too).

Thank you for help.

Sorry for not using proper formatting but Intel's forum editor is unbelievable crap.</description>
      <pubDate>Mon, 07 Dec 2015 14:47:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Face-recognition-CreateStorage-fails/m-p/1098498#M67773</guid>
      <dc:creator>Tomáš_N_</dc:creator>
      <dc:date>2015-12-07T14:47:51Z</dc:date>
    </item>
    <item>
      <title>Hi Tomas,</title>
      <link>https://community.intel.com/t5/Software-Archive/Face-recognition-CreateStorage-fails/m-p/1098499#M67774</link>
      <description>&lt;P&gt;Hi Tomas,&lt;/P&gt;

&lt;P&gt;It looks like you are correct about the manual omitting the out parameter modifier, thanks for pointing that out. There is a C# facial recognition code sample available that you might want to take a look at:&amp;nbsp;https://software.intel.com/en-us/articles/code-sample-facial-recognition-using-intel-realsense-sdk.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Hope this helps, Bryan&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2015 23:23:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Face-recognition-CreateStorage-fails/m-p/1098499#M67774</guid>
      <dc:creator>Bryan_B_Intel1</dc:creator>
      <dc:date>2015-12-07T23:23:23Z</dc:date>
    </item>
    <item>
      <title>Hello Bryan. Thanks for the</title>
      <link>https://community.intel.com/t5/Software-Archive/Face-recognition-CreateStorage-fails/m-p/1098500#M67775</link>
      <description>&lt;P&gt;Hello Bryan. Thanks for the quick reply.&lt;/P&gt;

&lt;P&gt;I've tried the project you linked at it worked well. In the code, return values of CreateStore() and UseStore() functions are not checked for error though. I've checked their return values via debugger and found out that they both return&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 18px;"&gt;PXCM_STATUS_FEATURE_UNSUPPORTED, even though the program works as excepted afterwards. So it seems that the returned status should be&amp;nbsp;&lt;/SPAN&gt;PXCM_STATUS_NO_ERROR.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 19.512px;"&gt;Also, it seems that the `out' keyword cannot be used for an inout parameter, i.e. the `out' value needs to be initialized in the function. So the code in the manual (and even in the FaceID project), which initializes RecognitionStorageDesc structure/class before the call to CreateStore(), is wrong.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 12:11:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Face-recognition-CreateStorage-fails/m-p/1098500#M67775</guid>
      <dc:creator>Tomáš_N_</dc:creator>
      <dc:date>2015-12-08T12:11:00Z</dc:date>
    </item>
  </channel>
</rss>

