<?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 PXCMFaceConfiguration.RecognitionConfiguration.SetDatabaseBuffer(buffer); in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/PXCMFaceConfiguration-RecognitionConfiguration-SetDatabaseBuffer/m-p/1089471#M64751</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I am having a play with the sample Face Recognition application and I have read on these forums (and in the help documentation) that I am able to Set the Database Buffer at run-time so as to allow me to swap databases.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;I have tried to use the following code:&lt;/P&gt;

&lt;PRE class="brush:csharp;"&gt;            // Allocate the buffer to save the database
            PXCMFaceData.RecognitionModuleData recognitionModuleData = _faceData.QueryRecognitionModule();
            Int32 nBytes = recognitionModuleData.QueryDatabaseSize();
            Byte[] buffer = new Byte[nBytes];

            // Retrieve the database buffer
            recognitionModuleData.QueryDatabaseBuffer(buffer);

            // Save the buffer to a file
            // (NOTE: production software should use file encryption for privacy protection)

            File.WriteAllBytes(_faceDataReadWriter.FullPathToFiles + DatabaseFilename, buffer);

            _recognitionConfig.SetDatabaseBuffer(buffer); &lt;/PRE&gt;

&lt;P&gt;However when the line to Set the Database Buffer is hit I get this error:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;{"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."}&lt;/P&gt;

&lt;P&gt;Please advise as to what I need to do to be able to swap the database buffers at run time.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I am using 2016 R 2 of the SDK&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Many thanks&lt;/P&gt;

&lt;P&gt;R&lt;/P&gt;</description>
    <pubDate>Mon, 08 Aug 2016 13:37:44 GMT</pubDate>
    <dc:creator>Raja_R_</dc:creator>
    <dc:date>2016-08-08T13:37:44Z</dc:date>
    <item>
      <title>PXCMFaceConfiguration.RecognitionConfiguration.SetDatabaseBuffer(buffer);</title>
      <link>https://community.intel.com/t5/Software-Archive/PXCMFaceConfiguration-RecognitionConfiguration-SetDatabaseBuffer/m-p/1089471#M64751</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I am having a play with the sample Face Recognition application and I have read on these forums (and in the help documentation) that I am able to Set the Database Buffer at run-time so as to allow me to swap databases.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;I have tried to use the following code:&lt;/P&gt;

&lt;PRE class="brush:csharp;"&gt;            // Allocate the buffer to save the database
            PXCMFaceData.RecognitionModuleData recognitionModuleData = _faceData.QueryRecognitionModule();
            Int32 nBytes = recognitionModuleData.QueryDatabaseSize();
            Byte[] buffer = new Byte[nBytes];

            // Retrieve the database buffer
            recognitionModuleData.QueryDatabaseBuffer(buffer);

            // Save the buffer to a file
            // (NOTE: production software should use file encryption for privacy protection)

            File.WriteAllBytes(_faceDataReadWriter.FullPathToFiles + DatabaseFilename, buffer);

            _recognitionConfig.SetDatabaseBuffer(buffer); &lt;/PRE&gt;

&lt;P&gt;However when the line to Set the Database Buffer is hit I get this error:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;{"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."}&lt;/P&gt;

&lt;P&gt;Please advise as to what I need to do to be able to swap the database buffers at run time.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I am using 2016 R 2 of the SDK&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Many thanks&lt;/P&gt;

&lt;P&gt;R&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 13:37:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/PXCMFaceConfiguration-RecognitionConfiguration-SetDatabaseBuffer/m-p/1089471#M64751</guid>
      <dc:creator>Raja_R_</dc:creator>
      <dc:date>2016-08-08T13:37:44Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Software-Archive/PXCMFaceConfiguration-RecognitionConfiguration-SetDatabaseBuffer/m-p/1089472#M64752</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Anyone at Intel able to assist with this?&lt;/P&gt;

&lt;P&gt;TIA&lt;/P&gt;

&lt;P&gt;R&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 07:17:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/PXCMFaceConfiguration-RecognitionConfiguration-SetDatabaseBuffer/m-p/1089472#M64752</guid>
      <dc:creator>Raja_R_</dc:creator>
      <dc:date>2016-08-15T07:17:00Z</dc:date>
    </item>
  </channel>
</rss>

