예제 #1
0
        private void SaveDB()
        {
            PXCMFaceData.RecognitionModuleData rmd = faceData.QueryRecognitionModule();
            Int32 nbytes = rmd.QueryDatabaseSize();

            Byte[] buffer = new Byte[nbytes];
            rmd.QueryDatabaseBuffer(buffer);
            File.WriteAllBytes(DB_FILE, buffer);
        }
        public static void SaveDatabaseToFile()
        {
            // 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(DatabaseFilename, buffer);
            dbState = "Saved";
        }