Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Raja_R_
Beginner
50 Views

PXCMFaceConfiguration.RecognitionConfiguration.SetDatabaseBuffer(buffer);

Hello,

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.

I have tried to use the following code:

            // 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); 

However when the line to Set the Database Buffer is hit I get this error:

 {"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."}

Please advise as to what I need to do to be able to swap the database buffers at run time. 

I am using 2016 R 2 of the SDK

Many thanks

R

0 Kudos
1 Reply
Raja_R_
Beginner
50 Views

Hello,

Anyone at Intel able to assist with this?

TIA

R

Reply