Implement dlib_vector_length to calculate the euclidean distance of the vectors

It not use the 'length' native versions of dlib, due I have to convert the
array to the vector, which will take the same time, and then I will use the
native method.
This commit is contained in:
Matias De lellis
2020-04-14 09:45:16 -03:00
parent 78819eb815
commit 4a2e4ff112
7 changed files with 94 additions and 8 deletions

View File

@@ -27,12 +27,14 @@ extern "C" {
#include "php_ini.h"
#include "ext/standard/info.h"
}
#include "php_pdlib.h"
#include "src/chinese_whispers.h"
#include "src/face_detection.h"
#include "src/face_recognition.h"
#include "src/cnn_face_detection.h"
#include "src/face_landmark_detection.h"
#include "src/vector.h"
/* If you declare any globals in php_pdlib.h uncomment this:
ZEND_DECLARE_MODULE_GLOBALS(pdlib)
@@ -260,10 +262,11 @@ PHP_MINFO_FUNCTION(pdlib)
* Every user visible function must have an entry in pdlib_functions[].
*/
const zend_function_entry pdlib_functions[] = {
PHP_FE(confirm_pdlib_compiled, NULL)
PHP_FE(confirm_pdlib_compiled, NULL)
PHP_FE(dlib_chinese_whispers, dlib_chinese_whispers_arginfo)
PHP_FE(dlib_face_detection, dlib_face_detection_arginfo)
PHP_FE(dlib_face_landmark_detection, dlib_face_landmark_detection_arginfo)
PHP_FE(dlib_vector_length, dlib_vector_length_arginfo)
PHP_FE_END /* Must be the last line in pdlib_functions[] */
};
/* }}} */