ShiqiYu / libfacedetection

An open source library for face detection in images. The face detection speed can reach 1000FPS.
Other
12.28k stars 3.05k forks source link

Confused about the pointer pResults #29

Closed JackyWang-001 closed 7 years ago

JackyWang-001 commented 7 years ago

Dear Mr Yu, Hello,sir! You libfacedetection lib is so cool, thanks for your contribution.Now I have a quertion,that is about the poter pResults. In the code the face rectangular box together with the 68 key points neighbors and yaw angle can be get from the pResults. In fact I do not understand how to get all these just by short p = ((short)(pResults + 1)) + 142 * i. Look forward for your reply! Thank you!

ShiqiYu commented 7 years ago

The data structure in pResults is as follows: int nFaceCount; short face1_x; short face1_y; short face1_width; short face1_height; short face1_neightbors; short face1_angle; short face1_point1_x; short face1_point1_y; ... short face1_point68_x; short face1_point68_y; short face2_x; short face2_y; short face2_width; short face2_height; short face2_neightbors; short face2_angle; short face2_point1_x; short face2_point1_y; ... short face2_point68_x; short face2_point68_y; ...

mrbesen commented 3 years ago

is there a document that describes the meaning of each point?

fengyuentau commented 2 years ago

@mrbesen No, but we have comments in samples: https://github.com/ShiqiYu/libfacedetection/blob/9ffcaef50173787e6da7d37326a9976d79962e89/example/detect-image.cpp#L106-L111

https://github.com/ShiqiYu/libfacedetection/blob/9ffcaef50173787e6da7d37326a9976d79962e89/opencv_dnn/cpp/priorbox.cpp#L98-L115