diff --git a/modules/objdetect/doc/pics/lena-face-detection.jpg b/modules/objdetect/doc/pics/lena-face-detection.jpg new file mode 100644 index 0000000000..d8b1e660ca Binary files /dev/null and b/modules/objdetect/doc/pics/lena-face-detection.jpg differ diff --git a/modules/objdetect/include/opencv2/objdetect/face.hpp b/modules/objdetect/include/opencv2/objdetect/face.hpp index 1b3681c652..a8e98c4012 100644 --- a/modules/objdetect/include/opencv2/objdetect/face.hpp +++ b/modules/objdetect/include/opencv2/objdetect/face.hpp @@ -54,10 +54,20 @@ public: CV_WRAP virtual int getTopK() = 0; - /** @brief A simple interface to detect face from given image - * + /** @brief Detects faces in the input image. Following is an example output. + + * ![image](pics/lena-face-detection.jpg) + * @param image an image to detect - * @param faces detection results stored in a cv::Mat + * @param faces detection results stored in a 2D cv::Mat of shape [num_faces, 15] + * - 0-1: x, y of bbox top left corner + * - 2-3: width, height of bbox + * - 4-5: x, y of right eye (blue point in the example image) + * - 6-7: x, y of left eye (red point in the example image) + * - 8-9: x, y of nose tip (green point in the example image) + * - 10-11: x, y of right corner of mouth (pink point in the example image) + * - 12-13: x, y of left corner of mouth (yellow point in the example image) + * - 14: face score */ CV_WRAP virtual int detect(InputArray image, OutputArray faces) = 0;