Items with no label
3335 Discussions

Intel RealSense SR300 comparing detected face with a face from an external source

OMore3
Beginner
7,137 Views

I recently purchased the SR300 camera for a project I am working on. I need to save the recognized user in a database, so the app can load the data later for the camera to recognize the user as a registered user. I downloaded a sample application from the Intel website that allows users to register/unregister and save the registerd users to a database. The application is supposed to load the database and compare the detected face with a face stored in the loaded database, all featues in the sample application works, it detects users and register the user, but it nevers recognizes the user if the user is loaded from the database. I made sure all the drivers are up to date, and my computer meets the requirements. I also tried keeping the user's data in memory, reinitializing the camera, and set the user's data back to RecognitionConfiguration , and it didn't work. Can someone please help me?

0 Kudos
44 Replies
MartyG
Honored Contributor III
511 Views

If you are asking if RealSense can use an image of a person that was not saved by RealSense: as the camera saves the ID as data about the face instead of an image such as jpg or png, it is unlikely that it could confirm an ID with a photograph of a person. Image recognition like that would involve a different kind of tool called Object Recognition, where the camera compares an object it is looking at to pictures of objects and tries to decide what the object it is looking at is.

For example, if it is seeing an object shaped like a laptop then it will look at its stored images and see that the image resembles (but not looks exactly like) its image of what a laptop looks like.

如果您询问RealSense是否可以使用RealSense未保存的人员的图像:由于相机将ID保存为有关脸部的数据而不是诸如jpg或png之类的图像,因此可能无法确认ID 与一个人的照片。 像这样的图像识别将涉及一种不同类型的工具,称为对象识别,其中相机将其正在查看的对象与对象的图片进行比较,并尝试确定它所查看的对象是什么。

例如,如果它看到一个像笔记本电脑一样的物体,那么它将会看到它存储的图像,并且看到它的图像类似于(而不是看起来完全相同)它的笔记本电脑的图像。

0 Kudos
磊张3
Beginner
511 Views

I have successfully run the c # face recognition example, and I will save the face information to the mysql database, but when I restart the program, and import the database to the memory of the case, no match success Is why?

// save face to mysql

PXCMFaceData.RecognitionModuleData recognitionModuleData = faceData.QueryRecognitionModule();

Int32 nBytes = recognitionModuleData.QueryDatabaseSize();

Byte[] buffer = new Byte[nBytes];

recognitionModuleData.QueryDatabaseBuffer(buffer);

faceMysql.getmysqlcom("insert into face (faceRec) values (@img)", buffer);

//LoadData from mysql dabatabase

MySqlDataReader faceMysqlData = faceMysql.getmysqlread("select faceRec,OCTET_LENGTH(faceRec) as len from face Where faceRec is not null And OCTET_LENGTH(faceRec) > 0");

if (faceMysqlData != null)

{

Byte[] addByte = new Byte[0];

while (faceMysqlData.Read())

{

int length = (int)faceMysqlData.GetInt64("len");

if (length > 0)

{

Byte[] bt = new byte[length];

try

{

faceMysqlData.GetBytes(faceMysqlData.GetOrdinal("faceRec"), 0, bt, 0, length);

recognitionConfig.SetDatabaseBuffer(bt);

}

catch (Exception e)

}

}

}

}

0 Kudos
MartyG
Honored Contributor III
511 Views

Because you are loading the data in from a MySQL database, this makes the problem more difficult to diagnose because there is no information to study about how other people have done this with MySQL.

For the moment, I would suggest reading this long discussion about databases and see if there is anything there that helps you with your problem.

At the end of that discussion on page 2, a user posted their own database script.

In that script, the user uses the registration mode CONTINUOUS. When someone had a problem with retaining a registered face, Intel support member Colleen Culbertson suggested changing registration from Continuous to On Demand mode. I.e change

REGISTRATION_MODE_CONTINUOUS

to

REGISTRATION_MODE_ON_DEMAND

In other words:

SetRegistrationMode(PXCFaceConfiguration::RecognitionConfiguration::REGISTRATION_MODE_ON_DEMAND);

0 Kudos
Reply