We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
Would you please provide eye, nose tip and mouth locations from lm vector ( p[5 + lmidx] ):
int* facedetect_cnn(unsigned char * result_buffer, //buffer memory for storing face detection results, !!its size must be 0x9000 Bytes!! unsigned char * rgb_image_data, int width, int height, int step) //input image, it must be BGR (three-channel) image! { if (!result_buffer) { fprintf(stderr, "%s: null buffer memory.\n", __FUNCTION__); return NULL; } //clear memory result_buffer[0] = 0; result_buffer[1] = 0; result_buffer[2] = 0; result_buffer[3] = 0; std::vector<FaceRect> faces = objectdetect_cnn(rgb_image_data, width, height, step); int num_faces =(int)faces.size(); num_faces = MIN(num_faces, 1024); //1024 = 0x9000 / (16 * 2 + 4) int * pCount = (int *)result_buffer; pCount[0] = num_faces; for (int i = 0; i < num_faces; i++) { //copy data short * p = ((short*)(result_buffer + 4)) + 16 * size_t(i); p[0] = (short)(faces[i].score * 100); p[1] = (short)faces[i].x; p[2] = (short)faces[i].y; p[3] = (short)faces[i].w; p[4] = (short)faces[i].h; //copy landmarks for (int lmidx = 0; lmidx < 10; lmidx++) { p[5 + lmidx] = (short)faces[i].lm[lmidx]; } } return pCount; }
Best regards.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
Would you please provide eye, nose tip and mouth locations from lm vector ( p[5 + lmidx] ):
Best regards.
The text was updated successfully, but these errors were encountered: