- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
in my code for saving the recognition file, the "nbytes" variable always return null value. but when I try to develop in winform, it runs no error. and this is the part of my code.
private void registerButton_Click(object sender, RoutedEventArgs e)
{
faceData = face.CreateOutput();
faceData.Update();
var numOfFaceDetected = faceData.QueryNumberOfDetectedFaces();
if (faceData.QueryNumberOfDetectedFaces() <= 0)
return;
PXCMFaceData.Face qface = faceData.QueryFaceByIndex(0);
if (qface == null)
{
throw new Exception("PXCMFaceData.Face null");
}
PXCMFaceData.RecognitionData rdata = qface.QueryRecognition();
if (rdata == null)
{
throw new Exception(" PXCMFaceData.RecognitionData null");
}
PXCMFaceData.RecognitionModuleData rmd = faceData.QueryRecognitionModule();
Int32 nbytes = rmd.QueryDatabaseSize();
Byte[] buffer = new Byte[nbytes];
rmd.QueryDatabaseBuffer(buffer);
File.WriteAllBytes("text.txt", buffer);
rdata.RegisterUser();
id++;
AddDatabase(id);
faceData.Dispose();
}
I check the value of numOfFaceDetected return the right number of face detected. But, when I try to get the nbytes values, it returns null. But when I check in debug mode rmd.QueryDatabaseSize(); has unique value. Any solution? thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is known issue and we will fix it in the future release. Thanks for supporting RealSense SDK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i think you can save a serialized data to be *.dat file instead of saving it into txt file :D
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
oh, i suggest you to develop your apps in windows form. i have developed a WPF apps and i got unknown error, but when i develop it in windows form, using same algorithm, i had no error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have same problem with you. And I am still looking for solution. I hope anyone who can solve this problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi thoriq, can i see your code ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sorry, i have lost my code..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
David Lu (Intel) wrote:
This is known issue and we will fix it in the future release. Thanks for supporting RealSense SDK.
Hi David,
I saved Face Data to a .dat file. Next time RealSense demo starts, it automatically load the .dat file. But after the same face into Camera's view, RealSense cannot recognize the face until about 1300ms later. In other words, after loaded registered face data, RealSense cannot recognize the face right now. I write the demo reference to DF_FaceTracking, RecognitionModuleData::QueryDatbaseBuffer() is used to save face data, RecognitionConfiguration::SetDatabaseBuffer() is used to load face data. Do anything else need I to do? Thank you.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page