Scenario: i use a sql database for saving the face descriptor and eventually a hash for this descriptor. Database can be huge. I m searching a way gor identify a generic face present in a image(image can be from another panorama) having his descriptor in database
img is the image variable: DescriptorExtractor descriptor = DescriptorExtractor.create(DescriptorExtractor.ORB);
System.loadLibrary(Core.NATIVE_LIBRARY_NAME); Mat img_1=Imgcodecs.imread(img);
MatOfKeyPoint kp_1 = new MatOfKeyPoint();
FeatureDetector fd = FeatureDetector.create(FeatureDetector.FAST); fd.detect(img_1, kp_1); descriptor.compute(img_1,kp_1,descriptors_1);
If i save the descriptor in db and also its hashcode.
when i want identify a face in a image... i extract the descriptor from that image and i calculate his hashcode. Then i query in database all descrioptors with same hashcode(rarely can be more than 1). Then i compare the descriptor present in db with the descriptor from image.
Can this algorithm work correctly? How to compare Mat classes? How to create a hashcode from Mat class?