[go: up one dir, main page]

WO2024146165A1 - Human eye positioning method and apparatus, and computing device and storage medium - Google Patents

Human eye positioning method and apparatus, and computing device and storage medium Download PDF

Info

Publication number
WO2024146165A1
WO2024146165A1 PCT/CN2023/118703 CN2023118703W WO2024146165A1 WO 2024146165 A1 WO2024146165 A1 WO 2024146165A1 CN 2023118703 W CN2023118703 W CN 2023118703W WO 2024146165 A1 WO2024146165 A1 WO 2024146165A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
processed
head posture
eye
coordinates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/118703
Other languages
French (fr)
Chinese (zh)
Inventor
唐小军
马希通
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Publication of WO2024146165A1 publication Critical patent/WO2024146165A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/18Eye characteristics, e.g. of the iris

Definitions

  • a method for locating human eyes comprising: performing facial key point detection on an image to be processed that includes a human face, and obtaining the facial key points in the image to be processed; determining head posture information based on the facial key points in the image to be processed, the head posture information being used to indicate a deflection angle between a person's head and a preset direction; determining the three-dimensional coordinates of the human eye based on the pupil distance of the human eye in the image to be processed, the camera parameters of a camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed.
  • head posture information is determined based on facial key points in an image to be processed, including: determining a head posture matrix based on facial key points in an image to be processed, the head posture matrix being used to represent the posture of the head in the image to be processed in the form of a matrix; determining values of target parameters based on the head posture matrix; determining head posture information based on the values of the target parameters and the head posture matrix.
  • the pixel coordinates are two-dimensional coordinates including abscissas and ordinates
  • the three-dimensional coordinates of the human eye include abscissas, ordinates, and depth coordinates of the left eye and abscissas, ordinates, and depth coordinates of the right eye;
  • the second determination module when used to determine the three-dimensional coordinates of the human eye based on the pupil distance of the human eye in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, is used to: determine the target head posture information based on the target head posture matrix; determine the three-dimensional coordinates of the human eye based on the pupil distance of the human eye, the camera parameters, the target head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye.
  • the detection module when used to perform facial key point detection on an image to be processed that includes a face and obtain the facial key points in the image to be processed, is used to: perform face detection based on the image to be processed to determine a face positioning frame in the image to be processed; perform facial key point detection based on the image portion corresponding to the face positioning frame to obtain the facial key points in the image to be processed.
  • the device also includes: a fourth determination module, used to determine the distance between the human eye and the camera based on the three-dimensional coordinates of the human eye; a sending module, used to send a prompt message when the distance is less than a set distance threshold, and the prompt message is used to prompt the user to increase the distance between the human eye and the camera.
  • a non-volatile computer-readable storage medium on which a program is stored.
  • the program is executed by a processor, the operations performed by the human eye positioning method provided in the first aspect and any one of the embodiments of the first aspect are implemented.
  • a computer program product which includes a computer program.
  • the computer program When the computer program is executed by a processor, it implements the operations performed by the human eye positioning method provided in the first aspect and any one of the embodiments of the first aspect.
  • the present application performs facial key point detection on an image to be processed that includes a human face to obtain the facial key points in the image to be processed; thereby, based on the facial key points in the image to be processed, head posture information for indicating the deflection angle between a person's head and a preset direction is determined; and then based on the human eye pupil distance in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, the three-dimensional coordinates of the human eye are determined, so as to achieve the purpose of correcting the human eye coordinates according to the head posture information, so that the position of the human eye in the image can be determined more accurately.
  • Step 202 determine head posture information based on the facial key points in the image to be processed, where the head posture information is used to indicate a deflection angle between the head of the person and a preset direction.
  • the head posture information may include a pitch angle (Pitch), a rotational yaw angle (Yaw) and a rotational roll angle (Roll).
  • Pitch pitch angle
  • Yaw rotational yaw angle
  • Roll rotational roll angle
  • FIG. 4 is a schematic diagram of a pitch angle, a rotational yaw angle and a rotational roll angle according to an embodiment of the present application. As shown in FIG.
  • the head posture information can be determined through the above process.
  • the head posture information and the head posture matrix can be converted to each other.
  • the conversion relationship can be seen in the following formula (4):
  • R head represents the head posture matrix
  • ⁇ x represents the pitch angle
  • ⁇ y represents the rotation yaw angle
  • ⁇ z represents the rotation roll angle
  • sin represents the sine value
  • cos represents the cosine value
  • the pixel coordinates of the left and right eyes can be corrected based on the head posture information to obtain the three-dimensional coordinates of the left and right eyes.
  • the three-dimensional coordinates are more accurate than the pixel coordinates, thereby improving the accuracy of the human eye positioning process.
  • the head posture matrix can also be transformed into a coordinate system to reduce the impact of the face not being in the center of the image on the process of determining the three-dimensional coordinates of the eye.
  • the coordinate system conversion can be achieved through the following steps.
  • Step 1 Determine the three-dimensional coordinates of the center points of the two eyes based on the camera parameters, the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed.
  • uc represents the horizontal coordinate of the center point of the two eyes
  • vc represents the vertical coordinate of the center point of the two eyes
  • ul represents the horizontal coordinate of the left eye
  • vl represents the vertical coordinate of the left eye
  • ur represents the horizontal coordinate of the right eye
  • vr represents the vertical coordinate of the right eye.
  • the three-dimensional coordinates of the center points of the two eyes can be determined based on the camera parameters and the pixel coordinates of the center points of the two eyes by the following formulas (10) and (11).
  • Step 2 Based on the three-dimensional coordinates of the center points of the two eyes, determine the rotation matrix, which is used to indicate the mapping relationship between the local coordinate system and the global coordinate system.
  • the rotation matrix can be determined by the following formulas (12) to (16):
  • C 2 C 2 ′/
  • C 1 cross(C 2 , C 3 ) (15)
  • R local [C 1 C 2 C 3 ] (16)
  • Step 3 Based on the rotation matrix and the head posture matrix, determine the target head posture matrix corresponding to the head posture matrix in the global coordinate system.
  • the depth coordinate in the three-dimensional vertical coordinate of the human eye can be directly used as the distance between the human eye and the camera.
  • the prompt information can be voice prompt information, text prompt information, etc., and the present application does not limit the specific type of the prompt information.
  • FIG. 6 is a schematic diagram of the structure of a human eye positioning device according to the embodiment of the present application. As shown in FIG. 6 , the device includes:
  • the second determination module 603 is used to determine the three-dimensional coordinates of the human eye based on the pupil distance of the human eye in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed.
  • the first determination module 602 when used to determine the head posture information based on the facial key points in the image to be processed, is used to:
  • a head posture matrix is determined, where the head posture matrix is used to represent the posture of the head in the image to be processed in the form of a matrix;
  • the head posture information includes a pitch angle, a rotational yaw angle, and a rotational roll angle
  • the first determination module 602 when used to determine the head posture information based on the value of the target parameter and the head posture matrix, is used to:
  • the pitch angle is determined based on the elements at the first set position and the second set position in the head posture matrix
  • the rotational yaw angle is determined based on the elements at the third set position in the head posture matrix and the value of the target parameter
  • the rotational roll angle is determined based on the elements at the fourth set position and the fifth set position in the head posture matrix
  • the pitch angle is determined based on the elements at the sixth set position and the seventh set position in the head posture matrix
  • the rotational yaw angle is determined based on the elements at the third set position in the head posture matrix and the value of the target parameter
  • the value of the rotational roll angle is determined as the set angle value.
  • the pixel coordinates are two-dimensional coordinates including abscissas and ordinates
  • the three-dimensional coordinates of the human eye include abscissas, ordinates, and depth coordinates of the left eye and abscissas, ordinates, and depth coordinates of the right eye;
  • the second determination module 603 when used to determine the three-dimensional coordinates of the human eye based on the human eye pupil distance in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, is used to:
  • the depth coordinates of the left eye and the right eye are determined respectively;
  • the pixel coordinates of the left eye, the pixel coordinates of the right eye, the depth coordinates of the left eye, and the depth coordinates of the right eye, the abscissa and ordinate of the left eye, and the abscissa and ordinate of the right eye are determined.
  • the device further comprises:
  • a third determination module is used to determine the three-dimensional coordinates of the center points of the two eyes based on the camera parameters, the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed;
  • the third determination module is further used to determine a rotation matrix based on the three-dimensional coordinates of the center points of the two eyes, where the rotation matrix is used to indicate a mapping relationship between the local coordinate system and the global coordinate system;
  • the third determination module is also used to determine the target head posture matrix corresponding to the head posture matrix in the global coordinate system based on the rotation matrix and the head posture matrix.
  • the second determination module 603 when used to determine the three-dimensional coordinates of the human eye based on the human eye pupil distance in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, is used to:
  • the three-dimensional coordinates of the human eye are determined based on the human eye pupil distance, camera parameters, target head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye.
  • the detection module 601 when used to detect facial key points on an image to be processed including a face and obtain facial key points in the image to be processed, is used to:
  • the device further comprises:
  • the sending module is used to send a prompt message when the distance is less than a set distance threshold, and the prompt message is used to prompt the user to increase the distance between the human eye and the camera.
  • the present application also provides a computing device, see Figure 7, which is a schematic diagram of the structure of a computing device according to an embodiment of the present application.
  • the computing device includes a processor 710, a memory 720 and a network interface 730, the memory 720 is used to store computer program codes that can be run on the processor 710, the processor 710 is used to implement the human eye positioning method provided in any embodiment of the present application when executing the computer program code, and the network interface 730 is used to implement input and output functions.
  • the computing device may also include other hardware, which is not limited in the present application.
  • the present application also provides a computer-readable storage medium, which can be in various forms.
  • the computer-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.
  • the computer-readable medium can also be paper or other suitable medium capable of printing programs.
  • a computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the human eye positioning method provided in any embodiment of the present application is implemented.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Ophthalmology & Optometry (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The present application relates to a human eye positioning method and apparatus, and a device and a medium. The method comprises: performing facial key point detection on an image to be processed that comprises a human face, so as to obtain a facial key point in said image; on the basis of the facial key point in said image, determining head posture information for indicating a deflection angle between the head of a person and a preset direction; and determining three-dimensional human eye coordinates on the basis of a pupil distance between human eyes in said image, camera parameters of a camera for capturing said image, the head posture information, and pixel coordinates of the left eye and pixel coordinates of the right eye in said image.

Description

人眼定位方法、装置、计算设备及存储介质Human eye positioning method, device, computing device and storage medium 技术领域Technical Field

本申请涉及计算机视觉和图像处理技术领域,尤其涉及一种人眼定位方法、装置、计算设备及存储介质。The present application relates to the technical field of computer vision and image processing, and in particular to a method, apparatus, computing device and storage medium for locating human eyes.

背景技术Background technique

单目相机相较于双目相机和深度相机而言,具有结构简单、高性价比的优势,在人眼定位和测距等中得到了广泛的应用。Compared with binocular cameras and depth cameras, monocular cameras have the advantages of simple structure and high cost performance, and have been widely used in human eye positioning and ranging.

相关技术中,在通过单目相机进行人眼定位和测距时,会直接以相机拍摄图像中左右眼的像素坐标作为人眼坐标,以实现人眼定位,进而利用近大远小原理,通过人眼实际瞳距长度和相机拍摄图像中左右眼的像素距离,根据相似三角形投影原理估算出人脸与摄像头的距离,以实现测距。In the related technology, when locating and measuring the distance between the human eye through a monocular camera, the pixel coordinates of the left and right eyes in the image taken by the camera are directly used as the eye coordinates to achieve eye positioning, and then the principle of near is larger and far is smaller is used. Through the actual pupil length of the human eye and the pixel distance between the left and right eyes in the image taken by the camera, the distance between the face and the camera is estimated according to the principle of similar triangle projection to achieve distance measurement.

但是,如果人脸没有正对相机,则相机拍摄图像中两眼之间的像素距离会因为侧脸变小,从而会使得人眼坐标的误差较大,此时如果简单根据图像中的两眼坐标来进行人脸与摄像头之间的距离的估算,会导致估算出的人脸与摄像头的距离误差较大,从而使得测距过程的准确性较差。However, if the face is not facing the camera, the pixel distance between the two eyes in the image taken by the camera will become smaller due to the side face, which will cause a large error in the eye coordinates. At this time, if the distance between the face and the camera is simply estimated based on the coordinates of the two eyes in the image, the estimated distance between the face and the camera will have a large error, resulting in poor accuracy in the distance measurement process.

发明内容Summary of the invention

本申请提供一种人眼定位方法、装置、计算设备及存储介质,以解决相关技术中的不足。The present application provides a human eye positioning method, apparatus, computing device and storage medium to address deficiencies in the related art.

根据本申请实施例的第一方面,提供一种人眼定位方法,该方法包括:对包括人脸的待处理图像进行人脸关键点检测,得到待处理图像中的人脸关键点;基于待处理图像中的人脸关键点,确定头部姿态信息,头部姿态信息用于指示人的头部与预设方向之间的偏转角度;基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标。According to a first aspect of an embodiment of the present application, a method for locating human eyes is provided, the method comprising: performing facial key point detection on an image to be processed that includes a human face, and obtaining the facial key points in the image to be processed; determining head posture information based on the facial key points in the image to be processed, the head posture information being used to indicate a deflection angle between a person's head and a preset direction; determining the three-dimensional coordinates of the human eye based on the pupil distance of the human eye in the image to be processed, the camera parameters of a camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed.

在本申请的一些实施例中,基于待处理图像中的人脸关键点,确定头部姿态信息,包括:基于待处理图像中的人脸关键点,确定头部姿态矩阵,头部姿态矩阵用于以矩阵的形式表示待处理图像中头部的姿态;基于头部姿态矩阵,确定目标参数的取值;基于目标参数的取值和头部姿态矩阵,确定头部姿态信息。In some embodiments of the present application, head posture information is determined based on facial key points in an image to be processed, including: determining a head posture matrix based on facial key points in an image to be processed, the head posture matrix being used to represent the posture of the head in the image to be processed in the form of a matrix; determining values of target parameters based on the head posture matrix; determining head posture information based on the values of the target parameters and the head posture matrix.

在本申请的一些实施例中,头部姿态信息包括俯仰角、旋转偏航角和旋转滚动角;In some embodiments of the present application, the head posture information includes a pitch angle, a rotational yaw angle, and a rotational roll angle;

基于目标参数的取值和头部姿态矩阵,确定头部姿态信息,包括:在目标参数的取值大于或等于设定阈值的情况下,基于头部姿态矩阵中第一设定位置和第二设定位置处的元素确定俯仰角,基于头部姿态矩阵中第三设定位置处的元素和目标参数的取值,确定旋转偏航角,基于头部姿态矩阵中第四设定位置和第五设定位置处的元素确定旋转滚动角;在目标参数的取值小于设定阈值的情况下,基于头部姿态矩阵中第六设定位置和第七设定位置处的元素确定俯仰角,基于头部姿态矩阵中第三设定位置处的元素和目标参数的取值,确定旋转偏航角,将旋转滚动角的取值确定为设定角度值。Based on the value of the target parameter and the head posture matrix, the head posture information is determined, including: when the value of the target parameter is greater than or equal to the set threshold, the pitch angle is determined based on the elements at the first set position and the second set position in the head posture matrix, the rotation yaw angle is determined based on the elements at the third set position in the head posture matrix and the value of the target parameter, and the rotation roll angle is determined based on the elements at the fourth set position and the fifth set position in the head posture matrix; when the value of the target parameter is less than the set threshold, the pitch angle is determined based on the elements at the sixth set position and the seventh set position in the head posture matrix, the rotation yaw angle is determined based on the elements at the third set position in the head posture matrix and the value of the target parameter, and the value of the rotation roll angle is determined as the set angle value.

在本申请的一些实施例中,像素坐标为包括横坐标和纵坐标的二维坐标,人眼三维坐标包括左眼的横坐标、纵坐标、深度坐标以及右眼的横坐标、纵坐标、深度坐标;In some embodiments of the present application, the pixel coordinates are two-dimensional coordinates including abscissas and ordinates, and the three-dimensional coordinates of the human eye include abscissas, ordinates, and depth coordinates of the left eye and abscissas, ordinates, and depth coordinates of the right eye;

基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标,包括:基于人眼瞳距、相机参数、头部姿态信息、左眼的像素坐标和右眼的像素坐标,确定两眼中心点的深度坐标;基于人眼瞳距、头部姿态矩阵、两眼中心点的深度坐标,分别确 定左眼的深度坐标和右眼的深度坐标;基于相机参数、左眼的像素坐标、右眼的像素坐标、左眼的深度坐标和右眼的深度坐标,确定左眼的横坐标和纵坐标、以及右眼的横坐标和纵坐标。Based on the pupil distance of the human eye in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, the three-dimensional coordinates of the human eye are determined, including: based on the pupil distance of the human eye, the camera parameters, the head posture information, the pixel coordinates of the left eye and the pixel coordinates of the right eye, the depth coordinates of the center points of the two eyes are determined; based on the pupil distance of the human eye, the head posture matrix, the depth coordinates of the center points of the two eyes, respectively Determine the depth coordinates of the left eye and the depth coordinates of the right eye; based on the camera parameters, the pixel coordinates of the left eye, the pixel coordinates of the right eye, the depth coordinates of the left eye and the depth coordinates of the right eye, determine the horizontal coordinate and vertical coordinate of the left eye, and the horizontal coordinate and vertical coordinate of the right eye.

在本申请的一些实施例中,基于待处理图像中的人脸关键点,确定头部姿态矩阵之后,该方法还包括:基于相机参数、待处理图像中左眼的像素坐标和右眼的像素坐标,确定两眼中心点的三维坐标;基于两眼中心点的三维坐标,确定旋转矩阵,旋转矩阵用于指示局部坐标系与全局坐标系之间的映射关系;基于旋转矩阵和头部姿态矩阵,确定头部姿态矩阵在全局坐标系下对应的目标头部姿态矩阵。In some embodiments of the present application, after determining the head posture matrix based on the facial key points in the image to be processed, the method also includes: determining the three-dimensional coordinates of the center points of the two eyes based on the camera parameters and the pixel coordinates of the left eye and the right eye in the image to be processed; determining the rotation matrix based on the three-dimensional coordinates of the center points of the two eyes, and the rotation matrix is used to indicate the mapping relationship between the local coordinate system and the global coordinate system; based on the rotation matrix and the head posture matrix, determining the target head posture matrix corresponding to the head posture matrix in the global coordinate system.

在本申请的一些实施例中,基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标,包括:基于目标头部姿态矩阵,确定目标头部姿态信息;基于人眼瞳距、相机参数、目标头部姿态信息以及左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标。In some embodiments of the present application, the three-dimensional coordinates of the human eye are determined based on the pupil distance of the human eye in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, including: determining the target head posture information based on the target head posture matrix; determining the three-dimensional coordinates of the human eye based on the pupil distance of the human eye, the camera parameters, the target head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye.

在本申请的一些实施例中,对包括人脸的待处理图像进行人脸关键点检测,得到待处理图像中的人脸关键点,包括:基于待处理图像进行人脸检测,以确定待处理图像中的人脸定位框;基于人脸定位框所对应的图像部分进行人脸关键点检测,得到待处理图像中的人脸关键点。In some embodiments of the present application, facial key point detection is performed on an image to be processed that includes a face to obtain facial key points in the image to be processed, including: performing face detection based on the image to be processed to determine a face positioning frame in the image to be processed; performing face key point detection based on the image portion corresponding to the face positioning frame to obtain facial key points in the image to be processed.

在本申请的一些实施例中,基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标之后,该方法还包括:基于人眼三维坐标,确定人眼与摄像头之间的距离;在距离小于设定距离阈值的情况下,发送提示信息,提示信息用于提示用户增大人眼与摄像头之间的距离。In some embodiments of the present application, after determining the three-dimensional coordinates of the human eye based on the pupil distance of the human eye in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, the method also includes: determining the distance between the human eye and the camera based on the three-dimensional coordinates of the human eye; when the distance is less than the set distance threshold, sending a prompt message, the prompt message being used to prompt the user to increase the distance between the human eye and the camera.

在本申请的一些实施例中,在对所述包括人脸的待处理图像进行人脸关键点检测之间,还包括对所述待处理图像中的人脸质量进行检测,以过滤图像质量较差的人脸。In some embodiments of the present application, before performing facial key point detection on the image to be processed including the face, the quality of the face in the image to be processed is also detected to filter out faces with poor image quality.

根据本申请实施例的第二方面,提供一种人眼定位装置,该装置包括:检测模块,用于对包括人脸的待处理图像进行人脸关键点检测,得到待处理图像中的人脸关键点;第一确定模块,用于基于待处理图像中的人脸关键点,确定头部姿态信息,头部姿态信息用于指示人的头部与预设方向之间的偏转角度;第二确定模块,用于基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标。According to a second aspect of an embodiment of the present application, a human eye positioning device is provided, the device comprising: a detection module, used to detect facial key points of an image to be processed including a human face, and obtain the facial key points in the image to be processed; a first determination module, used to determine head posture information based on the facial key points in the image to be processed, the head posture information being used to indicate a deflection angle between a person's head and a preset direction; a second determination module, used to determine the three-dimensional coordinates of the human eye based on the human eye pupil distance in the image to be processed, the camera parameters of a camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed.

在本申请的一些实施例中,第一确定模块,在用于基于待处理图像中的人脸关键点,确定头部姿态信息时,用于:基于待处理图像中的人脸关键点,确定头部姿态矩阵,头部姿态矩阵用于以矩阵的形式表示待处理图像中头部的姿态;基于头部姿态矩阵,确定目标参数的取值;基于目标参数的取值和头部姿态矩阵,确定头部姿态信息。In some embodiments of the present application, the first determination module, when used to determine the head posture information based on the facial key points in the image to be processed, is used to: determine the head posture matrix based on the facial key points in the image to be processed, the head posture matrix being used to represent the posture of the head in the image to be processed in the form of a matrix; determine the value of the target parameter based on the head posture matrix; determine the head posture information based on the value of the target parameter and the head posture matrix.

在本申请的一些实施例中,头部姿态信息包括俯仰角、旋转偏航角和旋转滚动角;In some embodiments of the present application, the head posture information includes a pitch angle, a rotational yaw angle, and a rotational roll angle;

第一确定模块,在用于基于目标参数的取值和头部姿态矩阵,确定头部姿态信息时,用于:在目标参数的取值大于或等于设定阈值的情况下,基于头部姿态矩阵中第一设定位置和第二设定位置处的元素确定俯仰角,基于头部姿态矩阵中第三设定位置处的元素和目标参数的取值,确定旋转偏航角,基于头部姿态矩阵中第四设定位置和第五设定位置处的元素确定旋转滚动角;在目标参数的取值小于设定阈值的情况下,基于头部姿态矩阵中第六设定位置和第七设定位置处的元素确定俯仰角,基于头部姿态矩阵中第三设定位置处的元素和目标参数的取值,确定旋转偏航角,将旋转滚动角的取值确定为设定角度值。The first determination module, when used to determine the head posture information based on the value of the target parameter and the head posture matrix, is used to: when the value of the target parameter is greater than or equal to a set threshold, determine the pitch angle based on the elements at the first set position and the second set position in the head posture matrix, determine the rotation yaw angle based on the elements at the third set position in the head posture matrix and the value of the target parameter, and determine the rotation roll angle based on the elements at the fourth set position and the fifth set position in the head posture matrix; when the value of the target parameter is less than the set threshold, determine the pitch angle based on the elements at the sixth set position and the seventh set position in the head posture matrix, determine the rotation yaw angle based on the elements at the third set position in the head posture matrix and the value of the target parameter, and determine the value of the rotation roll angle as the set angle value.

在本申请的一些实施例中,像素坐标为包括横坐标和纵坐标的二维坐标,人眼三维坐标包括左眼的横坐标、纵坐标、深度坐标以及右眼的横坐标、纵坐标、深度坐标;第二确定模块,在用于基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相 机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标时,用于:基于人眼瞳距、相机参数、头部姿态信息、左眼的像素坐标和右眼的像素坐标,确定两眼中心点的深度坐标;基于人眼瞳距、头部姿态矩阵、两眼中心点的深度坐标,分别确定左眼的深度坐标和右眼的深度坐标;基于相机参数、左眼的像素坐标、右眼的像素坐标、左眼的深度坐标和右眼的深度坐标,确定左眼的横坐标和纵坐标、以及右眼的横坐标和纵坐标。In some embodiments of the present application, the pixel coordinates are two-dimensional coordinates including abscissas and ordinates, and the three-dimensional coordinates of the human eye include abscissas, ordinates, and depth coordinates of the left eye and abscissas, ordinates, and depth coordinates of the right eye; the second determination module is used to determine the image based on the pupil distance of the human eye in the image to be processed, the camera used to shoot the image to be processed, When determining the three-dimensional coordinates of the human eye based on the camera parameters, head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, it is used to: determine the depth coordinates of the center points of the two eyes based on the pupil distance of the human eye, the camera parameters, the head posture information, the pixel coordinates of the left eye and the pixel coordinates of the right eye; determine the depth coordinates of the left eye and the depth coordinates of the right eye respectively based on the pupil distance of the human eye, the head posture matrix, and the depth coordinates of the center points of the two eyes; determine the horizontal and vertical coordinates of the left eye, as well as the horizontal and vertical coordinates of the right eye based on the camera parameters, the pixel coordinates of the left eye, the pixel coordinates of the right eye, the depth coordinates of the left eye, and the depth coordinates of the right eye.

在本申请的一些实施例中,该装置还包括:第三确定模块,用于基于相机参数、待处理图像中左眼的像素坐标和右眼的像素坐标,确定两眼中心点的三维坐标;第三确定模块,还用于基于两眼中心点的三维坐标,确定旋转矩阵,旋转矩阵用于指示局部坐标系与全局坐标系之间的映射关系;第三确定模块,还用于基于旋转矩阵和头部姿态矩阵,确定头部姿态矩阵在全局坐标系下对应的目标头部姿态矩阵。In some embodiments of the present application, the device also includes: a third determination module, used to determine the three-dimensional coordinates of the center points of the two eyes based on camera parameters, the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed; the third determination module is also used to determine the rotation matrix based on the three-dimensional coordinates of the center points of the two eyes, and the rotation matrix is used to indicate the mapping relationship between the local coordinate system and the global coordinate system; the third determination module is also used to determine the target head posture matrix corresponding to the head posture matrix in the global coordinate system based on the rotation matrix and the head posture matrix.

在本申请的一些实施例中,第二确定模块,在用于基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标时,用于:基于目标头部姿态矩阵,确定目标头部姿态信息;基于人眼瞳距、相机参数、目标头部姿态信息以及左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标。In some embodiments of the present application, the second determination module, when used to determine the three-dimensional coordinates of the human eye based on the pupil distance of the human eye in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, is used to: determine the target head posture information based on the target head posture matrix; determine the three-dimensional coordinates of the human eye based on the pupil distance of the human eye, the camera parameters, the target head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye.

在本申请的一些实施例中,检测模块,在用于对包括人脸的待处理图像进行人脸关键点检测,得到待处理图像中的人脸关键点时,用于:基于待处理图像进行人脸检测,以确定待处理图像中的人脸定位框;基于人脸定位框所对应的图像部分进行人脸关键点检测,得到待处理图像中的人脸关键点。In some embodiments of the present application, the detection module, when used to perform facial key point detection on an image to be processed that includes a face and obtain the facial key points in the image to be processed, is used to: perform face detection based on the image to be processed to determine a face positioning frame in the image to be processed; perform facial key point detection based on the image portion corresponding to the face positioning frame to obtain the facial key points in the image to be processed.

在本申请的一些实施例中,该装置还包括:第四确定模块,用于基于人眼三维坐标,确定人眼与摄像头之间的距离;发送模块,用于在距离小于设定距离阈值的情况下,发送提示信息,提示信息用于提示用户增大人眼与摄像头之间的距离。In some embodiments of the present application, the device also includes: a fourth determination module, used to determine the distance between the human eye and the camera based on the three-dimensional coordinates of the human eye; a sending module, used to send a prompt message when the distance is less than a set distance threshold, and the prompt message is used to prompt the user to increase the distance between the human eye and the camera.

根据本申请实施例的第三方面,提供一种计算设备,计算设备包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行计算机程序时实现上述第一方面以及第一方面的任一个实施例所提供的人眼定位方法所执行的操作。According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the operations performed by the human eye positioning method provided in the first aspect and any one of the embodiments of the first aspect are implemented.

根据本申请实施例的第四方面,提供一种非易失性计算机可读存储介质,计算机可读存储介质上存储有程序,程序被处理器执行时,实现上述第一方面以及第一方面的任一个实施例所提供的人眼定位方法所执行的操作。According to a fourth aspect of an embodiment of the present application, a non-volatile computer-readable storage medium is provided, on which a program is stored. When the program is executed by a processor, the operations performed by the human eye positioning method provided in the first aspect and any one of the embodiments of the first aspect are implemented.

根据本申请实施例的第五方面,提供一种计算机程序产品,该计算机程序产品包括计算机程序,计算机程序被处理器执行时,实现上述第一方面以及第一方面的任一个实施例所提供的人眼定位方法所执行的操作。According to a fifth aspect of the embodiments of the present application, a computer program product is provided, which includes a computer program. When the computer program is executed by a processor, it implements the operations performed by the human eye positioning method provided in the first aspect and any one of the embodiments of the first aspect.

根据上述实施例可知,本申请通过对包括人脸的待处理图像进行人脸关键点检测,以得到待处理图像中的人脸关键点;从而基于待处理图像中的人脸关键点,确定用于指示人的头部与预设方向之间的偏转角度的头部姿态信息;进而基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标,以达到根据头部姿态信息修正人眼坐标的目的,从而可以更加准确地确定出图像中的人眼位置。According to the above embodiments, the present application performs facial key point detection on an image to be processed that includes a human face to obtain the facial key points in the image to be processed; thereby, based on the facial key points in the image to be processed, head posture information for indicating the deflection angle between a person's head and a preset direction is determined; and then based on the human eye pupil distance in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, the three-dimensional coordinates of the human eye are determined, so as to achieve the purpose of correcting the human eye coordinates according to the head posture information, so that the position of the human eye in the image can be determined more accurately.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

图1是根据本申请实施例示出的一种人眼定位方法的应用场景示意图。FIG1 is a schematic diagram of an application scenario of a method for locating human eyes according to an embodiment of the present application.

图2是根据本申请实施例示出的一种人眼定位方法的流程图。 FIG. 2 is a flow chart of a method for locating human eyes according to an embodiment of the present application.

图3是根据本申请实施例示出的一种人脸关键点的示意图。FIG. 3 is a schematic diagram of key points of a human face according to an embodiment of the present application.

图4是根据本申请实施例示出的一种俯仰角、旋转偏航角和旋转滚动角的示意图。FIG. 4 is a schematic diagram showing a pitch angle, a rotational yaw angle, and a rotational roll angle according to an embodiment of the present application.

图5是根据本申请实施例示出的一种人眼定位方法的流程图。FIG. 5 is a flow chart of a method for locating human eyes according to an embodiment of the present application.

图6是根据本申请实施例示出的一种人眼定位装置的结构示意图。FIG. 6 is a schematic structural diagram of a human eye positioning device according to an embodiment of the present application.

图7是根据本申请实施例示出的一种计算设备的结构示意图。FIG. 7 is a schematic diagram of the structure of a computing device according to an embodiment of the present application.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

本申请提供了一种人眼定位方法,用于在获取到相机拍摄的待处理图像之后,根据待处理图像中人头的头部姿态信息,来对待处理图像中的人眼坐标进行修正,以确定出待处理图像中人眼更为准确的三维坐标,提高所确定出的人眼位置的准确度。The present application provides a method for locating human eyes, which is used to correct the coordinates of the human eyes in the image to be processed according to the head posture information of the human head in the image to be processed after acquiring the image to be processed taken by a camera, so as to determine more accurate three-dimensional coordinates of the human eyes in the image to be processed, thereby improving the accuracy of the determined human eye position.

在一种可能的应用场景中,可以将本申请所提供的人眼定位方法应用在测距场景,用于确定人眼与显示设备之间的距离。可选地,显示设备可以为台式计算机、便携式计算机、智能手机、平板电脑、笔记本电脑等,显示设备中可以集成有摄像头,以通过摄像头来拍摄待处理图像,从而通过本申请所提供的人眼定位方法,确定出待处理图像中人眼更为准确的人眼三维坐标,进而基于所确定出的人眼三维坐标确定人眼与摄像头之间的距离,人眼与摄像头之间的距离也即是人眼与显示设备之间的距离,以便在人眼与显示设备之间的距离过近时,可以通过显示设备发出提示信息,提示用户保持与显示设备之间的距离,帮助预防用户近视。In a possible application scenario, the eye positioning method provided by the present application can be applied to a distance measurement scenario to determine the distance between the human eye and the display device. Optionally, the display device can be a desktop computer, a portable computer, a smart phone, a tablet computer, a laptop computer, etc. A camera can be integrated in the display device to capture the image to be processed through the camera, so that the eye positioning method provided by the present application can determine the more accurate three-dimensional coordinates of the human eye in the image to be processed, and then determine the distance between the human eye and the camera based on the determined three-dimensional coordinates of the human eye. The distance between the human eye and the camera is also the distance between the human eye and the display device, so that when the distance between the human eye and the display device is too close, a prompt message can be issued through the display device to prompt the user to keep a distance from the display device, helping to prevent myopia in the user.

在另一种可能的应用场景中,可以将本申请所提供的人眼定位方法应用在裸眼三维(Three Dimensional,3D)场景中。例如,可以通过裸眼3D设备中集成的摄像头来拍摄待处理图像,从而通过本申请所提供的人眼定位方法,确定出待处理图像中人眼更为准确的人眼三维坐标,以便可以根据所确定出的人眼三维坐标(包括左眼坐标和右眼坐标),来确定要显示在左眼前和右眼前的画面,以使用户可以在无需佩戴偏振光眼镜(如3D眼镜)等外部工具的情况下,欣赏到真如实物般的三维图像。其中,裸眼3D设备可以为裸眼3D广告机、裸眼3D笔记本,等等,本申请对裸眼3D设备的设备类型不加以限定。In another possible application scenario, the eye positioning method provided by the present application can be applied to a naked-eye three-dimensional (3D) scene. For example, the image to be processed can be photographed by a camera integrated in a naked-eye 3D device, so that the eye positioning method provided by the present application can determine a more accurate three-dimensional coordinate of the eye in the image to be processed, so that the image to be displayed in front of the left eye and the right eye can be determined according to the determined three-dimensional coordinates of the eye (including the left eye coordinates and the right eye coordinates), so that the user can enjoy a three-dimensional image that is as real as a real object without wearing external tools such as polarized glasses (such as 3D glasses). Among them, the naked-eye 3D device can be a naked-eye 3D advertising machine, a naked-eye 3D notebook, etc., and the present application does not limit the device type of the naked-eye 3D device.

以将本申请所提供的人眼定位方法应用在裸眼3D场景中为例,参见图1,图1是根据本申请实施例示出的一种人眼定位方法的应用场景示意图,如图1所示,裸眼3D设备在通过摄像头(如单目相机)采集到图像后,可以通过本申请所提供的人眼定位方法,来确定图像中人眼的人眼三维坐标,从而基于人眼三维坐标,对3D视频源中的每一帧图像进行3D显示像素重排,以得到多个裸眼3D合成图像,裸眼3D设备即可对裸眼3D合成图像进行显示,以使观看者可以在很大范围内不同位置处都能够看到高质量的3D效果。Taking the application of the human eye positioning method provided by the present application in a naked-eye 3D scene as an example, refer to Figure 1, which is a schematic diagram of an application scenario of a human eye positioning method according to an embodiment of the present application. As shown in Figure 1, after the naked-eye 3D device captures an image through a camera (such as a monocular camera), the human eye positioning method provided by the present application can be used to determine the three-dimensional coordinates of the human eye in the image, thereby rearranging the 3D display pixels of each frame image in the 3D video source based on the three-dimensional coordinates of the human eye to obtain multiple naked-eye 3D synthetic images. The naked-eye 3D device can then display the naked-eye 3D synthetic images so that viewers can see high-quality 3D effects at different positions within a wide range.

需要说明的是,无论是上述哪种场景,摄像头均可以为单目摄像头(如单目RGB摄像头)或红外灰度图像摄像头。此外,摄像头除可以拍摄一张待处理图像,来基于待处理图像确定人眼三维坐标之外,还可以拍摄视频,以将视频中的至少一个视频帧作为待处理图像,来实现人眼三维坐标的确定,本申请对待处理图像的具体类型不加以限定。It should be noted that, no matter which of the above scenarios, the camera can be a monocular camera (such as a monocular RGB camera) or an infrared grayscale image camera. In addition, in addition to shooting an image to be processed to determine the three-dimensional coordinates of the human eye based on the image to be processed, the camera can also shoot a video to use at least one video frame in the video as the image to be processed to achieve the determination of the three-dimensional coordinates of the human eye. This application does not limit the specific type of the image to be processed.

上述仅为对本申请应用场景的示例性说明,并不构成对本申请应用场景的限定,在更多可能的实现方式中,本申请所提供的人眼定位方法还可以应用在其他场景中,本申请对具体的应用场景不加以限定。The above is only an exemplary description of the application scenario of the present application and does not constitute a limitation on the application scenario of the present application. In more possible implementations, the human eye positioning method provided by the present application can also be applied in other scenarios, and the present application does not limit the specific application scenario.

上述人眼定位方法可以由计算设备执行,该计算设备可以是上述示例性场景中所提及的显示设备或裸眼3D设备,或者,该计算设备还可以是可以与显示设备或裸眼3D 设备进行通信的其他设备,如终端设备或服务器,终端设备可以为台式计算机、便携式计算机、笔记本电脑、智能手机、平板电脑等,服务器可以为一台服务器、多台服务器、服务器集群、云计算平台等,本申请对计算设备的设备类型不加以限定。The above-mentioned human eye positioning method can be executed by a computing device, and the computing device can be the display device or the naked eye 3D device mentioned in the above-mentioned exemplary scenario, or the computing device can also be connected to the display device or the naked eye 3D Other devices with which the device communicates, such as terminal devices or servers. The terminal device may be a desktop computer, a portable computer, a notebook computer, a smart phone, a tablet computer, etc. The server may be one server, multiple servers, a server cluster, a cloud computing platform, etc. This application does not limit the device type of the computing device.

在计算设备为上述示例性场景中所提及的显示设备或裸眼3D设备的情况下,计算设备自身即可拍摄待处理图像,从而通过本申请所提供的人眼定位方法,来基于待处理图像实现人眼三维坐标的确定。而在计算设备为可以与显示设备或裸眼3D设备进行通信的其他设备的情况下,显示设备或裸眼3D设备在拍摄得到待处理图像之后,可以将待处理图像发送给计算设备,以便计算设备可以通过本申请所提供的人眼定位方法,基于接收到的待处理图像实现人眼三维坐标的确定,从而将所确定出的人眼三维坐标发送给显示设备或裸眼3D设备,以便显示设备或裸眼3D设备可以获取到更为准确的人眼三维坐标。In the case where the computing device is the display device or naked-eye 3D device mentioned in the above exemplary scenario, the computing device itself can capture the image to be processed, so as to determine the three-dimensional coordinates of the human eye based on the image to be processed by the human eye positioning method provided in this application. In the case where the computing device is other devices that can communicate with the display device or the naked-eye 3D device, after the display device or the naked-eye 3D device captures the image to be processed, it can send the image to the computing device, so that the computing device can determine the three-dimensional coordinates of the human eye based on the received image to be processed by the human eye positioning method provided in this application, and then send the determined three-dimensional coordinates of the human eye to the display device or the naked-eye 3D device, so that the display device or the naked-eye 3D device can obtain more accurate three-dimensional coordinates of the human eye.

在介绍了本申请的应用场景和执行主体之后,下面对本申请所提供的人眼定位方法进行详细说明。After introducing the application scenarios and execution entities of the present application, the human eye positioning method provided by the present application is described in detail below.

参见图2,图2是根据本申请实施例示出的一种人眼定位方法的流程图,如图2所示,该方法包括:Referring to FIG. 2 , FIG. 2 is a flow chart of a method for locating human eyes according to an embodiment of the present application. As shown in FIG. 2 , the method includes:

步骤201、对包括人脸的待处理图像进行人脸关键点检测,得到待处理图像中的人脸关键点。Step 201: perform facial key point detection on an image to be processed that includes a face, and obtain facial key points in the image to be processed.

一般而言,标注人脸面部最关键的有5个点,分别为左右两个嘴角、两个眼的中心(也即是左眼中心和右眼中心)和鼻尖,这5个关键点属于人脸内部关键点,根据这5个关键点就可以确定出人脸的姿态。参见图3,图3是根据本申请实施例示出的一种人脸关键点的示意图,如图3所示,通过步骤201所确定出的人脸关键点即包括左眼中心、右眼中心、鼻尖、左嘴角、右嘴角这5个关键点。Generally speaking, there are five most critical points for marking a face, namely, the left and right corners of the mouth, the centers of the two eyes (that is, the center of the left eye and the center of the right eye), and the tip of the nose. These five key points belong to the key points inside the face, and the posture of the face can be determined based on these five key points. Referring to FIG. 3 , FIG. 3 is a schematic diagram of a face key point according to an embodiment of the present application. As shown in FIG. 3 , the face key points determined by step 201 include the five key points of the center of the left eye, the center of the right eye, the tip of the nose, the left corner of the mouth, and the right corner of the mouth.

步骤202、基于待处理图像中的人脸关键点,确定头部姿态信息,头部姿态信息用于指示人的头部与预设方向之间的偏转角度。Step 202: determine head posture information based on the facial key points in the image to be processed, where the head posture information is used to indicate a deflection angle between the head of the person and a preset direction.

需要说明的是,当人脸正对摄像头时,所拍摄的图像中人眼的像素坐标与人眼在人脸上的位置才是较为准确的,一旦所拍摄的图像中人脸是侧着的,所拍摄的图像中人眼的像素坐标与人眼在人脸上的位置就会相差较大,此时,通过步骤202确定头部姿态信息,头部姿态信息可以指示人脸与正对摄像头的方向(也即是预设方向)之间的偏转角度,以便后续可以基于头部姿态信息对人眼的像素坐标进行校正,并且可以确定出人眼的深度坐标,以达到精确定位人眼三维坐标的目的。It should be noted that when the human face is facing the camera, the pixel coordinates of the human eye in the captured image and the position of the human eye on the face are relatively accurate. Once the human face in the captured image is sideways, the pixel coordinates of the human eye in the captured image and the position of the human eye on the face will be quite different. At this time, the head posture information is determined through step 202. The head posture information can indicate the deflection angle between the face and the direction facing the camera (that is, the preset direction), so that the pixel coordinates of the human eye can be corrected based on the head posture information, and the depth coordinates of the human eye can be determined to achieve the purpose of accurately locating the three-dimensional coordinates of the human eye.

步骤203、基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标。Step 203 : determining the three-dimensional coordinates of the human eye based on the pupil distance of the human eye in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed.

其中,待处理图像中的人眼瞳距可以为待处理图像中左右眼之间的像素距离,可选地,可以基于待处理图像中左眼的像素坐标和右眼的像素坐标,来确定待处理图像中左右眼之间的像素距离,以得到待处理图像中的人眼瞳距。Among them, the pupil distance of the human eye in the image to be processed can be the pixel distance between the left and right eyes in the image to be processed. Optionally, the pixel distance between the left and right eyes in the image to be processed can be determined based on the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed to obtain the pupil distance of the human eye in the image to be processed.

需要说明的是,所确定出的人眼三维坐标中的横坐标和纵坐标是基于头部姿态信息对待处理图像中人眼的像素坐标进行修正得到的,而且相较于像素坐标还扩展出了深度坐标,以使所确定出的人眼坐标是更为准确的三维坐标。It should be noted that the horizontal and vertical coordinates in the determined three-dimensional coordinates of the human eye are obtained by correcting the pixel coordinates of the human eye in the processed image based on the head posture information, and the depth coordinates are also expanded compared to the pixel coordinates, so that the determined human eye coordinates are more accurate three-dimensional coordinates.

本申请通过对包括人脸的待处理图像进行人脸关键点检测,以得到待处理图像中的人脸关键点;从而基于待处理图像中的人脸关键点,确定用于指示人的头部与预设方向之间的偏转角度的头部姿态信息;进而基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标,以达到根据头部姿态信息修正人眼坐标的目的,从而可以更加准确地确定出图像中的人眼位置。The present application performs facial key point detection on an image to be processed that includes a human face to obtain the facial key points in the image to be processed; thereby, based on the facial key points in the image to be processed, head posture information indicating the deflection angle between a person's head and a preset direction is determined; and then based on the pupil distance of the human eye in the image to be processed, the camera parameters of a camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, the three-dimensional coordinates of the human eye are determined, so as to achieve the purpose of correcting the coordinates of the human eye according to the head posture information, thereby more accurately determining the position of the human eye in the image.

在介绍了本申请所提供的人眼定位方法的基本实现过程之后,下面介绍该人眼定位 方法的各个可选实施例。After introducing the basic implementation process of the human eye positioning method provided by this application, the following describes the human eye positioning method. Various alternative embodiments of the method.

在一些实施例中,对于步骤201,在对包括人脸的待处理图像进行人脸关键点检测,得到待处理图像中的人脸关键点时,可以通过如下步骤实现:In some embodiments, for step 201, when performing facial key point detection on the image to be processed including the face to obtain the facial key points in the image to be processed, it can be implemented by the following steps:

步骤2011、基于待处理图像进行人脸检测,以确定待处理图像中的人脸定位框。Step 2011: Perform face detection based on the image to be processed to determine a face positioning frame in the image to be processed.

在一种可能的实现方式中,可以将待处理图像输入至人脸检测模型,通过人脸检测模型来基于待处理图像进行处理,以输出待处理图像中的人脸定位框。In a possible implementation, the image to be processed may be input into a face detection model, and the face detection model may be used to process the image to be processed so as to output a face location frame in the image to be processed.

其中,人脸检测模型可以对待处理图像中的人脸目标进行检测,检测到的人脸可以用人脸定位框标注其位置,以实现待处理图像中人脸定位框的确定。Among them, the face detection model can detect the face target in the image to be processed, and the position of the detected face can be marked with a face positioning frame to determine the face positioning frame in the image to be processed.

需要说明的是,人脸定位框可以为矩形框,在人脸定位框为矩形框的情况下,可以对矩形框的对角线顶点进行标记,以实现人脸定位框的标注。可选地,可以对位于矩形框左上角的顶点以及位于矩形框右下角的顶点进行标记,根据所标记的这两个顶点,即可实现矩形框位置和大小的确定,例如,可以将矩形框左上角的顶点标记为(x1,y1),将矩形框右下角的顶点记为(x2,y2)。It should be noted that the face positioning frame can be a rectangular frame. In the case where the face positioning frame is a rectangular frame, the diagonal vertices of the rectangular frame can be marked to achieve the annotation of the face positioning frame. Optionally, the vertex located at the upper left corner of the rectangular frame and the vertex located at the lower right corner of the rectangular frame can be marked. According to the two marked vertices, the position and size of the rectangular frame can be determined. For example, the vertex at the upper left corner of the rectangular frame can be marked as (x1, y1), and the vertex at the lower right corner of the rectangular frame can be recorded as (x2, y2).

可选地,人脸检测模型可以为基于适应提升树(Adboost)的人脸检测器,或者,人脸检测模型可以为深度学习人脸检测模型。以人脸检测模型为深度学习人脸检测模型为例,可以采用Retinaface模型或Yolov7face模型作为人脸检测模型,以实现对待处理图像中的人脸检测。Optionally, the face detection model may be a face detector based on an adaptive boosting tree (Adboost), or the face detection model may be a deep learning face detection model. Taking the face detection model as a deep learning face detection model as an example, a Retinaface model or a Yolov7face model may be used as a face detection model to implement face detection in the image to be processed.

步骤2012、基于人脸定位框所对应的图像部分进行人脸关键点检测,得到待处理图像中的人脸关键点。Step 2012: perform facial key point detection based on the image portion corresponding to the face positioning frame to obtain facial key points in the image to be processed.

在一种可能的实现方式中,可以通过人脸关键点检测模型,基于人脸定位框所对应的图像部分进行人脸关键点检测,以得到待处理图像中的人脸关键点。In a possible implementation, a facial key point detection model may be used to perform facial key point detection based on the image portion corresponding to the face positioning frame to obtain facial key points in the image to be processed.

可选地,在通过步骤2011确定出待处理图像中的人脸定位框之后,可以基于人脸定位框对待处理图像进行裁剪,以得到仅包括人脸定位框所对应的图像部分的人脸图像,从而基于人脸图像进行人脸关键点检测,得到待处理图像中的人脸关键点。Optionally, after determining the face positioning frame in the image to be processed through step 2011, the image to be processed can be cropped based on the face positioning frame to obtain a face image that only includes the image portion corresponding to the face positioning frame, thereby performing face key point detection based on the face image to obtain the face key points in the image to be processed.

也即是,可以将人脸图像输入至人脸关键点检测模型,以通过人脸关键点检测模型,基于人脸图像进行人脸关键点检测,以实现人脸图像中人脸关键点的检测,从而即可得到待处理图像中的人脸关键点。That is, the face image can be input into the face key point detection model, and the face key point detection model can be used to perform face key point detection based on the face image to realize the detection of face key points in the face image, thereby obtaining the face key points in the image to be processed.

其中,人脸关键点检测模型可以为深度学习模型,例如,人脸关键点检测模型可以为卷积神经网络(Convolutional Neural Networks,CNN)模型,如基于残差网络(Residual Network,ResNet)的CNN模型,可选地,人脸关键点检测模型还可以为其他类型的模型,本申请对此不加以限定。Among them, the facial key point detection model can be a deep learning model. For example, the facial key point detection model can be a convolutional neural network (CNN) model, such as a CNN model based on a residual network (Residual Network, ResNet). Optionally, the facial key point detection model can also be other types of models, which is not limited in this application.

可选地,在基于人脸定位框所对应的图像部分进行人脸关键点检测之前,还可以对待处理图像中的人脸质量进行检测,以过滤图像质量较差的人脸。Optionally, before performing facial key point detection based on the image portion corresponding to the face positioning frame, the quality of the face in the image to be processed may also be detected to filter out faces with poor image quality.

在一种可能的实现方式中,可以通过人脸质量检测模型,来对待处理图像中人脸定位框所对应的图像部分进行人脸质量检测,以过滤待处理图像中图像质量不满足要求的人脸。In a possible implementation, a face quality detection model may be used to perform face quality detection on an image portion corresponding to a face positioning frame in the image to be processed, so as to filter out faces whose image quality does not meet the requirements in the image to be processed.

其中,人脸质量检测模型可以为CNN模型,如基于ResNet的CNN模型,可选地,人脸质量检测模型还可以为其他类型的模型,本申请对此不加以限定。需要说明的是,人脸关键点检测模型和人脸质量检测模型可以为同一个模型,也即是,可以由同一个模型同时提供人脸关键点检测和人脸质量检测的功能,或者,人脸关键点检测模型和人脸质量检测模型可以为两个模型,以通过这两个模型分别实现人脸关键点检测和人脸质量检测。Among them, the face quality detection model can be a CNN model, such as a CNN model based on ResNet. Optionally, the face quality detection model can also be other types of models, which is not limited in this application. It should be noted that the face key point detection model and the face quality detection model can be the same model, that is, the same model can provide the functions of face key point detection and face quality detection at the same time, or the face key point detection model and the face quality detection model can be two models, so that face key point detection and face quality detection can be realized respectively through these two models.

通过对待处理图像中人脸定位框所对应的图像部分进行人脸质量检测,可以过滤去除待处理图像中图像质量不满足要求的人脸,从而使得后续仅需对图像质量满足要求的人脸进行人脸关键点检测,降低计算设备的处理压力。By performing face quality detection on the image portion corresponding to the face positioning frame in the image to be processed, faces whose image quality does not meet the requirements in the image to be processed can be filtered out, so that only face key point detection needs to be performed on faces whose image quality meets the requirements in the subsequent processing, thereby reducing the processing pressure of the computing device.

在通过上述过程确定出人脸关键点之后,即可通过步骤202,基于待处理图像中的 人脸关键点,确定头部姿态信息。After determining the key points of the face through the above process, step 202 can be performed based on the key points of the face in the image to be processed. Facial key points, determine the head posture information.

在一些实施例中,对于步骤202,在基于待处理图像中的人脸关键点,确定头部姿态信息时,可以包括如下步骤:In some embodiments, for step 202, when determining the head posture information based on the facial key points in the image to be processed, the following steps may be included:

步骤2021、基于待处理图像中的人脸关键点,确定头部姿态矩阵,头部姿态矩阵用于以矩阵的形式表示待处理图像中头部的姿态。Step 2021: determine a head posture matrix based on the facial key points in the image to be processed, where the head posture matrix is used to represent the posture of the head in the image to be processed in the form of a matrix.

在一种可能的实现方式中,可以根据所确定出的人脸关键点的像素坐标,采用黄金标准(Golden Standard)算法,来计算头部姿态矩阵。In one possible implementation, the head posture matrix can be calculated using the Golden Standard algorithm based on the pixel coordinates of the determined facial key points.

步骤2022、基于头部姿态矩阵,确定目标参数的取值。Step 2022: Determine the value of the target parameter based on the head posture matrix.

在一种可能的实现方式中,可以基于头部姿态矩阵中目标位置处的元素,来确定目标参数的取值。In a possible implementation, the value of the target parameter may be determined based on the element at the target position in the head posture matrix.

其中,头部姿态矩阵可以为一个3×3的矩阵,基于此,可以通过如下公式(1),来基于头部姿态矩阵,确定目标参数的取值:
The head posture matrix may be a 3×3 matrix. Based on this, the value of the target parameter may be determined based on the head posture matrix by the following formula (1):

其中,sy表示目标参数,Rhead表示头部姿态矩阵,Rhead[0,0]表示头部姿态矩阵中第0行第0列的元素,Rhead[1,0]表示头部姿态矩阵中第1行第0列的元素。Among them, sy represents the target parameter, R head represents the head posture matrix, R head [0,0] represents the element in the 0th row and 0th column of the head posture matrix, and R head [1,0] represents the element in the 1st row and 0th column of the head posture matrix.

步骤2023、基于目标参数的取值和头部姿态矩阵,确定头部姿态信息。Step 2023: Determine the head posture information based on the target parameter values and the head posture matrix.

其中,头部姿态信息可以包括俯仰角(Pitch)、旋转偏航角(Yaw)和旋转滚动角(Roll)。在一实施例中,参见图4,图4是根据本申请实施例示出的一种俯仰角、旋转偏航角和旋转滚动角的示意图,如图4所示,人的头部相对于正对摄像头的坐标轴的X轴旋转的角度即为俯仰角(Pitch),人的头部相对于正对摄像头的坐标轴的Y轴的角度即为旋转偏航角(Yaw),人的头部相对于正对摄像头的坐标轴的Z轴旋转的角度即为旋转滚动角(Roll)。Among them, the head posture information may include a pitch angle (Pitch), a rotational yaw angle (Yaw) and a rotational roll angle (Roll). In one embodiment, referring to FIG. 4 , FIG. 4 is a schematic diagram of a pitch angle, a rotational yaw angle and a rotational roll angle according to an embodiment of the present application. As shown in FIG. 4 , the angle of rotation of a person's head relative to the X-axis of the coordinate axis facing the camera is the pitch angle (Pitch), the angle of rotation of a person's head relative to the Y-axis of the coordinate axis facing the camera is the rotational yaw angle (Yaw), and the angle of rotation of a person's head relative to the Z-axis of the coordinate axis facing the camera is the rotational roll angle (Roll).

确定头部姿态信息,也即是确定俯仰角、旋转偏航角和旋转滚动角。在一些实施例中,在基于目标参数的取值和头部姿态矩阵,确定头部姿态信息时,可以包括如下两种实现方式:Determine the head posture information, that is, determine the pitch angle, the rotation yaw angle and the rotation roll angle. In some embodiments, when determining the head posture information based on the value of the target parameter and the head posture matrix, the following two implementation methods may be included:

在一种可能的实现方式中,在目标参数的取值大于或等于设定阈值的情况下,基于头部姿态矩阵中第一设定位置和第二设定位置处的元素确定俯仰角,基于头部姿态矩阵中第三设定位置处的元素和所述目标参数的取值,确定旋转偏航角,基于头部姿态矩阵中第四设定位置和第五设定位置处的元素确定旋转滚动角。In one possible implementation, when the value of the target parameter is greater than or equal to a set threshold, the pitch angle is determined based on the elements at the first set position and the second set position in the head posture matrix, the rotational yaw angle is determined based on the elements at the third set position in the head posture matrix and the value of the target parameter, and the rotational roll angle is determined based on the elements at the fourth set position and the fifth set position in the head posture matrix.

在另一种可能的实现方式中,在目标参数的取值小于设定阈值的情况下,基于头部姿态矩阵中第六设定位置和第七设定位置处的元素确定俯仰角,基于头部姿态矩阵中第三设定位置处的元素和目标参数的取值,确定旋转偏航角,将旋转滚动角的取值确定为设定角度值。In another possible implementation, when the value of the target parameter is less than a set threshold, the pitch angle is determined based on the elements at the sixth set position and the seventh set position in the head posture matrix, the rotational yaw angle is determined based on the elements at the third set position in the head posture matrix and the value of the target parameter, and the value of the rotational roll angle is determined as the set angle value.

在一实施例中,设定阈值可以为1e-6(即1*10-6),第一设定位置可以为头部姿态矩阵中的第2行第1列,第二设定位置可以为头部姿态矩阵中的第2行第2列,第三设定位置可以为头部姿态矩阵中的第2行第0列,第四设定位置可以为头部姿态矩阵中的第1行第0列,第五设定位置可以为头部姿态矩阵中的第0行第0列,第六设定位置可以为头部姿态矩阵中的第1行第2列,第七设定位置可以为头部姿态矩阵中的第1行第1列,设定角度值可以为0度。In one embodiment, the set threshold may be 1e-6 (i.e., 1*10 -6 ), the first set position may be the 2nd row and 1st column in the head posture matrix, the second set position may be the 2nd row and 2nd column in the head posture matrix, the third set position may be the 2nd row and 0th column in the head posture matrix, the fourth set position may be the 1st row and 0th column in the head posture matrix, the fifth set position may be the 0th row and 0th column in the head posture matrix, the sixth set position may be the 1st row and 2nd column in the head posture matrix, the seventh set position may be the 1st row and 1st column in the head posture matrix, and the set angle value may be 0 degrees.

例如,在目标参数sy≥1e-6的情况下,可以通过如下公式(2),来确定俯仰角、旋转偏航角和旋转滚动角:
For example, when the target parameter sy ≥ 1e-6, the pitch angle, the yaw angle, and the roll angle can be determined by the following formula (2):

其中,θx表示俯仰角,θy表示旋转偏航角,θz表示旋转滚动角,atan(也即是arctan)表示求反正切值,Rhead表示头部姿态矩阵,Rhead[2,1]表示头部姿态矩阵中第2行第1列的元素,Rhead[2,2]表示头部姿态矩阵中第2行第2列的元素,Rhead[2,0]表示头部姿态矩阵中第2行第0列的元素,Rhead[1,0]表示头部姿态矩阵中第1行第0列的元素,Rhead[0,0]表示头部姿态矩阵中第0行第0列的元素,sy表示目标参数。Among them, θx represents the pitch angle, θy represents the yaw angle, θz represents the roll angle, atan (also known as arctan) represents the inverse tangent value, Rhead represents the head posture matrix, Rhead [2,1] represents the element in the 2nd row and 1st column of the head posture matrix, Rhead [2,2] represents the element in the 2nd row and 2nd column of the head posture matrix, Rhead [2,0] represents the element in the 2nd row and 0th column of the head posture matrix, Rhead [1,0] represents the element in the 1st row and 0th column of the head posture matrix, Rhead [0,0] represents the element in the 0th row and 0th column of the head posture matrix, and sy represents the target parameter.

而目标参数sy<1e-6的情况下,可以通过如下公式(3),来确定俯仰角、旋转偏航角和旋转滚动角:
When the target parameter sy<1e-6, the pitch angle, yaw angle and roll angle can be determined by the following formula (3):

其中,θx表示俯仰角,θy表示旋转偏航角,θz表示旋转滚动角,atan(也即是arctan)表示求反正切值,Rhead表示头部姿态矩阵,Rhead[1,2]表示头部姿态矩阵中第1行第2列的元素,Rhead[1,1]表示头部姿态矩阵中第1行第1列的元素,Rhead[2,0]表示头部姿态矩阵中第2行第0列的元素,sy表示目标参数。Among them, θx represents the pitch angle, θy represents the yaw angle, θz represents the roll angle, atan (also known as arctan) represents the inverse tangent value, Rhead represents the head posture matrix, Rhead [1,2] represents the element in the first row and second column of the head posture matrix, Rhead [1,1] represents the element in the first row and first column of the head posture matrix, Rhead [2,0] represents the element in the second row and zero column of the head posture matrix, and sy represents the target parameter.

通过上述过程即可确定出头部姿态信息,此外,头部姿态信息和头部姿态矩阵之间还可以互相转换,转换关系可以参见如下公式(4):
The head posture information can be determined through the above process. In addition, the head posture information and the head posture matrix can be converted to each other. The conversion relationship can be seen in the following formula (4):

其中,Rhead表示头部姿态矩阵,θx表示俯仰角,θy表示旋转偏航角,θz表示旋转滚动角,sin表示求正弦值,cos表示求余弦值。Among them, R head represents the head posture matrix, θ x represents the pitch angle, θ y represents the rotation yaw angle, θ z represents the rotation roll angle, sin represents the sine value, and cos represents the cosine value.

在通过上述过程确定出头部姿态信息后,即可通过步骤203,基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标。After the head posture information is determined through the above process, step 203 can be used to determine the three-dimensional coordinates of the human eye based on the pupil distance of the human eye in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed.

其中,像素坐标为包括横坐标和纵坐标的二维坐标,也即是,左眼的像素坐标包括左眼的横坐标和纵坐标,右眼的像素坐标包括右眼的横坐标和纵坐标。人眼三维坐标包括左眼的横坐标、纵坐标、深度坐标以及右眼的横坐标、纵坐标、深度坐标。基于此,在一些实施例中,对于步骤203,在基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标时,可以包括如下步骤:Among them, the pixel coordinates are two-dimensional coordinates including abscissas and ordinates, that is, the pixel coordinates of the left eye include the abscissas and ordinates of the left eye, and the pixel coordinates of the right eye include the abscissas and ordinates of the right eye. The three-dimensional coordinates of the human eye include the abscissas, ordinates, and depth coordinates of the left eye and the abscissas, ordinates, and depth coordinates of the right eye. Based on this, in some embodiments, for step 203, when determining the three-dimensional coordinates of the human eye based on the pupil distance of the human eye in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, the following steps may be included:

步骤2031、基于待处理图像中的人眼瞳距、相机参数、头部姿态信息、左眼的像素坐标和右眼的像素坐标,确定两眼中心点的深度坐标。 Step 2031: Determine the depth coordinates of the center points of the two eyes based on the pupil distance of the human eye, camera parameters, head posture information, pixel coordinates of the left eye and pixel coordinates of the right eye in the image to be processed.

其中,相机参数可以为矩阵形式,也即是,相机参数可以为相机参数矩阵,例如,可以将相机参数记为 The camera parameters can be in matrix form, that is, the camera parameters can be a camera parameter matrix. For example, the camera parameters can be recorded as

可选地,可以通过如下公式(5),来基于待处理图像中的人眼瞳距、相机参数、头部姿态信息、左眼的像素坐标和右眼的像素坐标,确定两眼中心点的深度坐标:
Optionally, the depth coordinates of the center points of the two eyes can be determined based on the pupil distance of the human eye, camera parameters, head posture information, pixel coordinates of the left eye and pixel coordinates of the right eye in the image to be processed by the following formula (5):

其中,zc表示两眼中心点的深度坐标,d表示待处理图像中的人眼瞳距,ur表示右眼的横坐标,ul表示左眼的横坐标,vr表示右眼的纵坐标,vl表示左眼的纵坐标,fu、fuv、fvu、fv、u0、v0均为相机参数矩阵中所包括的元素,Cy也即是cos(θy),Cz也即是cos(θz),Sy也即是sin(θy)。Among them, zc represents the depth coordinate of the center point of the two eyes, d represents the pupil distance of the human eyes in the image to be processed, ur represents the horizontal coordinate of the right eye, ul represents the horizontal coordinate of the left eye, vr represents the vertical coordinate of the right eye, vl represents the vertical coordinate of the left eye, fu , fuv , fvu , fv , u0 , and v0 are all elements included in the camera parameter matrix, Cy is also cos( θy ), Cz is also cos( θz ), and Sy is also sin( θy ).

步骤2032、基于待处理图像中的人眼瞳距、两眼中心点的深度坐标和头部姿态矩阵,分别确定左眼的深度坐标和右眼的深度坐标。Step 2032: Based on the pupil distance of the human eyes, the depth coordinates of the center points of both eyes, and the head posture matrix in the image to be processed, the depth coordinates of the left eye and the depth coordinates of the right eye are determined respectively.

在一种可能的实现方式中,可以基于待处理图像中的人眼瞳距、两眼中心点的深度坐标以及头部姿态矩阵中第一设定位置、第二设定位置和第三设定位置处的元素,来确定左眼的深度坐标和右眼的深度坐标。In one possible implementation, the depth coordinates of the left eye and the right eye can be determined based on the pupil distance of the human eye in the image to be processed, the depth coordinates of the center points of the two eyes, and the elements at the first set position, the second set position, and the third set position in the head posture matrix.

例如,可以通过如下公式(6),来基于待处理图像中的人眼瞳距、两眼中心点的深度坐标以及头部姿态矩阵中第一设定位置、第二设定位置和第三设定位置处的元素,来确定左眼的深度坐标和右眼的深度坐标:
For example, the depth coordinates of the left eye and the right eye can be determined based on the pupil distance of the human eye in the image to be processed, the depth coordinates of the center points of the two eyes, and the elements at the first set position, the second set position, and the third set position in the head posture matrix by the following formula (6):

其中,zl表示左眼的深度坐标,zr表示右眼的深度坐标,d表示待处理图像中的人眼瞳距,zc表示两眼中心点的深度坐标,Rhead[2,1]表示头部姿态矩阵中第一设定位置(第2行第1列)处的元素,Rhead[2,2]表示头部姿态矩阵中第二设定位置(第2行第2列)处的元素,Rhead[2,0]表示头部姿态矩阵中第三设定位置(第2行第0列)处的元素。Among them, z l represents the depth coordinate of the left eye, z r represents the depth coordinate of the right eye, d represents the pupil distance of the human eye in the image to be processed, z c represents the depth coordinate of the center point of the two eyes, R head [2,1] represents the element at the first set position (row 2, column 1) in the head posture matrix, R head [2,2] represents the element at the second set position (row 2, column 2) in the head posture matrix, and R head [2,0] represents the element at the third set position (row 2, column 0) in the head posture matrix.

步骤2033、基于相机参数、左眼的像素坐标、右眼的像素坐标、左眼的深度坐标和右眼的深度坐标,确定左眼的横坐标和纵坐标、以及右眼的横坐标和纵坐标。Step 2033: Determine the horizontal coordinate and vertical coordinate of the left eye, and the horizontal coordinate and vertical coordinate of the right eye based on the camera parameters, the pixel coordinates of the left eye, the pixel coordinates of the right eye, the depth coordinates of the left eye, and the depth coordinates of the right eye.

在一种可能的实现方式中,可以先基于相机参数、左眼的像素坐标和右眼的像素坐标,确定目标三维坐标,进而基于目标三维坐标、左眼的深度坐标和右眼的深度坐标,确定人眼三维坐标。In one possible implementation, the target three-dimensional coordinates can be determined based on camera parameters, pixel coordinates of the left eye and pixel coordinates of the right eye, and then the three-dimensional coordinates of the human eye can be determined based on the target three-dimensional coordinates, depth coordinates of the left eye and depth coordinates of the right eye.

其中,目标三维坐标可以包括左眼所对应的目标三维坐标和右眼所对应的目标三维 坐标,可选地,可以通过如下公式(7),来基于相机参数、左眼的像素坐标和右眼的像素坐标,确定目标三维坐标:
The target three-dimensional coordinates may include the target three-dimensional coordinates corresponding to the left eye and the target three-dimensional coordinates corresponding to the right eye. Coordinates, optionally, the target three-dimensional coordinates can be determined based on the camera parameters, the pixel coordinates of the left eye and the pixel coordinates of the right eye by the following formula (7):

其中,表示左眼所对应的目标三维坐标,表示右眼所对应的目标三维坐标,表示相机参数,ur表示右眼的横坐标,vr表示右眼的纵坐标,ul表示左眼的横坐标,vl表示左眼的纵坐标。in, Indicates the three-dimensional coordinates of the target corresponding to the left eye, Indicates the three-dimensional coordinates of the target corresponding to the right eye, represents the camera parameters, ur represents the horizontal coordinate of the right eye, vr represents the vertical coordinate of the right eye, ul represents the horizontal coordinate of the left eye, and vl represents the vertical coordinate of the left eye.

进一步地,可以通过如下公式(8),来基于目标三维坐标、左眼的深度坐标和右眼的深度坐标,确定人眼三维坐标:
Furthermore, the three-dimensional coordinates of the human eye can be determined based on the target three-dimensional coordinates, the depth coordinates of the left eye, and the depth coordinates of the right eye by the following formula (8):

其中,表示人眼三维坐标中的左眼三维坐标,表示人眼三维坐标中的右眼三维坐标,表示左眼所对应的目标三维坐标,表示右眼所对应的目标三维坐标,zl表示左眼的深度坐标,zr表示右眼的深度坐标。in, Represents the 3D coordinates of the left eye in the 3D coordinates of the human eye, represents the three-dimensional coordinates of the right eye in the three-dimensional coordinates of the human eye, Indicates the three-dimensional coordinates of the target corresponding to the left eye, represents the target 3D coordinates corresponding to the right eye, z l represents the depth coordinates of the left eye, and z r represents the depth coordinates of the right eye.

通过上述过程,即可基于头部姿态信息对左右眼的像素坐标进行修正,以得到左右眼的三维坐标,三维坐标相较于像素坐标而言准确度更高,从而可以提高人眼定位过程的准确性。Through the above process, the pixel coordinates of the left and right eyes can be corrected based on the head posture information to obtain the three-dimensional coordinates of the left and right eyes. The three-dimensional coordinates are more accurate than the pixel coordinates, thereby improving the accuracy of the human eye positioning process.

以通过本申请所提供的人眼定位方法,来对视频中的每帧图像进行处理,以确定出 每帧图像中的人眼三维坐标为例,参见图5,图5是根据本申请实施例示出的一种人眼定位方法的流程图。如图5所示,可以获取视频流中的一帧图像,然后确定处理过程是否处于正在跟踪状态。若处理过程未处于正在跟踪状态,也即否,在这帧图像之前并未处理过图像或者所处理的图像中未检测到人脸,则基于刚获取到的这帧图像进行人脸检测,以在检测到人脸的情况下,将检测到的人脸定位框作为这帧图像在视频流中之后的其他图像的人脸定位框,以实现人脸跟踪,而在未检测到人脸的情况下,则继续获取视频流中的下一帧图像来进行处理,直至获取到的图像中检测到人脸,此外,在处理过程处于正在跟踪状态的情况下,也即是,表明处理这帧图像之前已经确定出了人脸定位框,则直接利用已确定出的人脸定位框作为这帧图像的人脸定位框即可。在确定出人脸定位框后,即可基于人脸定位框对应的图像部分进行人脸关键点检测,以便基于人脸关键点确定头部姿态信息,进而基于头部姿态信息实现人眼三维坐标的确定,直至视频处理完成。The human eye positioning method provided in this application is used to process each frame of the video to determine the Taking the three-dimensional coordinates of the human eye in each frame of the image as an example, refer to Figure 5, which is a flow chart of a human eye positioning method according to an embodiment of the present application. As shown in Figure 5, a frame of image in the video stream can be obtained, and then it is determined whether the processing process is in a tracking state. If the processing process is not in a tracking state, that is, no, the image has not been processed before this frame of image or the face is not detected in the processed image, then face detection is performed based on the frame of image just obtained, so that when a face is detected, the detected face positioning frame is used as the face positioning frame of other images after this frame of image in the video stream to achieve face tracking, and when no face is detected, the next frame of image in the video stream is continued to be obtained for processing until a face is detected in the acquired image. In addition, when the processing process is in a tracking state, that is, it indicates that the face positioning frame has been determined before processing this frame of image, then the determined face positioning frame can be directly used as the face positioning frame of this frame of image. After the face positioning frame is determined, face key point detection can be performed based on the image portion corresponding to the face positioning frame, so as to determine the head posture information based on the face key points, and then determine the three-dimensional coordinates of the human eye based on the head posture information until the video processing is completed.

上述图5所示仅为一种流程性说明,其中各个步骤的实现方式可以参见上述实施例,此处不再赘述。FIG. 5 is merely a procedural description, wherein the implementation of each step can refer to the above embodiment and will not be repeated here.

上述过程主要介绍了基于头部姿态信息对左右眼的像素坐标进行修正,以得到左右眼的三维坐标的过程,从而可以有效应对摄像头所采集到的图像中人脸未正对摄像头的情况,然而,在现实场景中,还可能出现人脸没有在图像中心位置的情况,为应对这种情况,本申请还提供了如下处理过程/方法。The above process mainly introduces the process of correcting the pixel coordinates of the left and right eyes based on the head posture information to obtain the three-dimensional coordinates of the left and right eyes, so as to effectively deal with the situation where the face in the image captured by the camera is not facing the camera. However, in real scenes, the face may not be in the center of the image. To deal with this situation, the present application also provides the following processing process/method.

可选地,在基于待处理图像中的人脸关键点,确定头部姿态矩阵之后,还可以对头部姿态矩阵进行坐标系转换,以减少因人脸不在图像中心位置给人眼三维坐标确定过程带来的影响。Optionally, after determining the head posture matrix based on the facial key points in the image to be processed, the head posture matrix can also be transformed into a coordinate system to reduce the impact of the face not being in the center of the image on the process of determining the three-dimensional coordinates of the eye.

需要说明的是,确定出的头部姿态矩阵(例如通过黄金标准算法确定出的头部姿态矩阵)为相对于头部局部坐标系下的,当人脸不在图像中心位置时,局部坐标系与全局坐标系之间会存在坐标的旋转变换,基于此,可以将头部姿态矩阵由局部坐标系转换到全局坐标系下,以减少因人脸不在图像中心位置给人眼三维坐标确定过程带来的影响。It should be noted that the determined head posture matrix (for example, the head posture matrix determined by the gold standard algorithm) is relative to the local coordinate system of the head. When the face is not in the center of the image, there will be a rotation transformation of the coordinates between the local coordinate system and the global coordinate system. Based on this, the head posture matrix can be converted from the local coordinate system to the global coordinate system to reduce the impact of the face not being in the center of the image on the three-dimensional coordinate determination process of the human eye.

在一些实施例中,在基于待处理图像中的人脸关键点,确定头部姿态矩阵之后,可以通过如下步骤实现坐标系的转换。In some embodiments, after the head posture matrix is determined based on the facial key points in the image to be processed, the coordinate system conversion can be achieved through the following steps.

步骤一、基于相机参数、待处理图像中左眼的像素坐标和右眼的像素坐标,确定两眼中心点的三维坐标。Step 1: Determine the three-dimensional coordinates of the center points of the two eyes based on the camera parameters, the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed.

在一种可能的实现方式中,可以先基于待处理图像中左眼的像素坐标和右眼的像素坐标,确定两眼中心点的像素坐标;从而基于相机参数和两眼中心点的像素坐标,确定两眼中心点的三维坐标。其中,像素坐标也即包括横坐标和纵坐标。In a possible implementation, the pixel coordinates of the center point of the two eyes can be determined based on the pixel coordinates of the left eye and the right eye in the image to be processed, and then the three-dimensional coordinates of the center point of the two eyes can be determined based on the camera parameters and the pixel coordinates of the center point of the two eyes. The pixel coordinates also include a horizontal coordinate and a vertical coordinate.

可选地,可以通过如下公式(9),以基于左眼的像素坐标和右眼的像素坐标,确定两眼中心点的像素坐标:
Optionally, the pixel coordinates of the center points of the two eyes may be determined based on the pixel coordinates of the left eye and the pixel coordinates of the right eye using the following formula (9):

其中,uc表示两眼中心点的横坐标,vc表示两眼中心点的纵坐标,ul表示左眼的横坐标,vl表示左眼的纵坐标,ur表示右眼的横坐标,vr表示右眼的纵坐标。Among them, uc represents the horizontal coordinate of the center point of the two eyes, vc represents the vertical coordinate of the center point of the two eyes, ul represents the horizontal coordinate of the left eye, vl represents the vertical coordinate of the left eye, ur represents the horizontal coordinate of the right eye, and vr represents the vertical coordinate of the right eye.

在通过如上公式(9)确定出两眼中心点的像素坐标之后,即可通过如下公式(10)和公式(11),来基于相机参数和两眼中心点的像素坐标,确定两眼中心点的三维坐标。

After the pixel coordinates of the center points of the two eyes are determined by the above formula (9), the three-dimensional coordinates of the center points of the two eyes can be determined based on the camera parameters and the pixel coordinates of the center points of the two eyes by the following formulas (10) and (11).

其中,表示两眼中心点的三维坐标,表示相机参数,uc表示两眼中心点的横坐标,vc表示两眼中心点的纵坐标,也即是两眼中心点的齐次坐标。in, Represents the three-dimensional coordinates of the center points of the two eyes, represents the camera parameters, uc represents the horizontal coordinate of the center point of the two eyes, and vc represents the vertical coordinate of the center point of the two eyes. That is, the homogeneous coordinates of the center points of the two eyes.

步骤二、基于两眼中心点的三维坐标,确定旋转矩阵,旋转矩阵用于指示局部坐标系与全局坐标系之间的映射关系。Step 2: Based on the three-dimensional coordinates of the center points of the two eyes, determine the rotation matrix, which is used to indicate the mapping relationship between the local coordinate system and the global coordinate system.

在一种可能的实现方式中,可以基于两眼中心点的三维坐标,分别确定旋转矩阵中的各个列向量,以实现旋转矩阵的确定。In a possible implementation, each column vector in the rotation matrix may be determined based on the three-dimensional coordinates of the center points of the two eyes, so as to determine the rotation matrix.

在头部姿态矩阵可以为一个3×3的矩阵的情况下,旋转矩阵也是一个3×3的矩阵,因而,可以基于两眼中心点的三维坐标,确定出3个列向量,以实现旋转矩阵的确定。When the head posture matrix can be a 3×3 matrix, the rotation matrix is also a 3×3 matrix. Therefore, three column vectors can be determined based on the three-dimensional coordinates of the center points of the two eyes to achieve the determination of the rotation matrix.

可选地,可以通过如下公式(12)至公式(16)来实现旋转矩阵的确定:


C2=C2′/||C2′||2     (14)
C1=cross(C2,C3)        (15)
Rlocal=[C1 C2 C3]       (16)
Optionally, the rotation matrix can be determined by the following formulas (12) to (16):


C 2 =C 2 ′/||C 2 ′|| 2 (14)
C 1 = cross(C 2 , C 3 ) (15)
R local = [C 1 C 2 C 3 ] (16)

其中,Rlocal表示旋转矩阵,C1、C2、C3分别为旋转矩阵中的一个列向量,表示两眼中心点的三维坐标,x、y、z分别为两眼中心点的三维坐标的横坐标、纵坐标和深度坐标,cross表示向量叉积。Where R local represents the rotation matrix, C 1 , C 2 , and C 3 are column vectors in the rotation matrix respectively. Represents the three-dimensional coordinates of the center points of the two eyes, x, y, z are the abscissa, ordinate, and depth coordinates of the three-dimensional coordinates of the center points of the two eyes, respectively, and cross represents the vector cross product.

步骤三、基于旋转矩阵和头部姿态矩阵,确定头部姿态矩阵在全局坐标系下对应的目标头部姿态矩阵。Step 3: Based on the rotation matrix and the head posture matrix, determine the target head posture matrix corresponding to the head posture matrix in the global coordinate system.

在一种可能的实现方式中,可以基于旋转矩阵对头部姿态矩阵进行旋转变换,以得到头部姿态矩阵在全局坐标系下对应的目标头部姿态矩阵。In a possible implementation, the head posture matrix may be rotationally transformed based on the rotation matrix to obtain a target head posture matrix corresponding to the head posture matrix in a global coordinate system.

可选地,可以通过如下公式(17),来基于旋转矩阵和头部姿态矩阵,确定头部姿态矩阵在全局坐标系下对应的目标头部姿态矩阵:
Rhead′=RlocalRhead        (17)
Optionally, the target head posture matrix corresponding to the head posture matrix in the global coordinate system can be determined based on the rotation matrix and the head posture matrix by the following formula (17):
R head ′=R local R head (17)

其中,Rhead’表示目标头部姿态矩阵,Rlocal表示旋转矩阵,Rhead表示旋转矩阵。Among them, R head 'represents the target head posture matrix, R local represents the rotation matrix, and R head represents the rotation matrix.

在将头部姿态矩阵转换为全局坐标系下的目标头部姿态矩阵后,在通过步骤203,基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标时,即可基于目标头部姿态矩阵,确定目标头部姿态信息,从而基于人眼瞳距、相机参数、目标头部姿态信息以及左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标。After the head posture matrix is converted into a target head posture matrix in the global coordinate system, when the three-dimensional coordinates of the human eye are determined based on the pupil distance of the human eye in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed through step 203, the target head posture information can be determined based on the target head posture matrix, thereby determining the three-dimensional coordinates of the human eye based on the pupil distance of the human eye, the camera parameters, the target head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye.

其中,基于目标头部姿态矩阵,确定目标头部姿态信息的实现过程可以参见上述公式(4),以将目标头部姿态矩阵转换为目标头部姿态信息。而基于人眼瞳距、相机参数、目标头部姿态信息以及左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标的过程,与步骤203的实现过程同理,此处不再赘述。The process of determining the target head posture information based on the target head posture matrix can refer to the above formula (4) to convert the target head posture matrix into the target head posture information. The process of determining the three-dimensional coordinates of the human eye based on the human eye pupil distance, camera parameters, target head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye is the same as the implementation process of step 203, which will not be repeated here.

上述实施例主要介绍了本申请所提供的人眼定位方法的实现过程,为更好地理解本申请所提供的人眼定位方法,以将本申请所提供的人眼定位方法应用于测距场景为例,在确定出人眼三维坐标之后,可以基于人眼三维坐标,确定人眼与摄像头之间的距离,以在距离小于设定距离阈值的情况下,发送提示信息,提示信息用于提示用户增大人眼与摄像头之间的距离,帮助用户预防近视。The above embodiments mainly introduce the implementation process of the human eye positioning method provided by the present application. In order to better understand the human eye positioning method provided by the present application, taking the application of the human eye positioning method provided by the present application to the ranging scenario as an example, after determining the three-dimensional coordinates of the human eye, the distance between the human eye and the camera can be determined based on the three-dimensional coordinates of the human eye, so that when the distance is less than the set distance threshold, a prompt message is sent, and the prompt message is used to prompt the user to increase the distance between the human eye and the camera to help the user prevent myopia.

其中,在基于人眼三维坐标,确定人眼与摄像头之间的距离时,可以直接将人眼三维纵坐标中的深度坐标,作为人眼与摄像头之间的距离。When determining the distance between the human eye and the camera based on the three-dimensional coordinates of the human eye, the depth coordinate in the three-dimensional vertical coordinate of the human eye can be directly used as the distance between the human eye and the camera.

可选地,设定距离阈值可以为任意取值,本申请对设定距离阈值的具体取值不加以限定,在所确定出的人眼与摄像头之间的距离小于设定距离阈值的情况下,计算设备可以通过发送提示信息的方式来对用户进行提示。Optionally, the set distance threshold can be an arbitrary value. The present application does not limit the specific value of the set distance threshold. When the determined distance between the human eye and the camera is less than the set distance threshold, the computing device can prompt the user by sending a prompt message.

其中,提示信息可以为语音提示信息、文字提示信息,等等,本申请对提示信息的具体类型不加以限定。Among them, the prompt information can be voice prompt information, text prompt information, etc., and the present application does not limit the specific type of the prompt information.

本申请的实施例还提出了一种人眼定位装置,参见图6,图6是根据本申请实施例示出的一种人眼定位装置的结构示意图,如图6所示,该装置包括:The embodiment of the present application further proposes a human eye positioning device. Referring to FIG. 6 , FIG. 6 is a schematic diagram of the structure of a human eye positioning device according to the embodiment of the present application. As shown in FIG. 6 , the device includes:

检测模块601,用于对包括人脸的待处理图像进行人脸关键点检测,得到待处理图像中的人脸关键点;The detection module 601 is used to detect key points of the face on the image to be processed including the face, and obtain the key points of the face in the image to be processed;

第一确定模块602,用于基于待处理图像中的人脸关键点,确定头部姿态信息,头部姿态信息用于指示人的头部与预设方向之间的偏转角度;A first determination module 602 is used to determine head posture information based on key points of a human face in an image to be processed, where the head posture information is used to indicate a deflection angle between a human head and a preset direction;

第二确定模块603,用于基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标。 The second determination module 603 is used to determine the three-dimensional coordinates of the human eye based on the pupil distance of the human eye in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed.

在本申请的一些实施例中,第一确定模块602,在用于基于待处理图像中的人脸关键点,确定头部姿态信息时,用于:In some embodiments of the present application, the first determination module 602, when used to determine the head posture information based on the facial key points in the image to be processed, is used to:

基于待处理图像中的人脸关键点,确定头部姿态矩阵,头部姿态矩阵用于以矩阵的形式表示待处理图像中头部的姿态;Based on the facial key points in the image to be processed, a head posture matrix is determined, where the head posture matrix is used to represent the posture of the head in the image to be processed in the form of a matrix;

基于头部姿态矩阵,确定目标参数的取值;Based on the head posture matrix, determine the value of the target parameter;

基于目标参数的取值和头部姿态矩阵,确定头部姿态信息。Based on the values of the target parameters and the head posture matrix, the head posture information is determined.

在本申请的一些实施例中,头部姿态信息包括俯仰角、旋转偏航角和旋转滚动角;In some embodiments of the present application, the head posture information includes a pitch angle, a rotational yaw angle, and a rotational roll angle;

第一确定模块602,在用于基于目标参数的取值和头部姿态矩阵,确定头部姿态信息时,用于:The first determination module 602, when used to determine the head posture information based on the value of the target parameter and the head posture matrix, is used to:

在目标参数的取值大于或等于设定阈值的情况下,基于头部姿态矩阵中第一设定位置和第二设定位置处的元素确定俯仰角,基于头部姿态矩阵中第三设定位置处的元素和目标参数的取值,确定旋转偏航角,基于头部姿态矩阵中第四设定位置和第五设定位置处的元素确定旋转滚动角;When the value of the target parameter is greater than or equal to the set threshold, the pitch angle is determined based on the elements at the first set position and the second set position in the head posture matrix, the rotational yaw angle is determined based on the elements at the third set position in the head posture matrix and the value of the target parameter, and the rotational roll angle is determined based on the elements at the fourth set position and the fifth set position in the head posture matrix;

在目标参数的取值小于设定阈值的情况下,基于头部姿态矩阵中第六设定位置和第七设定位置处的元素确定俯仰角,基于头部姿态矩阵中第三设定位置处的元素和目标参数的取值,确定旋转偏航角,将旋转滚动角的取值确定为设定角度值。When the value of the target parameter is less than the set threshold, the pitch angle is determined based on the elements at the sixth set position and the seventh set position in the head posture matrix, the rotational yaw angle is determined based on the elements at the third set position in the head posture matrix and the value of the target parameter, and the value of the rotational roll angle is determined as the set angle value.

在本申请的一些实施例中,像素坐标为包括横坐标和纵坐标的二维坐标,人眼三维坐标包括左眼的横坐标、纵坐标、深度坐标以及右眼的横坐标、纵坐标、深度坐标;In some embodiments of the present application, the pixel coordinates are two-dimensional coordinates including abscissas and ordinates, and the three-dimensional coordinates of the human eye include abscissas, ordinates, and depth coordinates of the left eye and abscissas, ordinates, and depth coordinates of the right eye;

第二确定模块603,在用于基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标时,用于:The second determination module 603, when used to determine the three-dimensional coordinates of the human eye based on the human eye pupil distance in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, is used to:

基于人眼瞳距、相机参数、头部姿态信息、左眼的像素坐标和右眼的像素坐标,确定两眼中心点的深度坐标;Determine the depth coordinates of the center points of the two eyes based on the pupil distance, camera parameters, head posture information, the pixel coordinates of the left eye and the pixel coordinates of the right eye;

基于人眼瞳距、头部姿态矩阵、两眼中心点的深度坐标,分别确定左眼的深度坐标和右眼的深度坐标;Based on the pupil distance of the human eye, the head posture matrix, and the depth coordinates of the center points of both eyes, the depth coordinates of the left eye and the right eye are determined respectively;

基于相机参数、左眼的像素坐标、右眼的像素坐标、左眼的深度坐标和右眼的深度坐标,确定左眼的横坐标和纵坐标、以及右眼的横坐标和纵坐标。Based on the camera parameters, the pixel coordinates of the left eye, the pixel coordinates of the right eye, the depth coordinates of the left eye, and the depth coordinates of the right eye, the abscissa and ordinate of the left eye, and the abscissa and ordinate of the right eye are determined.

在本申请的一些实施例中,该装置还包括:In some embodiments of the present application, the device further comprises:

第三确定模块,用于基于相机参数、待处理图像中左眼的像素坐标和右眼的像素坐标,确定两眼中心点的三维坐标;A third determination module is used to determine the three-dimensional coordinates of the center points of the two eyes based on the camera parameters, the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed;

第三确定模块,还用于基于两眼中心点的三维坐标,确定旋转矩阵,旋转矩阵用于指示局部坐标系与全局坐标系之间的映射关系;The third determination module is further used to determine a rotation matrix based on the three-dimensional coordinates of the center points of the two eyes, where the rotation matrix is used to indicate a mapping relationship between the local coordinate system and the global coordinate system;

第三确定模块,还用于基于旋转矩阵和头部姿态矩阵,确定头部姿态矩阵在全局坐标系下对应的目标头部姿态矩阵。The third determination module is also used to determine the target head posture matrix corresponding to the head posture matrix in the global coordinate system based on the rotation matrix and the head posture matrix.

在本申请的一些实施例中,第二确定模块603,在用于基于待处理图像中的人眼瞳距、用于拍摄待处理图像的摄像头的相机参数、头部姿态信息以及待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标时,用于:In some embodiments of the present application, the second determination module 603, when used to determine the three-dimensional coordinates of the human eye based on the human eye pupil distance in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, is used to:

基于目标头部姿态矩阵,确定目标头部姿态信息;Based on the target head posture matrix, determine the target head posture information;

基于人眼瞳距、相机参数、目标头部姿态信息以及左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标。The three-dimensional coordinates of the human eye are determined based on the human eye pupil distance, camera parameters, target head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye.

在本申请的一些实施例中,检测模块601,在用于对包括人脸的待处理图像进行人脸关键点检测,得到待处理图像中的人脸关键点时,用于:In some embodiments of the present application, the detection module 601, when used to detect facial key points on an image to be processed including a face and obtain facial key points in the image to be processed, is used to:

基于待处理图像进行人脸检测,以确定待处理图像中的人脸定位框;Performing face detection based on the image to be processed to determine a face positioning frame in the image to be processed;

基于人脸定位框所对应的图像部分进行人脸关键点检测,得到待处理图像中的人脸关键点。The facial key points are detected based on the image portion corresponding to the face positioning frame to obtain the facial key points in the image to be processed.

在本申请的一些实施例中,该装置还包括: In some embodiments of the present application, the device further comprises:

第四确定模块,用于基于人眼三维坐标,确定人眼与摄像头之间的距离;A fourth determination module, used to determine the distance between the human eye and the camera based on the three-dimensional coordinates of the human eye;

发送模块,用于在距离小于设定距离阈值的情况下,发送提示信息,提示信息用于提示用户增大人眼与摄像头之间的距离。The sending module is used to send a prompt message when the distance is less than a set distance threshold, and the prompt message is used to prompt the user to increase the distance between the human eye and the camera.

上述装置中各个模块的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.

对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本说明书方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.

本申请还提供了一种计算设备,参见图7,图7是根据本申请实施例示出的一种计算设备的结构示意图。如图7所示,计算设备包括处理器710、存储器720和网络接口730,存储器720用于存储可在处理器710上运行的计算机程序代码,处理器710用于在执行该计算机程序代码时实现本申请任一实施例所提供的人眼定位方法,网络接口730用于实现输入输出功能。在更多可能的实现方式中,计算设备还可以包括其他硬件,本申请对此不做限定。The present application also provides a computing device, see Figure 7, which is a schematic diagram of the structure of a computing device according to an embodiment of the present application. As shown in Figure 7, the computing device includes a processor 710, a memory 720 and a network interface 730, the memory 720 is used to store computer program codes that can be run on the processor 710, the processor 710 is used to implement the human eye positioning method provided in any embodiment of the present application when executing the computer program code, and the network interface 730 is used to implement input and output functions. In more possible implementations, the computing device may also include other hardware, which is not limited in the present application.

本申请还提供了一种计算机可读存储介质,计算机可读存储介质可以是多种形式,比如,在不同的例子中,计算机可读存储介质可以是:RAM(Random Access Memory,随机存取存储器)、易失存储器、非易失性存储器、闪存、存储驱动器(如硬盘驱动器)、固态硬盘、任何类型的存储盘(如光盘、DVD等),或者类似的存储介质,或者它们的组合。特殊的,计算机可读介质还可以是纸张或者其他合适的能够打印程序的介质。计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现本申请任一实施例所提供的人眼定位方法。The present application also provides a computer-readable storage medium, which can be in various forms. For example, in different examples, the computer-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof. In particular, the computer-readable medium can also be paper or other suitable medium capable of printing programs. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the human eye positioning method provided in any embodiment of the present application is implemented.

本申请还提供了一种计算机程序产品,包括计算机程序,计算机程序被处理器执行时实现本申请任一实施例所提供的人眼定位方法。The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the human eye positioning method provided in any embodiment of the present application.

在本申请中,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性。术语“多个”指两个或两个以上,除非另有明确的限定。In the present application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The term "plurality" refers to two or more than two, unless otherwise clearly defined.

本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由权利要求指出。Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the disclosure disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.

应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。 It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims (12)

一种人眼定位方法,包括:A method for locating human eyes, comprising: 对包括人脸的待处理图像进行人脸关键点检测,得到待处理图像中的人脸关键点;Performing facial key point detection on the image to be processed including the face to obtain the facial key points in the image to be processed; 基于所述待处理图像中的人脸关键点,确定头部姿态信息,所述头部姿态信息用于指示人的头部与预设方向之间的偏转角度;Based on the key points of the human face in the image to be processed, determining head posture information, wherein the head posture information is used to indicate a deflection angle between the human head and a preset direction; 基于所述待处理图像中的人眼瞳距、用于拍摄所述待处理图像的摄像头的相机参数、所述头部姿态信息以及所述待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标,所述预设方向为正对所述摄像头的方向。Based on the pupil distance of the human eye in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the right eye in the image to be processed, the three-dimensional coordinates of the human eye are determined, and the preset direction is the direction facing the camera. 根据权利要求1所述的方法,其中,所述基于所述待处理图像中的人脸关键点,确定头部姿态信息,包括:The method according to claim 1, wherein determining the head posture information based on the facial key points in the image to be processed comprises: 基于所述待处理图像中的人脸关键点,确定头部姿态矩阵,所述头部姿态矩阵用于以矩阵的形式表示所述待处理图像中头部的姿态;Based on the facial key points in the image to be processed, determining a head posture matrix, wherein the head posture matrix is used to represent the posture of the head in the image to be processed in the form of a matrix; 基于所述头部姿态矩阵,确定目标参数的取值;Based on the head posture matrix, determining the value of the target parameter; 基于所述目标参数的取值和所述头部姿态矩阵,确定所述头部姿态信息。The head posture information is determined based on the value of the target parameter and the head posture matrix. 根据权利要求2所述的方法,其中,所述头部姿态信息包括俯仰角、旋转偏航角和旋转滚动角;The method according to claim 2, wherein the head posture information includes a pitch angle, a rotational yaw angle, and a rotational roll angle; 所述基于所述目标参数的取值和所述头部姿态矩阵,确定所述头部姿态信息,包括:The determining the head posture information based on the value of the target parameter and the head posture matrix includes: 在所述目标参数的取值大于或等于设定阈值的情况下,基于所述头部姿态矩阵中第一设定位置和第二设定位置处的元素确定俯仰角,基于所述头部姿态矩阵中第三设定位置处的元素和所述目标参数的取值,确定旋转偏航角,基于所述头部姿态矩阵中第四设定位置和第五设定位置处的元素确定旋转滚动角;In the case where the value of the target parameter is greater than or equal to the set threshold, determining the pitch angle based on the elements at the first set position and the second set position in the head posture matrix, determining the rotational yaw angle based on the elements at the third set position in the head posture matrix and the value of the target parameter, and determining the rotational roll angle based on the elements at the fourth set position and the fifth set position in the head posture matrix; 在所述目标参数的取值小于设定阈值的情况下,基于所述头部姿态矩阵中第六设定位置和第七设定位置处的元素确定俯仰角,基于所述头部姿态矩阵中第三设定位置处的元素和所述目标参数的取值,确定旋转偏航角,将旋转滚动角的取值确定为设定角度值。When the value of the target parameter is less than a set threshold, the pitch angle is determined based on the elements at the sixth set position and the seventh set position in the head posture matrix, the rotational yaw angle is determined based on the elements at the third set position in the head posture matrix and the value of the target parameter, and the value of the rotational roll angle is determined as the set angle value. 根据权利要求2或3所述的方法,其中,所述像素坐标为包括横坐标和纵坐标的二维坐标,所述人眼三维坐标包括左眼的横坐标、纵坐标、深度坐标以及右眼的横坐标、纵坐标、深度坐标;The method according to claim 2 or 3, wherein the pixel coordinates are two-dimensional coordinates including abscissas and ordinates, and the three-dimensional coordinates of the human eye include abscissas, ordinates, and depth coordinates of the left eye and abscissas, ordinates, and depth coordinates of the right eye; 所述基于待处理图像中的人眼瞳距、用于拍摄所述待处理图像的摄像头的相机参数、所述头部姿态信息以及所述待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标,包括:The method of determining the three-dimensional coordinates of the human eye based on the human eye pupil distance in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed includes: 基于所述人眼瞳距、所述相机参数、所述头部姿态信息、所述左眼的像素坐标和所述右眼的像素坐标,确定两眼中心点的深度坐标;Determine the depth coordinates of the center points of the two eyes based on the human pupil distance, the camera parameters, the head posture information, the pixel coordinates of the left eye and the pixel coordinates of the right eye; 基于所述人眼瞳距、所述头部姿态矩阵、所述两眼中心点的深度坐标,分别确定左眼的深度坐标和右眼的深度坐标;Based on the human pupil distance, the head posture matrix, and the depth coordinates of the center points of the two eyes, respectively determine the depth coordinates of the left eye and the depth coordinates of the right eye; 基于所述相机参数、所述左眼的像素坐标、所述右眼的像素坐标、所述左眼的深度坐标和所述右眼的深度坐标,确定所述左眼的横坐标和纵坐标、以及所述右眼的横坐标和纵坐标。Based on the camera parameters, the pixel coordinates of the left eye, the pixel coordinates of the right eye, the depth coordinates of the left eye, and the depth coordinates of the right eye, the abscissa and ordinate of the left eye, and the abscissa and ordinate of the right eye are determined. 根据权利要求2至4中任一项所述的方法,其中,所述基于所述待处理图像中的人脸关键点,确定头部姿态矩阵之后,所述方法还包括:The method according to any one of claims 2 to 4, wherein after determining the head posture matrix based on the facial key points in the image to be processed, the method further comprises: 基于所述相机参数、所述待处理图像中左眼的像素坐标和右眼的像素坐标,确定两眼中心点的三维坐标;Determine the three-dimensional coordinates of the center points of the two eyes based on the camera parameters, the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed; 基于所述两眼中心点的三维坐标,确定旋转矩阵,所述旋转矩阵用于指示局部坐标系与全局坐标系之间的映射关系;Based on the three-dimensional coordinates of the center points of the two eyes, a rotation matrix is determined, where the rotation matrix is used to indicate a mapping relationship between a local coordinate system and a global coordinate system; 基于所述旋转矩阵和所述头部姿态矩阵,确定所述头部姿态矩阵在所述全局坐标系下对应的目标头部姿态矩阵。 Based on the rotation matrix and the head posture matrix, a target head posture matrix corresponding to the head posture matrix in the global coordinate system is determined. 根据权利要求5所述的方法,其中,所述基于待处理图像中的人眼瞳距、用于拍摄所述待处理图像的摄像头的相机参数、所述头部姿态信息以及所述待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标,包括:The method according to claim 5, wherein the determining the three-dimensional coordinates of the human eye based on the human eye pupil distance in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed comprises: 基于所述目标头部姿态矩阵,确定目标头部姿态信息;Based on the target head posture matrix, determining target head posture information; 基于所述人眼瞳距、所述相机参数、所述目标头部姿态信息以及所述左眼的像素坐标和所述右眼的像素坐标,确定所述人眼三维坐标。The three-dimensional coordinates of the human eye are determined based on the human eye pupil distance, the camera parameters, the target head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye. 根据权利要求1至6中任一项所述的方法,其中,所述对包括人脸的待处理图像进行人脸关键点检测,得到待处理图像中的人脸关键点,包括:The method according to any one of claims 1 to 6, wherein the step of performing facial key point detection on the image to be processed including a face to obtain the facial key points in the image to be processed comprises: 基于所述待处理图像进行人脸检测,以确定所述待处理图像中的人脸定位框;Performing face detection based on the image to be processed to determine a face positioning frame in the image to be processed; 基于所述人脸定位框所对应的图像部分进行人脸关键点检测,得到所述待处理图像中的人脸关键点。Facial key points are detected based on the image portion corresponding to the face positioning frame to obtain facial key points in the image to be processed. 根据权利要求1至7中任一项所述的方法,其中,所述基于待处理图像中的人眼瞳距、用于拍摄所述待处理图像的摄像头的相机参数、所述头部姿态信息以及所述待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标之后,所述方法还包括:The method according to any one of claims 1 to 7, wherein after determining the three-dimensional coordinates of the human eye based on the human eye pupil distance in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed, the method further comprises: 基于所述人眼三维坐标,确定人眼与所述摄像头之间的距离;Based on the three-dimensional coordinates of the human eye, determining the distance between the human eye and the camera; 在所述距离小于设定距离阈值的情况下,发送提示信息,所述提示信息用于提示用户增大所述人眼与所述摄像头之间的距离。When the distance is less than a set distance threshold, a prompt message is sent, where the prompt message is used to prompt the user to increase the distance between the human eye and the camera. 根据权利要求1至8中任一项所述的方法,其中,在对所述包括人脸的待处理图像进行人脸关键点检测之间,还包括:对所述待处理图像中的人脸质量进行检测,以过滤图像质量较差的人脸。According to the method according to any one of claims 1 to 8, before performing facial key point detection on the image to be processed including the face, it also includes: detecting the quality of the face in the image to be processed to filter out faces with poor image quality. 一种人眼定位装置,包括:A human eye positioning device, comprising: 检测模块,用于对包括人脸的待处理图像进行人脸关键点检测,得到待处理图像中的人脸关键点;A detection module, used to detect key points of human faces on the image to be processed, so as to obtain key points of human faces in the image to be processed; 第一确定模块,用于基于所述待处理图像中的人脸关键点,确定头部姿态信息,所述头部姿态信息用于指示人的头部与预设方向之间的偏转角度;A first determination module, configured to determine head posture information based on key points of a human face in the image to be processed, wherein the head posture information is used to indicate a deflection angle between a human head and a preset direction; 第二确定模块,用于基于待处理图像中的人眼瞳距、用于拍摄所述待处理图像的摄像头的相机参数、所述头部姿态信息以及所述待处理图像中左眼的像素坐标和右眼的像素坐标,确定人眼三维坐标。The second determination module is used to determine the three-dimensional coordinates of the human eye based on the pupil distance of the human eye in the image to be processed, the camera parameters of the camera used to shoot the image to be processed, the head posture information, and the pixel coordinates of the left eye and the pixel coordinates of the right eye in the image to be processed. 一种计算设备,包括存储器、处理器,所述存储器存储有可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如权利要求1至9中任一项所述的人眼定位方法所执行的操作。A computing device comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, wherein when the processor executes the computer program, the operations performed by the human eye positioning method as described in any one of claims 1 to 9 are implemented. 一种非易失性计算机可读存储介质,其上存储有程序,所述程序被处理器执行时,实现如权利要求1至9中任一项所述的人眼定位方法所执行的操作。 A non-volatile computer-readable storage medium having a program stored thereon, wherein when the program is executed by a processor, the operation performed by the human eye positioning method according to any one of claims 1 to 9 is implemented.
PCT/CN2023/118703 2023-01-06 2023-09-14 Human eye positioning method and apparatus, and computing device and storage medium Ceased WO2024146165A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310020843.7 2023-01-06
CN202310020843.7A CN118314197A (en) 2023-01-06 2023-01-06 Human eye positioning method, device, equipment and medium

Publications (1)

Publication Number Publication Date
WO2024146165A1 true WO2024146165A1 (en) 2024-07-11

Family

ID=91730763

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/118703 Ceased WO2024146165A1 (en) 2023-01-06 2023-09-14 Human eye positioning method and apparatus, and computing device and storage medium

Country Status (2)

Country Link
CN (1) CN118314197A (en)
WO (1) WO2024146165A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119027924A (en) * 2024-10-29 2024-11-26 浙江华锐捷技术有限公司 Distraction detection method, electronic apparatus, and computer-readable storage medium
CN120201300A (en) * 2025-03-06 2025-06-24 巽腾(广东)科技有限公司 Electronic equipment eye protection method, device and equipment with camera

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119769985A (en) * 2024-12-13 2025-04-08 广东省人民医院 Method for detecting near vision based on self-adaptive technology

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109040736A (en) * 2018-08-08 2018-12-18 上海玮舟微电子科技有限公司 A kind of scaling method, device, equipment and the storage medium of eye space position
CN111046744A (en) * 2019-11-21 2020-04-21 深圳云天励飞技术有限公司 A method, device, readable storage medium and terminal device for detecting an area of interest
CN113095274A (en) * 2021-04-26 2021-07-09 中山大学 Sight estimation method, system, device and storage medium
CN113642368A (en) * 2020-05-11 2021-11-12 杭州海康威视数字技术股份有限公司 Determination method, device, device and storage medium of face pose

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109040736A (en) * 2018-08-08 2018-12-18 上海玮舟微电子科技有限公司 A kind of scaling method, device, equipment and the storage medium of eye space position
CN111046744A (en) * 2019-11-21 2020-04-21 深圳云天励飞技术有限公司 A method, device, readable storage medium and terminal device for detecting an area of interest
CN113642368A (en) * 2020-05-11 2021-11-12 杭州海康威视数字技术股份有限公司 Determination method, device, device and storage medium of face pose
CN113095274A (en) * 2021-04-26 2021-07-09 中山大学 Sight estimation method, system, device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119027924A (en) * 2024-10-29 2024-11-26 浙江华锐捷技术有限公司 Distraction detection method, electronic apparatus, and computer-readable storage medium
CN120201300A (en) * 2025-03-06 2025-06-24 巽腾(广东)科技有限公司 Electronic equipment eye protection method, device and equipment with camera

Also Published As

Publication number Publication date
CN118314197A (en) 2024-07-09

Similar Documents

Publication Publication Date Title
WO2024146165A1 (en) Human eye positioning method and apparatus, and computing device and storage medium
CN106503671B (en) The method and apparatus for determining human face posture
JP5437311B2 (en) Image correction method, image correction system, angle estimation method, and angle estimation device
CN106503684B (en) A face image processing method and device
CN108564617A (en) Three-dimensional reconstruction method and device of multi-eye camera, VR camera and panoramic camera
CN103150544A (en) Method and apparatus for object pose estimation
US9727776B2 (en) Object orientation estimation
JPWO2018235163A1 (en) Calibration apparatus, calibration chart, chart pattern generation apparatus, and calibration method
JPWO2015146101A1 (en) Face collation apparatus, method, and recording medium
JP7064257B2 (en) Image depth determination method and creature recognition method, circuit, device, storage medium
WO2018112788A1 (en) Image processing method and device
CN112017212B (en) Training and tracking method and system of face key point tracking model
TW201118791A (en) System and method for obtaining camera parameters from a plurality of images, and computer program products thereof
CN109034017A (en) Head pose estimation method and machine readable storage medium
US20240029283A1 (en) Image depth prediction method, electronic device, and non-transitory storage medium
JP2017123087A (en) Program, apparatus and method for calculating normal vector of planar object reflected in continuous captured images
JP6086491B2 (en) Image processing apparatus and database construction apparatus thereof
CN112102404B (en) Object detection tracking method and device and head-mounted display equipment
CN112541973B (en) Virtual-real superposition method and system
CN113920196B (en) Visual positioning method, device and computer equipment
CN112396654B (en) Method and device for determining the position and posture of a tracked object during image tracking
CN115278071B (en) Image processing method, device, electronic device and readable storage medium
CN113344789B (en) Image splicing method and device, electronic equipment and computer readable storage medium
CN111353945B (en) Fisheye image correction method, device and storage medium
TWI658431B (en) Image processing method, image processing device, and computer readable recording medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23914304

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE