CN117392736A - Detection method and device for human eye gaze area and head-mounted augmented reality device - Google Patents
Detection method and device for human eye gaze area and head-mounted augmented reality device Download PDFInfo
- Publication number
- CN117392736A CN117392736A CN202210772190.3A CN202210772190A CN117392736A CN 117392736 A CN117392736 A CN 117392736A CN 202210772190 A CN202210772190 A CN 202210772190A CN 117392736 A CN117392736 A CN 117392736A
- Authority
- CN
- China
- Prior art keywords
- human eye
- image
- bright spot
- determining
- head
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/18—Eye characteristics, e.g. of the iris
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/006—Mixed reality
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/774—Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Databases & Information Systems (AREA)
- Artificial Intelligence (AREA)
- Medical Informatics (AREA)
- Human Computer Interaction (AREA)
- Ophthalmology & Optometry (AREA)
- Computer Graphics (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Processing Or Creating Images (AREA)
Abstract
本申请公开了一种人眼注视区域的检测方法、装置及头戴增强现实设备。该方法应用于头戴增强现实设备,其中,头戴增强现实设备包括多个光源,至少一个光源的形状和其他光源的形状不相同。该方法包括:获取人眼图像;基于人眼图像,确定亮斑的形状信息;基于亮斑的形状信息,确定亮斑与光源之间的对应关系;基于亮斑与光源之间的对应关系,确定人眼注视区域。本方法通过确定出亮斑的形状信息,即使在人眼图像中亮斑缺失的情况下,头戴增强现实设备基于光源的形状信息,能够快速且准确地确定出亮斑和光源之间的对应关系,正确的亮斑和光源的对应关系可以保证人眼注视区域确定的准确性,使得用户的使用体验极佳。
This application discloses a method and device for detecting human eye gaze areas and a head-mounted augmented reality device. The method is applied to a head-mounted augmented reality device, wherein the head-mounted augmented reality device includes multiple light sources, and the shape of at least one light source is different from the shapes of other light sources. The method includes: acquiring a human eye image; determining the shape information of the bright spot based on the human eye image; determining the correspondence between the bright spot and the light source based on the shape information of the bright spot; based on the correspondence between the bright spot and the light source, Determine the area where the human eye is looking. This method determines the shape information of the bright spot. Even when the bright spot is missing in the human eye image, the head-mounted augmented reality device can quickly and accurately determine the correspondence between the bright spot and the light source based on the shape information of the light source. The correct correspondence between bright spots and light sources can ensure the accuracy of determining the human eye's gaze area, making the user's experience excellent.
Description
技术领域Technical field
本申请涉及增强现实技术领域,更具体地,涉及一种人眼注视区域的检测方法、装置及头戴增强现实设备。The present application relates to the field of augmented reality technology, and more specifically, to a method and device for detecting human eye gaze areas and a head-mounted augmented reality device.
背景技术Background technique
眼动追踪技术被广泛应用在头戴增强现实设备中,其可以实现眼动交互、眼动渲染等功能。Eye tracking technology is widely used in head-mounted augmented reality devices, which can realize functions such as eye movement interaction and eye movement rendering.
相关技术提供的眼动追踪技术具体如下:头戴增强现实设备的指定表面设置有红外光源,当用户佩戴头戴式显示装置时,红外光源处于发光状态,此时头戴显示装置中的近眼相机采集包含红外亮斑的人眼图像,进而确定出红外光源与红外亮斑的对应关系,即可求解用户的人眼注视区域。The eye tracking technology provided by related technologies is as follows: the designated surface of the head-mounted augmented reality device is provided with an infrared light source. When the user wears the head-mounted display device, the infrared light source is in a glowing state. At this time, the near-eye camera in the head-mounted display device Collect the human eye image containing infrared bright spots, and then determine the corresponding relationship between the infrared light source and the infrared bright spots, so as to solve the user's human eye gaze area.
其中,确定红外光源与红外亮斑的对应关系的方案如下:头戴增强现实设备通过亮斑提取算法提取人眼图像中的亮斑,之后以最亮的亮斑为起点,假设多种红外光源与红外亮斑的映射关系,最后通过贝叶斯模型求解假设出来的映射关系的概率,将概率最大的假设出来的映射关系确定为用于求解人眼注视区域的映射关系。Among them, the scheme for determining the correspondence between infrared light sources and infrared bright spots is as follows: the head-mounted augmented reality device extracts the bright spots in the human eye image through the bright spot extraction algorithm, and then uses the brightest spot as the starting point, assuming multiple infrared light sources The mapping relationship with the infrared bright spots, and finally the probability of the assumed mapping relationship is solved through the Bayesian model, and the assumed mapping relationship with the highest probability is determined as the mapping relationship used to solve the human eye gaze area.
但是,上述确定红外光源与红外亮斑的对应关系的方案存在如下缺陷:当红外光源在照射用户的眼部区域时,并非全部的红外光源能够在眼镜的角膜区域发生反射形成亮斑,因此,采集到的人眼图像中会发生亮斑缺失的情况,也即,人眼图像中的亮斑数量小于红外光源的数量。在这种情况下,贝叶斯模型难以准确确定出红外光源与红外亮斑的映射关系,导致后续头戴增强现实设备无法确定出用户的注视区域,降低了用户的使用体验。However, the above-mentioned scheme for determining the corresponding relationship between infrared light sources and infrared bright spots has the following defects: when the infrared light source irradiates the user's eye area, not all infrared light sources can be reflected in the corneal area of the glasses to form bright spots. Therefore, Missing bright spots will occur in the collected human eye images, that is, the number of bright spots in the human eye images is less than the number of infrared light sources. In this case, it is difficult for the Bayesian model to accurately determine the mapping relationship between the infrared light source and the infrared bright spot, resulting in the subsequent head-mounted augmented reality device being unable to determine the user's gaze area, which reduces the user experience.
发明内容Contents of the invention
本申请实施例提供一种人眼注视区域的检测方法、装置及头戴增强现实设备。Embodiments of the present application provide a method and device for detecting human eye gaze areas, and a head-mounted augmented reality device.
第一方面,本申请一些实施例提供一种人眼注视区域的检测方法,该方法应用于头戴增强现实设备。其中,头戴增强现实设备包括多个光源,至少一个光源的形状和其他光源的形状不相同。该方法包括:获取人眼图像,人眼图像是对佩戴头戴显示装置的用户的眼睛区域采集得到的,人眼图像包含至少两个亮斑;基于人眼图像,确定亮斑的形状信息;基于亮斑的形状信息,确定亮斑与光源之间的对应关系;基于亮斑与光源之间的对应关系,确定人眼注视区域。In the first aspect, some embodiments of the present application provide a method for detecting human eye gaze areas, which method is applied to head-mounted augmented reality devices. Wherein, the head-mounted augmented reality device includes multiple light sources, and the shape of at least one light source is different from the shapes of other light sources. The method includes: acquiring a human eye image, which is collected from the eye area of a user wearing a head-mounted display device, and the human eye image contains at least two bright spots; based on the human eye image, determining the shape information of the bright spots; Based on the shape information of the bright spot, the correspondence between the bright spot and the light source is determined; based on the correspondence between the bright spot and the light source, the human eye gaze area is determined.
第二方面,本申请一些实施例还提供一种人眼注视区域的检测装置,该装置应用于头戴增强现实设备。其中,头戴增强现实设备包括多个光源,至少一个光源的形状和其他光源的形状不相同。该装置包括:图像获取模块、第一确定模块、第二确定模块和第三确定模块。其中,图像获取模块用于获取人眼图像,人眼图像是对佩戴头戴显示装置的用户的眼睛区域采集得到的,人眼图像包含至少两个亮斑。第一确定模块用于基于人眼图像,确定亮斑的形状信息。第二确定模块用于基于亮斑的形状信息,确定亮斑与光源之间的对应关系。第三确定模块用于基于亮斑与光源之间的对应关系,确定人眼注视区域。In the second aspect, some embodiments of the present application also provide a device for detecting the human eye gaze area, which device is applied to a head-mounted augmented reality device. Wherein, the head-mounted augmented reality device includes multiple light sources, and the shape of at least one light source is different from the shapes of other light sources. The device includes: an image acquisition module, a first determination module, a second determination module and a third determination module. The image acquisition module is used to acquire a human eye image. The human eye image is collected from the eye area of a user wearing the head-mounted display device, and the human eye image contains at least two bright spots. The first determination module is used to determine the shape information of the bright spot based on the human eye image. The second determination module is used to determine the correspondence between the bright spot and the light source based on the shape information of the bright spot. The third determination module is used to determine the human eye gaze area based on the correspondence between the bright spot and the light source.
第三方面,本申请一些实施例还提供一种头戴增强现实设备。该头戴增强现实设备包括:多个光源、一个或多个处理器、存储器以及一个或多个应用程序。其中,至少一个光源的形状和其他光源的形状不相同,一个或多个应用程序被存储在存储器中并被配置为由一个或多个处理器执行,一个或多个程序配置用于执行上述的人眼注视区域的检测方法。In a third aspect, some embodiments of the present application also provide a head-mounted augmented reality device. The head-mounted augmented reality device includes: multiple light sources, one or more processors, memory, and one or more applications. Wherein, the shape of at least one light source is different from the shape of other light sources, one or more application programs are stored in the memory and configured to be executed by one or more processors, and the one or more programs are configured to execute the above Detection method of human eye gaze area.
第四方面,本申请实施例还提供一种计算机可读存储介质,计算机可读存储介质存储有计算机程序指令。其中,计算机程序指令可被处理器调用执行上述的人眼注视区域的检测方法。In a fourth aspect, embodiments of the present application further provide a computer-readable storage medium that stores computer program instructions. Wherein, the computer program instructions can be called by the processor to execute the above-mentioned detection method of the human eye gaze area.
第五方面,本申请实施例还提供一种计算机程序产品,该计算机程序产品被执行时,实现上述的人眼注视区域的检测方法。In a fifth aspect, embodiments of the present application further provide a computer program product, which, when executed, implements the above-mentioned detection method of the human eye gaze area.
本申请提供了一种人眼注视区域的检测方法、装置及头戴增强现实设备。本申请中的检测方法应用于包括多个光源的头戴增强现实设备,在多个光源中至少一个光源的形状和其他光源的形状不相同,因此,多个光源照射在用户眼睛区域所形成亮斑的形状也不相同。本申请中的检测方法通过确定出亮斑的形状信息,即使在人眼图像中亮斑缺失的情况下,头戴增强现实设备基于光源的形状信息,能够快速且准确地确定出亮斑和光源之间的对应关系,进而在后续过程中,在确定用户的人眼注视区域时,正确的亮斑和光源的对应关系可以保证人眼注视区域确定的准确性。This application provides a method and device for detecting the human eye gaze area and a head-mounted augmented reality device. The detection method in this application is applied to a head-mounted augmented reality device including multiple light sources. The shape of at least one light source among the multiple light sources is different from the shape of other light sources. Therefore, the multiple light sources illuminate the user's eye area to form a bright The shape of the spots is also different. The detection method in this application determines the shape information of the bright spot. Even when the bright spot is missing in the human eye image, the head-mounted augmented reality device can quickly and accurately determine the bright spot and the light source based on the shape information of the light source. The corresponding relationship between them, and then in the subsequent process, when determining the user's human eye gaze area, the correct correspondence between the bright spot and the light source can ensure the accuracy of determining the human eye gaze area.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.
图1示出了本申请实施例提供的一种人眼注视区域的检测方法的实施环境示意图。Figure 1 shows a schematic diagram of the implementation environment of a method for detecting human eye gaze areas provided by an embodiment of the present application.
图2示出了本申请实施例提供的一种光源的示意图。Figure 2 shows a schematic diagram of a light source provided by an embodiment of the present application.
图3示出了本申请第一实施例提供的一种人眼注视区域的检测方法的流程示意图。FIG. 3 shows a schematic flowchart of a method for detecting a human eye gaze area provided by the first embodiment of the present application.
图4示出了本申请第二实施例提供的一种人眼注视区域的检测方法的流程示意图。FIG. 4 shows a schematic flowchart of a method for detecting a human eye gaze area provided by the second embodiment of the present application.
图5示出了本申请实施例提供的一种人眼图像和亮斑标记图像的示意图。Figure 5 shows a schematic diagram of a human eye image and a bright spot mark image provided by an embodiment of the present application.
图6示出了本申请第三实施例提供的一种人眼注视区域的检测方法的流程示意图。FIG. 6 shows a schematic flowchart of a method for detecting human eye gaze areas provided by the third embodiment of the present application.
图7示出了本申请实施例提供的一种人眼注视区域的检测装置的模块框图。Figure 7 shows a module block diagram of a device for detecting a human eye gaze area provided by an embodiment of the present application.
图8示出了本申请实施例提供的头戴增强现实设备的模块框图。Figure 8 shows a module block diagram of a head-mounted augmented reality device provided by an embodiment of the present application.
图9示出了本申请实施例提供的计算机可读存储介质的模块框图。Figure 9 shows a module block diagram of a computer-readable storage medium provided by an embodiment of the present application.
具体实施方式Detailed ways
下面详细描述本申请的实施方式,实施方式的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施方式是示例性地,仅用于解释本申请,而不能理解为对本申请的限制。The embodiments of the present application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and cannot be understood as limiting the present application.
为了使本技术领域的人员更好地理解本申请的方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整的描述。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to enable those in the technical field to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the scope of protection of this application.
本申请提供了一种人眼注视区域的检测方法、装置及头戴增强现实设备。本申请中的检测方法应用于包括多个光源的头戴增强现实设备,在多个光源中至少一个光源的形状和其他光源的形状不相同,因此,多个光源照射在用户眼睛区域所形成亮斑的形状也不相同。本申请中的检测方法通过确定出亮斑的形状信息,即使在人眼图像中亮斑缺失的情况下,头戴增强现实设备基于光源的形状信息,能够快速且准确地确定出亮斑和光源之间的对应关系,进而在后续过程中,在确定用户的人眼注视区域时,正确的亮斑和光源的对应关系可以保证人眼注视区域确定的准确性。This application provides a method and device for detecting the human eye gaze area and a head-mounted augmented reality device. The detection method in this application is applied to a head-mounted augmented reality device including multiple light sources. The shape of at least one light source among the multiple light sources is different from the shape of other light sources. Therefore, the multiple light sources illuminate the user's eye area to form a bright The shape of the spots is also different. The detection method in this application determines the shape information of the bright spot. Even when the bright spot is missing in the human eye image, the head-mounted augmented reality device can quickly and accurately determine the bright spot and the light source based on the shape information of the light source. The corresponding relationship between them, and then in the subsequent process, when determining the user's human eye gaze area, the correct correspondence between the bright spot and the light source can ensure the accuracy of determining the human eye gaze area.
为了便于详细说明本申请方案,下面先结合附图对本申请实施例中的实施环境进行介绍。请参阅图1,图1是本申请实施例提供的实施环境的示意图。该实施环境包括头戴增强现实设备100,头戴增强现实设备100可以是增强现实眼镜、增强现实头盔等等。In order to facilitate a detailed description of the solution of the present application, the implementation environment in the embodiment of the present application will be introduced below with reference to the accompanying drawings. Please refer to Figure 1, which is a schematic diagram of an implementation environment provided by an embodiment of the present application. The implementation environment includes a head-mounted augmented reality device 100. The head-mounted augmented reality device 100 may be augmented reality glasses, an augmented reality helmet, or the like.
头戴增强现实设备100是指能够提供增强现实(Augmented Reality,AR)技术的设备,AR技术是将真实世界信息和虚拟世界信息集成的新技术,用户可以基于头戴增强现实设备100在虚拟世界和现实世界相结合的环境下进行娱乐、学习。在本申请实施例中,头戴增强现实设备100可以实现眼动交互,也即头戴增强现实设备100可以在用户眼睛所注视的区域渲染虚拟画面。The head-mounted augmented reality device 100 refers to a device that can provide augmented reality (Augmented Reality, AR) technology. AR technology is a new technology that integrates real world information and virtual world information. Users can travel in the virtual world based on the head-mounted augmented reality device 100 Entertainment and learning in an environment that is integrated with the real world. In this embodiment of the present application, the head-mounted augmented reality device 100 can implement eye movement interaction, that is, the head-mounted augmented reality device 100 can render virtual images in the area where the user's eyes are looking.
在本申请实施例中,头戴增强现实设备100包括本体10、多个光源30和图像采集装置50。多个光源30均匀分布于本体10的指定表面,“指定表面”可以是头戴增强现实设备100处于佩戴状态下本体10朝向用户一侧的表面。在本申请实施例中,多个光源30中至少一个光源30的形状和其他光源30的形状不相同,其中,“光源30的形状”应当理解为光源30上的发光区域形状。具体地,光源30的形状可以是圆形、矩形、十字形等区别度高的形状,以使得光源30对应的亮斑能够受到图像采集装置50所带来的较小的畸变影响,使得头戴增强现实设备100后续能够顺利识别出人眼图像中亮斑的形状信息。In the embodiment of the present application, the head-mounted augmented reality device 100 includes a body 10 , a plurality of light sources 30 and an image collection device 50 . The plurality of light sources 30 are evenly distributed on the designated surface of the body 10. The "designated surface" may be the surface of the body 10 facing the user when the head-mounted augmented reality device 100 is in the wearing state. In the embodiment of the present application, the shape of at least one light source 30 among the plurality of light sources 30 is different from the shape of other light sources 30 , where the “shape of the light source 30 ” should be understood as the shape of the light emitting area on the light source 30 . Specifically, the shape of the light source 30 can be a highly distinctive shape such as a circle, a rectangle, a cross, etc., so that the bright spot corresponding to the light source 30 can be affected by smaller distortion caused by the image acquisition device 50, making the head-mounted The augmented reality device 100 can subsequently successfully identify the shape information of bright spots in the human eye image.
请参阅图2,图2示出了一种光源30的示意图,在图2中,本体10包括第一镜框101和第二镜框103。其中,每个镜框上都设置有六个光源30,六个光源30中两两形状相同。这里需要说明的是,每个光源30对应有唯一编号,编号可以由相关人员预先设定。例如,两个圆形光源分别为1号光源和4号光源、两个纵向矩形形状的光源分别为2号光源和3号光源、两个横向矩形形状的光源分别为5号光源和6号光源,本申请实施例对光源30的形状、编号、数量等不作具体限定。Please refer to FIG. 2 , which shows a schematic diagram of a light source 30 . In FIG. 2 , the body 10 includes a first mirror frame 101 and a second mirror frame 103 . Each frame is provided with six light sources 30 , and two of the six light sources 30 have the same shape. It should be noted here that each light source 30 corresponds to a unique number, and the number can be preset by relevant personnel. For example, the two circular light sources are light source No. 1 and light source No. 4, the two longitudinal rectangular light sources are light source No. 2 and light source 3, and the two horizontal rectangular light sources are light source No. 5 and light source 6. , the embodiment of the present application does not specifically limit the shape, number, quantity, etc. of the light sources 30 .
图像采集装置50同样设置于本体10的指定表面,用于采集用户的人眼图像。具体地,当上述光源30处于发光状态时,用户的眼睛区域会形成光源30对应的亮斑,由于本申请中多个光源30的形状不相同,因此照射在用户眼睛区域所形成亮斑的形状也不相同。因此,通过图像采集装置50采集用户的人眼图像后,进而确定人眼图像中的亮斑的形状信息,即使在亮斑缺失的情况下,基于光源30的形状信息也能够准确确定光源亮斑的对应关系,上述对应关系可用于后续确定用户的人眼注视区域。The image capture device 50 is also disposed on a designated surface of the body 10 for capturing images of the user's eyes. Specifically, when the above-mentioned light source 30 is in a light-emitting state, the user's eye area will form a bright spot corresponding to the light source 30. Since the shapes of the multiple light sources 30 in this application are different, the shape of the bright spot formed when the light source 30 is illuminated in the user's eye area is Not the same either. Therefore, after the user's human eye image is collected by the image acquisition device 50, the shape information of the bright spot in the human eye image is then determined. Even in the case where the bright spot is missing, the light source bright spot can be accurately determined based on the shape information of the light source 30. The above correspondence relationship can be used to subsequently determine the user's human eye gaze area.
在本申请实施例中,图像采集装置50的类型是和光源30的类型相对应的。在一些实施例中,光源30可以是红外光源,则图像采集装置50为红外摄像头。在另一些实施例中,光源30可以是可见光源,则图像采集装置50为数字摄像头。在一些实施例中,图像采集装置50的数量可以为两个,分别设置于第一镜框101和第二镜框103,用于分别采集用户的左眼图像和右眼图像,本申请实施例对图像采集装置50的类型、型号、数量等不作具体限定。In the embodiment of the present application, the type of the image acquisition device 50 corresponds to the type of the light source 30 . In some embodiments, the light source 30 may be an infrared light source, and the image acquisition device 50 is an infrared camera. In other embodiments, the light source 30 may be a visible light source, and the image acquisition device 50 is a digital camera. In some embodiments, the number of image acquisition devices 50 may be two, which are respectively provided in the first frame 101 and the second frame 103 and are used to collect the left eye image and the right eye image of the user respectively. In the embodiment of the present application, the image The type, model, quantity, etc. of the collection device 50 are not specifically limited.
在本申请实施例中,头戴增强现实设备100采集到人眼图像后,基于预先训练的分类模型确定出人眼图像中亮斑的形状信息,进而根据光源30的形状信息,通过贝叶斯模型能够准确确定出亮斑和光源30之间的对应关系。In the embodiment of the present application, after the head-mounted augmented reality device 100 collects the human eye image, it determines the shape information of the bright spots in the human eye image based on the pre-trained classification model, and then based on the shape information of the light source 30, through Bayesian The model can accurately determine the corresponding relationship between the bright spot and the light source 30 .
上述预先训练的分类模型和贝叶斯模型可以存储在头戴增强现实设备100中,以提高计算速度,进而提高光源亮斑对应关系的确定效率。上述两个模型也可以设置在服务器中,头戴增强现实设备100处于工作状态下与服务器进行在线交互,以获取预先训练的分类模型和贝叶斯模型的输出结果,通过上述方式,可以减小头戴增强现实设备100的计算量,节省头戴增强现实设备100的功耗。在本申请实施例中,仅以预先训练的分类模型和贝叶斯模型设置在头戴增强现实设备100中为例进行说明。The above-mentioned pre-trained classification model and Bayesian model can be stored in the head-mounted augmented reality device 100 to increase the calculation speed and thereby improve the efficiency of determining the correspondence between light source bright spots. The above two models can also be set in the server, and the head-mounted augmented reality device 100 interacts with the server online while in working condition to obtain the output results of the pre-trained classification model and Bayesian model. In the above manner, the The calculation amount of the head-mounted augmented reality device 100 saves the power consumption of the head-mounted augmented reality device 100 . In the embodiment of the present application, only the pre-trained classification model and the Bayesian model are installed in the head-mounted augmented reality device 100 as an example for description.
在一些实施例中,头戴增强现实设备100还包括渲染模块、传感器组件。上述渲染模块用于渲染图像。在一些实施例中,渲染模块用于渲染注视区域内的图像。传感器组件用于监测头戴增强现实设备100的运动信息、状态信息等等,传感器组件可以包括加速度传感器、距离传感器、压力传感器等等,本申请实施例对此不作限定。In some embodiments, the head-mounted augmented reality device 100 further includes a rendering module and a sensor component. The above rendering module is used to render images. In some embodiments, the rendering module is used to render images within the gaze area. The sensor component is used to monitor motion information, status information, etc. of the head-mounted augmented reality device 100. The sensor component may include an acceleration sensor, a distance sensor, a pressure sensor, etc., which are not limited in the embodiments of the present application.
请参阅图3,图3示意性地示出了本申请第一实施例提供的一种人眼注视区域的检测方法,该方法应用于图1中的头戴增强现实设备,其中,头戴增强现实设备包括多个光源,至少一个光源的形状和其他光源的形状不相同。具体地,该方法包括步骤S310至步骤S340。Please refer to Figure 3. Figure 3 schematically illustrates a method for detecting human eye gaze areas provided by the first embodiment of the present application. This method is applied to the head-mounted augmented reality device in Figure 1, wherein the head-mounted augmented reality device Realistic devices include multiple light sources, at least one of which has a different shape than the other light sources. Specifically, the method includes steps S310 to S340.
步骤S310,获取人眼图像。Step S310: Obtain human eye image.
人眼图像是对佩戴头戴显示装置的用户的眼睛区域采集得到的,人眼图像包含至少两个亮斑。在多个光源处于发光状态时,通过照射用户的眼睛区域,以在眼睛上形成光源对应的亮斑,此时佩戴头戴显示装置对用户的眼睛区域进行图像采集得到的人眼图像中也包括上述亮斑。The human eye image is collected from the eye area of the user wearing the head-mounted display device, and the human eye image contains at least two bright spots. When multiple light sources are in the emitting state, the user's eye area is irradiated to form bright spots corresponding to the light sources on the eye. At this time, the human eye image obtained by wearing the head-mounted display device to collect images of the user's eye area also includes The aforementioned bright spots.
在一些实施例中,头戴增强现实设备在检测到头戴增强现实设备处于佩戴完成的情况下,通过图像采集装置采集上述人眼图像。可选地,头戴增强现实设备上设置有佩戴检测装置,通过佩戴检测装置检测头戴增强现实设备是否处于佩戴状态。In some embodiments, when the head-mounted augmented reality device detects that the wearing of the head-mounted augmented reality device is completed, the above-mentioned human eye image is collected through the image acquisition device. Optionally, a wearing detection device is provided on the head-mounted augmented reality device, and the wearing detection device detects whether the head-mounted augmented reality device is in a wearing state.
上述佩戴检测装置可以是压力传感器,其设置在用户佩戴头戴增强现实设备的情况下头戴增强现实设备与人体接触的位置处。以头戴增强现实设备为增强现实眼镜为例,上述压力传感器设置在增强现实眼镜与鼻梁接触的位置处,也可以设置在增强现实眼镜的镜腿末端。当压力传感器检测到的压力值大于预设压力数值时,说明用户已完成对头戴增强现实设备的佩戴。The above-mentioned wearing detection device may be a pressure sensor, which is arranged at a position where the head-mounted augmented reality device contacts the human body when the user wears the head-mounted augmented reality device. Taking the head-mounted augmented reality device as augmented reality glasses as an example, the above pressure sensor is arranged at a position where the augmented reality glasses are in contact with the bridge of the nose, or can also be arranged at the end of the temple of the augmented reality glasses. When the pressure value detected by the pressure sensor is greater than the preset pressure value, it means that the user has completed wearing the head-mounted augmented reality device.
上述佩戴检测装置也可以是距离传感器,由于用户在佩戴头戴增强现实设备后其与头戴增强现实设备上的各点的距离保持不变,因此可以通过距离传感器来检测用户是否完成头戴增强现实设备的佩戴,同样以头戴增强现实设备为增强现实眼镜为例,上述距离传感器可以设置在指定表面(也即,用户佩戴头戴增强现实设备的前提下,头戴增强现实设备朝向用户一侧的表面),当距离传感器检测到的距离值属于预设距离范围时,说明用户已完成对头戴增强现实设备的佩戴。The above-mentioned wearing detection device can also be a distance sensor. Since the distance between the user and each point on the head-mounted augmented reality device remains unchanged after wearing the head-mounted augmented reality device, the distance sensor can be used to detect whether the user has completed the head-mounted augmentation. When wearing a reality device, take the head-mounted augmented reality device as augmented reality glasses as an example. The above distance sensor can be set on a designated surface (that is, under the premise that the user wears the head-mounted augmented reality device, the head-mounted augmented reality device faces the user. side surface), when the distance value detected by the distance sensor falls within the preset distance range, it means that the user has completed wearing the head-mounted augmented reality device.
在另一些实施例中,头戴增强现实设备在接收到工作指令后通过图像采集装置采集人眼图像。可选地,头戴增强现实设备上设置有启动按钮,头戴增强现实设备在接收到针对启动按钮的按压操作信号,则接收到工作指令。可选地,用于控制头戴增强现实设备的外部设备的显示界面上包括头戴增强现实设备的工作控件,外部设备接收到针对上述工作控件的触发信号后,向头戴增强现实设备发送工作指令。上述外部设备可以是诸如智能手机、平板电脑的终端设备。In other embodiments, the head-mounted augmented reality device collects human eye images through the image acquisition device after receiving the work instruction. Optionally, a start button is provided on the head-mounted augmented reality device. When the head-mounted augmented reality device receives a pressing operation signal for the start button, it receives the work instruction. Optionally, the display interface of the external device used to control the head-mounted augmented reality device includes working controls of the head-mounted augmented reality device. After receiving the trigger signal for the above-mentioned working controls, the external device sends the working controls to the head-mounted augmented reality device. instruction. The above-mentioned external device may be a terminal device such as a smartphone or a tablet computer.
需要说明的是,为了确保采集到的人眼图像包括头戴增强现实设备中指定表面的多个光源分别对应的亮斑,上述多个光源需要处于发光状态,因此头戴增强现实设备在采集人眼图像前,先检测上述多个光源是否处于发光状态,若未处于发光状态,则控制上述多个光源切换至发光状态。可选地,头戴增强现实设备在获取到人眼图像后,控制上述多个光源切换至熄灭状态,以避免光源长亮造成人眼不适。It should be noted that in order to ensure that the collected human eye images include bright spots corresponding to multiple light sources on the designated surface of the head-mounted augmented reality device, the above-mentioned multiple light sources need to be in a light-emitting state. Before displaying the eye image, it is first detected whether the plurality of light sources are in the light-emitting state. If not, the plurality of light sources are controlled to switch to the light-emitting state. Optionally, after acquiring the human eye image, the head-mounted augmented reality device controls the above-mentioned multiple light sources to switch to an extinguished state to avoid discomfort to the human eyes caused by the light source being permanently on.
步骤S320,基于人眼图像,确定亮斑的形状信息。Step S320: Determine the shape information of the bright spot based on the human eye image.
由于本申请中光源的形状存在差异,因此,在用户的眼睛区域形成的亮斑的形状也存在差异。例如,圆形的光源对应形成圆形的亮斑,矩形的光源对应形成矩形的亮斑。因此,在本申请中,通过确定人眼图像中亮斑的形状信息,为后续确定亮斑和光源之间的对应关系提供了确定依据。具体地,确定亮斑的形状信息的具体实现方式在下文实施例中进行详细阐述。Since there are differences in the shapes of the light sources in this application, there are also differences in the shapes of the bright spots formed in the user's eye area. For example, a circular light source corresponds to a circular bright spot, and a rectangular light source corresponds to a rectangular bright spot. Therefore, in this application, by determining the shape information of the bright spots in the human eye image, a basis is provided for subsequent determination of the correspondence between the bright spots and the light source. Specifically, the specific implementation manner of determining the shape information of the bright spot will be described in detail in the embodiments below.
步骤S330,基于亮斑的形状信息,确定亮斑与光源之间的对应关系。Step S330: Based on the shape information of the bright spot, determine the corresponding relationship between the bright spot and the light source.
亮斑与光源相对应,其表征在光源处于发光状态时,其经过人眼反射所形成的亮斑。在一些实施例中,某个形状的光源(例如,圆形光源)仅设置有一个,当确定出某个亮斑的形状信息为圆形的情况下,即可确定该圆形亮斑与圆形光源之间的对应关系。The bright spot corresponds to the light source, which represents the bright spot formed by the reflection of the human eye when the light source is in the emitting state. In some embodiments, there is only one light source of a certain shape (for example, a circular light source). When it is determined that the shape information of a certain bright spot is circular, it can be determined that the circular bright spot is the same as the circular light source. Correspondence between shaped light sources.
在另一些实施例中,某个形状的光源(例如,圆形光源)设置有多个,请再次参阅图2,图2中的圆形光源设置有两个,分别为1号光源和4号光源,当确定出某个亮斑的形状信息为圆形的情况下,即可确定该圆形亮斑与圆形光源之间的多个可能的映射关系,也即,该圆形亮斑可能对应于1号圆形光源,也可能对应于4号圆形光源。In other embodiments, there are multiple light sources of a certain shape (for example, circular light sources). Please refer to Figure 2 again. There are two circular light sources in Figure 2, namely light source No. 1 and light source No. 4. light source, when it is determined that the shape information of a certain bright spot is circular, multiple possible mapping relationships between the circular bright spot and the circular light source can be determined, that is, the circular bright spot may Corresponds to circular light source No. 1, and may also correspond to circular light source No. 4.
为了进一步地从多个可能的映射关系中,确定出亮斑与光源之间的唯一对应关系。在本申请中,人眼图像中的包含至少两个亮斑,头戴增强现实设备基于至少两个亮斑的形状信息和位置信息,确定亮斑与光源之间的对应关系。亮斑的位置信息表征亮斑在人眼图像中的位置,也即,亮斑对应的像素坐标,以像素坐标对应的坐标值为平面直角坐标系为例,则亮斑对应的像素坐标可以记为(x,y)。以人眼图像为右眼图像为例,该右眼图像中的包含两个亮斑,分别为1号圆形亮斑和2号圆形亮斑。其中,1号圆形亮斑的像素坐标为(x1,y1),2号圆形亮斑的像素坐标为(x2,y2),头戴增强现实设备基于两个亮斑的位置信息可以确定亮斑之间的相对位置关系,例如,在横坐标值x1小于横坐标值x2的情况下,可以确定1号圆形亮斑在2号圆形亮斑的左侧。具体地,确定亮斑的位置信息的具体实现方式在下文实施例中进行详细阐述。In order to further determine the unique corresponding relationship between the bright spot and the light source from multiple possible mapping relationships. In this application, the human eye image contains at least two bright spots, and the head-mounted augmented reality device determines the correspondence between the bright spots and the light source based on the shape information and position information of the at least two bright spots. The position information of the bright spot represents the position of the bright spot in the human eye image, that is, the pixel coordinates corresponding to the bright spot. Taking the coordinate value corresponding to the pixel coordinate as a plane rectangular coordinate system as an example, the pixel coordinates corresponding to the bright spot can be recorded is (x, y). Taking the human eye image as a right eye image as an example, the right eye image contains two bright spots, namely circular bright spot No. 1 and circular bright spot No. 2. Among them, the pixel coordinates of the circular bright spot No. 1 are (x1, y1), and the pixel coordinates of the circular bright spot No. 2 are (x2, y2). The head-mounted augmented reality device can determine the bright spots based on the position information of the two bright spots. The relative positional relationship between spots, for example, when the abscissa value x1 is less than the abscissa value x2, it can be determined that the circular bright spot No. 1 is to the left of the circular bright spot No. 2. Specifically, the specific implementation manner of determining the position information of the bright spot will be described in detail in the embodiments below.
在一些实施例中,头戴增强现实设备基于亮斑之间的相对位置关系和预设的贝叶斯模型确定亮斑与光源之间的对应关系。贝叶斯模型是一种概率模型,其预先存储有多个事件发生的概率。在本实施例中,“事件发生的概率”是指亮斑和光源相对应的概率。科研人员通过预先获取多张右眼图像,并且对右眼图像中的每个亮斑进行标注对应的光源编号,进而基于标注结果,可以得到亮斑和光源相对应的概率。示例性地,位于图像左侧的圆形亮斑对应于1号圆形光源的概率为95%,对应于4号圆形光源的概率为5%。上述概率可以通过概率矩阵的形式存储在贝叶斯模型中,头戴增强现实设备在确定右眼图像中存在两个圆形亮斑的情况下,通过查找上述概率矩阵可以确定:位于图像左侧的1号圆形亮斑对应于1号圆形光源,2号圆形亮斑对应于4号圆形光源。In some embodiments, the head-mounted augmented reality device determines the corresponding relationship between the bright spots and the light source based on the relative positional relationship between the bright spots and a preset Bayesian model. The Bayesian model is a probabilistic model that stores the probabilities of multiple events in advance. In this embodiment, the "probability of event occurrence" refers to the probability of a bright spot corresponding to a light source. Researchers obtain multiple right-eye images in advance and label each bright spot in the right-eye image with the corresponding light source number. Based on the labeling results, the probability of the bright spot corresponding to the light source can be obtained. For example, the probability that the circular bright spot located on the left side of the image corresponds to the circular light source No. 1 is 95%, and the probability that it corresponds to the circular light source No. 4 is 5%. The above probability can be stored in the Bayesian model in the form of a probability matrix. When the head-mounted augmented reality device determines that there are two circular bright spots in the right eye image, it can be determined by looking up the above probability matrix: located on the left side of the image The No. 1 circular bright spot corresponds to the No. 1 circular light source, and the No. 2 circular bright spot corresponds to the No. 4 circular light source.
在另一些实施例中,头戴增强现实设备基于亮斑之间的相对位置关系和光源的位置信息确定亮斑与光源之间的对应关系。光源的位置信息表征多个光源在本体上位置,例如,在图2中,和4号圆形光源相比,1号圆形光源更靠近本体中央的位置(也即,在头戴增强现实设备处于佩戴状态时,1号圆形光源更靠近用户鼻梁的位置),因此,在右眼图像中,1号圆形光源对应的亮斑位于4号圆形光源对应的亮斑的左侧,也即,头戴增强现实设备基于上述位置信息,可以确定1号圆形亮斑对应于1号圆形光源,2号圆形亮斑对应于4号圆形光源。In other embodiments, the head-mounted augmented reality device determines the corresponding relationship between the bright spots and the light source based on the relative positional relationship between the bright spots and the position information of the light source. The position information of the light source represents the position of multiple light sources on the body. For example, in Figure 2, compared with the circular light source No. 4, the circular light source No. 1 is closer to the center of the body (that is, in the head-mounted augmented reality device When in the wearing state, the circular light source No. 1 is closer to the bridge of the user's nose). Therefore, in the right eye image, the bright spot corresponding to the circular light source No. 1 is located to the left of the bright spot corresponding to the circular light source No. 4, also That is, based on the above position information, the head-mounted augmented reality device can determine that the circular bright spot No. 1 corresponds to the circular light source No. 1, and the circular bright spot No. 2 corresponds to the circular light source No. 4.
本申请通过设置多个形状不同的光源,可以限制光源的搜索范围,也即,头戴增强现实设备基于亮斑的形状信息,只需搜索与亮斑形状相同的光源,进而加快了亮斑与光源之间的对应关系的确定速度。This application can limit the search range of light sources by setting up multiple light sources with different shapes. That is, the head-mounted augmented reality device only needs to search for light sources with the same shape as the bright spots based on the shape information of the bright spots, thereby speeding up the process of bright spots and bright spots. The speed of determination of correspondence between light sources.
步骤S340,基于亮斑与光源之间的对应关系,确定人眼注视区域。Step S340: Determine the human eye's gaze area based on the correspondence between the bright spot and the light source.
头戴增强现实设备确定人眼注视区域的具体实现方式在下文实施例中进行详细阐述。The specific implementation of the head-mounted augmented reality device to determine the human eye gaze area will be described in detail in the embodiments below.
本申请提供了一种人眼注视区域的检测方法。本申请中的检测方法应用于包括多个光源的头戴增强现实设备,在多个光源中至少一个光源的形状和其他光源的形状不相同,因此,多个光源照射在用户眼睛区域所形成亮斑的形状也不相同。本申请中的检测方法通过确定出亮斑的形状信息,即使在人眼图像中亮斑缺失的情况下,头戴增强现实设备基于光源的形状信息,能够快速且准确地确定出亮斑和光源之间的对应关系,进而在后续过程中,在确定用户的人眼注视区域时,正确的亮斑和光源的对应关系可以保证人眼注视区域确定的准确性。This application provides a method for detecting human eye gaze areas. The detection method in this application is applied to a head-mounted augmented reality device including multiple light sources. The shape of at least one light source among the multiple light sources is different from the shape of other light sources. Therefore, the multiple light sources illuminate the user's eye area to form a bright The shape of the spots is also different. The detection method in this application determines the shape information of the bright spot. Even when the bright spot is missing in the human eye image, the head-mounted augmented reality device can quickly and accurately determine the bright spot and the light source based on the shape information of the light source. The corresponding relationship between them, and then in the subsequent process, when determining the user's human eye gaze area, the correct correspondence between the bright spot and the light source can ensure the accuracy of determining the human eye gaze area.
请参阅图4,图4示意性地示出了本申请第二实施例提供的一种人眼注视区域的检测方法,在本方法中,详细介绍了亮斑的位置信息和形状信息的确定过程,具体地,本方法可以包括步骤S410至步骤S460。Please refer to Figure 4. Figure 4 schematically shows a method for detecting the human eye gaze area provided by the second embodiment of the present application. In this method, the determination process of the position information and shape information of the bright spot is introduced in detail. , specifically, this method may include step S410 to step S460.
步骤S410,获取人眼图像。Step S410: Obtain human eye image.
步骤S410的实施方式可以参考步骤S310中的详细介绍,在此不再一一赘述。For the implementation of step S410, reference may be made to the detailed introduction in step S310, which will not be described again here.
步骤S420,基于人眼图像,确定亮斑的位置信息。Step S420: Determine the location information of the bright spot based on the human eye image.
亮斑的位置信息表征亮斑在人眼图像中的位置,也即,亮斑在人眼图像中对应的像素坐标。由于亮斑区域是由光源照射形成的区域,因此,亮斑区域的像素值会大于非亮斑区域的像素值。The position information of the bright spot represents the position of the bright spot in the human eye image, that is, the corresponding pixel coordinates of the bright spot in the human eye image. Since the bright spot area is an area formed by the light source, the pixel value of the bright spot area will be greater than the pixel value of the non-bright spot area.
在一些实施例中,在头戴增强现实设备中设置有二值化算法,通过二值化算法能够分离人眼图像中的亮斑区域和非亮斑区域。具体地,在二值化算法中设置有第一指定阈值,二值化算法将大于或等于第一指定阈值的像素值置为1,将小于第一指定阈值的像素值置为0,多个像素值为1的像素区域即为亮斑区域。其中,第一指定阈值是基于亮斑区域的像素值的确定的。头戴增强现实设备在确定出亮斑区域的情况下,进而获取亮斑区域对应的像素坐标,也即亮斑的位置信息。In some embodiments, a binarization algorithm is provided in the head-mounted augmented reality device, and the binarization algorithm can separate the bright spot areas and non-bright spot areas in the human eye image. Specifically, a first specified threshold is set in the binarization algorithm. The binarization algorithm sets pixel values greater than or equal to the first specified threshold to 1, and sets pixel values smaller than the first specified threshold to 0. Multiple The pixel area with a pixel value of 1 is the bright spot area. Wherein, the first specified threshold is determined based on the pixel value of the bright spot area. After determining the bright spot area, the head-mounted augmented reality device then obtains the pixel coordinates corresponding to the bright spot area, that is, the location information of the bright spot.
在另一些实施例中,亮斑的位置信息是对人眼图像进行卷积操作确定的。由于在人眼图像中存在至少两个亮斑,因此本申请中通过至少两轮确定过程对亮斑的位置信息进行确定,也即,在每一轮的确定过程中,确定出一个亮斑的位置信息。具体地,至少两轮确定过程中的第i轮确定过程包括步骤A100至步骤A200,i为正整数。In other embodiments, the position information of the bright spot is determined by performing a convolution operation on the human eye image. Since there are at least two bright spots in the human eye image, the location information of the bright spot is determined through at least two rounds of determination processes in this application. That is, in each round of determination process, the position information of a bright spot is determined. location information. Specifically, the i-th round of determination process among at least two rounds of determination processes includes step A100 to step A200, and i is a positive integer.
步骤A100,基于预设的卷积核对指定图像进行卷积操作,得到中间图像。Step A100: Perform a convolution operation on the specified image based on a preset convolution kernel to obtain an intermediate image.
在本申请实施例中,预设的卷积核的尺寸大小根据人眼图像中亮斑的尺寸大小进行默认设置的,科研人员预先拍摄多张人眼图像,并确定出亮斑的尺寸大小,例如,亮斑的尺寸大小为9*8,8*10等等,则预设的卷积核的大小则可以是9*9、10*10等等,卷积核的形状可以是圆形、方形、以及其他形状,本申请对卷积核的尺寸大小和形状不作限定。In the embodiment of this application, the size of the preset convolution kernel is set by default according to the size of the bright spot in the human eye image. The researchers take multiple human eye images in advance and determine the size of the bright spot. For example, if the size of the bright spot is 9*8, 8*10, etc., then the size of the preset convolution kernel can be 9*9, 10*10, etc., and the shape of the convolution kernel can be round, Square, and other shapes, this application does not limit the size and shape of the convolution kernel.
头戴增强现实设备通过获取预先存储的卷积核对指定图像进行卷积操作,得到中间图像。The head-mounted augmented reality device performs a convolution operation on the specified image by obtaining the pre-stored convolution kernel to obtain an intermediate image.
下面对指定图像进行说明。The following explains the specified image.
在i为1的情况下,指定图像为人眼图像。也即,在第1轮的确定过程中,头戴增强现实设备基于预设的卷积核对人眼图像进行卷积操作,得到中间图像。When i is 1, the specified image is a human eye image. That is, in the first round of determination process, the head-mounted augmented reality device performs a convolution operation on the human eye image based on the preset convolution kernel to obtain an intermediate image.
在i大于1的情况下,指定图像通过如下方式获取:将人眼图像中的目标区域的像素值设置为指定像素值,得到指定图像,目标区域基于前i-1个亮斑的位置信息确定。When i is greater than 1, the specified image is obtained in the following way: set the pixel value of the target area in the human eye image to the specified pixel value to obtain the specified image. The target area is determined based on the position information of the first i-1 bright spots. .
在i大于1的情况下,在第i轮的确定过程中,需要消除前i-1个亮斑对第i个亮斑在位置信息确定时的影响,因此,需要对人眼图像中前i-1个亮斑所在的区域(也即,目标区域)进行处理,也即,将目标区域的像素值设置为指定像素值。When i is greater than 1, in the i-th round of determination process, it is necessary to eliminate the influence of the first i-1 bright spots on the determination of the position information of the i-th bright spot. Therefore, it is necessary to eliminate the influence of the first i-1 bright spots in the human eye image. The area where -1 bright spot is located (that is, the target area) is processed, that is, the pixel value of the target area is set to the specified pixel value.
头戴增强现实设备在确定出前i-1个亮斑中每一个亮斑所在的子区域的情况下,将子区域的并集区域确定为目标区域。具体地,前i-1个亮斑中每一个亮斑对应的子区域可以是矩形区域、圆形区域、或者其他形状的区域,该子区域的尺寸大小大于或等于亮斑的尺寸大小,该子区域的中心像素点的位置为对应亮斑的位置,也即,子区域能够覆盖亮斑。以i为3为例,由于已经确定出第1个亮斑和第2个亮斑的位置信息,在第3轮的确定过程中,分别确定出第1个亮斑和第2个亮斑对应的子区域,其中,第i个亮斑对应的子区域是基于第i个亮斑的位置信息确定的,i等于1或2,进而将子区域的并集区域确定为目标区域。After determining the sub-region where each of the first i-1 bright spots is located, the head-mounted augmented reality device determines the union area of the sub-regions as the target area. Specifically, the sub-region corresponding to each of the first i-1 bright spots can be a rectangular area, a circular area, or an area of other shapes, and the size of the sub-region is greater than or equal to the size of the bright spot, and the The position of the center pixel of the sub-region is the position corresponding to the bright spot, that is, the sub-region can cover the bright spot. Taking i as 3 as an example, since the position information of the first bright spot and the second bright spot has been determined, in the third round of determination process, the corresponding positions of the first bright spot and the second bright spot are determined respectively. sub-region, wherein the sub-region corresponding to the i-th bright spot is determined based on the position information of the i-th bright spot, i is equal to 1 or 2, and then the union area of the sub-regions is determined as the target area.
头戴增强现实设备在确定出目标区域的情况下,进而将目标区域的像素值设置为指定像素值,示例性地,指定像素值为0,也即,将目标区域对应的图像置为黑色,由于目标区域中每个子区域的尺寸大小大于或等于亮斑的尺寸大小,则前i-1个亮斑对应的图像也被置为黑色,通过上述处理,可以消除前i-1个亮斑对第i个亮斑在位置信息确定时的影响,使得第i个亮斑的位置信息更加准确。When the head-mounted augmented reality device determines the target area, it further sets the pixel value of the target area to the specified pixel value. For example, the specified pixel value is 0, that is, the image corresponding to the target area is set to black. Since the size of each sub-region in the target area is greater than or equal to the size of the bright spots, the images corresponding to the first i-1 bright spots are also set to black. Through the above processing, the first i-1 bright spot pairs can be eliminated. The influence of the i-th bright spot when the position information is determined makes the position information of the i-th bright spot more accurate.
步骤A200,将中间图像中目标像素点的位置信息确定为第i个亮斑的位置信息。Step A200: determine the position information of the target pixel point in the intermediate image as the position information of the i-th bright spot.
目标像素点的像素值为中间图像中全部像素值的最大值。具体地,头戴增强现实设备对中间图像中全部像素值进行排序处理,进而确定最大值,并将最大值对应的像素点确定为目标像素点。排序处理可以通过冒泡排序、选择排序等排序算法完成,在此不作限定。在一些实施例中,最大值对应的像素点的数量为多个,则在多个像素点中任选一个像素点确定为目标像素点。The pixel value of the target pixel is the maximum value of all pixel values in the intermediate image. Specifically, the head-mounted augmented reality device sorts all pixel values in the intermediate image, determines the maximum value, and determines the pixel corresponding to the maximum value as the target pixel. Sorting processing can be completed through sorting algorithms such as bubble sorting and selection sorting, and is not limited here. In some embodiments, the number of pixels corresponding to the maximum value is multiple, then any one pixel among the multiple pixels is determined as the target pixel.
在一些实施例中,为了确保目标像素点的位置对应为第i个亮斑的位置,头戴增强现实设备在确定出目标像素点的情况下,还需要进一步判断该目标像素点对应的像素值是否大于或等于指定像素值,指定像素值由科研人员默认设置,若目标像素点对应的像素值大于或等于指定像素值,则将目标像素点的位置信息确定为第i个亮斑的位置信息。若目标像素点对应的像素值小于指定像素值,则不再执行步骤A200,进而执行步骤S430。In some embodiments, in order to ensure that the position of the target pixel corresponds to the position of the i-th bright spot, when the head-mounted augmented reality device determines the target pixel, it also needs to further determine the pixel value corresponding to the target pixel. Whether it is greater than or equal to the specified pixel value. The specified pixel value is set by the researcher by default. If the pixel value corresponding to the target pixel is greater than or equal to the specified pixel value, the position information of the target pixel point is determined as the position information of the i-th bright spot. . If the pixel value corresponding to the target pixel point is less than the specified pixel value, step A200 is no longer performed, and step S430 is performed.
本申请实施例通过设置指定像素值,可以避免在指定图像中不存在亮斑的情况下,继续确定出亮斑位置信息的情况发生,保证了亮斑的位置信息的准确性。By setting specified pixel values, embodiments of the present application can avoid continuing to determine the position information of bright spots when there are no bright spots in the specified image, ensuring the accuracy of the position information of bright spots.
步骤S430,基于亮斑的位置信息对人眼图像中的亮斑进行标记,得到亮斑标记图像。Step S430: Mark the bright spots in the human eye image based on the position information of the bright spots to obtain a bright spot marked image.
亮斑标记图像是指仅包括一个亮斑的图像。也即,亮斑标记图像的数量和亮斑的数量相同。作为一种实施方式,头戴增强现实设备基于亮斑的位置信息,确定出人眼图像的子图像,进而将该子图像确定为亮斑标记图像。请参阅图5,图5示意性地示出了本申请实施例提供的一种人眼图像510和亮斑标记图像520的示意图。图5中,亮斑标记图像520中的亮斑521为纵向矩形形状的光源对应的亮斑。具体地,子图像的图像尺寸由研发人员默认设置,并大于亮斑的尺寸大小,子图像的中央像素点位置信息由亮斑的位置信息确定,也即,亮斑位于子图像(也即,亮斑标记图像)的中央位置。A bright spot marked image refers to an image that includes only one bright spot. That is, the number of bright spot mark images is the same as the number of bright spots. As an implementation manner, the head-mounted augmented reality device determines a sub-image of the human eye image based on the position information of the bright spot, and then determines the sub-image as a bright spot mark image. Please refer to Figure 5. Figure 5 schematically shows a schematic diagram of a human eye image 510 and a bright spot mark image 520 provided by an embodiment of the present application. In FIG. 5 , the bright spots 521 in the bright spot mark image 520 are bright spots corresponding to the vertical rectangular light source. Specifically, the image size of the sub-image is set by default by the developer and is larger than the size of the bright spot. The central pixel position information of the sub-image is determined by the position information of the bright spot, that is, the bright spot is located in the sub-image (that is, A bright spot marks the center of the image).
作为另一种实施方式,头戴增强现实设备基于亮斑的位置信息,确定出人眼图像的子图像,并将人眼图像中子图像以外的其他区域置为指定像素值,例如,指定像素值为0(也即,仅保留子图像内的亮斑,将子图像以外的其他图像区域置为黑色),最后将处理完成的人眼图像确定为亮斑标记图像。As another implementation manner, the head-mounted augmented reality device determines a sub-image of the human eye image based on the position information of the bright spot, and sets other areas in the human eye image other than the sub-image to specified pixel values, for example, specified pixels The value is 0 (that is, only the bright spots in the sub-image are retained, and other image areas outside the sub-image are set to black). Finally, the processed human eye image is determined as the bright spot mark image.
步骤S440,基于亮斑标记图像,确定亮斑的形状信息。Step S440: Determine the shape information of the bright spot based on the bright spot mark image.
在本申请实施例中,亮斑的形状信息是由分类模型确定的,头戴增强现实设备将亮斑标记图像输入预先训练好的分类模型,分类模型的输出即为亮斑的形状信息。具体地,步骤S440可以包括步骤S4410。In this embodiment of the present application, the shape information of the bright spot is determined by the classification model. The head-mounted augmented reality device inputs the bright spot mark image into the pre-trained classification model, and the output of the classification model is the shape information of the bright spot. Specifically, step S440 may include step S4410.
步骤S4410,通过分类模型对亮斑标记图像进行预测处理,得到亮斑标记图像中亮斑的形状信息。Step S4410: Predict the bright spot mark image through a classification model to obtain the shape information of the bright spot in the bright spot mark image.
分类模型是基于至少一个训练样本对初始模型进行训练得到的,至少一个训练样本包括亮斑图像,亮斑图像标注有亮斑的真实形状信息。这里需要说明的是,在本申请中提供的分类模型是基于神经网络的分类模型,通过神经网络的分类模型对亮斑标记图像进行预测处理,能够准确得到亮斑的形状信息。神经网络的分类模型的具体模型结构和训练方式在下文实施例中进行介绍。The classification model is obtained by training the initial model based on at least one training sample. At least one training sample includes a bright spot image, and the bright spot image is annotated with the true shape information of the bright spot. It should be noted here that the classification model provided in this application is a classification model based on a neural network. Through the classification model of the neural network, the bright spot mark image is predicted and processed, and the shape information of the bright spot can be accurately obtained. The specific model structure and training method of the neural network classification model are introduced in the following embodiments.
在另一些实施例中,分类模型也可以是其他的分类预测模型,例如,基于K近邻(K-nearest Neighbors,KNN)算法的模型、logistic回归模型、基于线性判别分析(LinearDiscriminant Analysis,LDA)的模型、基于二次判别分析(Quadratic DiscriminantAnalysis,QDA)的模型等等,在本申请中不做具体限定。In other embodiments, the classification model can also be other classification prediction models, for example, a model based on the K-nearest Neighbors (KNN) algorithm, a logistic regression model, or a model based on Linear Discriminant Analysis (LDA). Models, models based on Quadratic Discriminant Analysis (QDA), etc. are not specifically limited in this application.
步骤S450,基于亮斑的形状信息,确定亮斑与光源之间的对应关系。Step S450: Determine the corresponding relationship between the bright spot and the light source based on the shape information of the bright spot.
步骤S450的实施方式可以参考步骤S330中的详细介绍,在此不再一一赘述。For the implementation of step S450, reference can be made to the detailed introduction in step S330, which will not be described again here.
步骤S460,基于亮斑与光源之间的对应关系,确定人眼注视区域。Step S460: Determine the human eye's gaze area based on the correspondence between the bright spot and the light source.
本申请提供了一种人眼注视区域的检测方法。在本实施例中详细介绍了亮斑的位置信息和形状信息的确定方式,为后续亮斑与光源之间的对应关系的确定提供了确定依据,使得基于亮斑的形状信息确定出的对应关系更加准确可靠。This application provides a method for detecting human eye gaze areas. In this embodiment, the method of determining the position information and shape information of the bright spot is introduced in detail, which provides a basis for determining the subsequent correspondence between the bright spot and the light source, so that the corresponding relationship is determined based on the shape information of the bright spot. More accurate and reliable.
请参阅图6,图6示意性地示出了本申请第三实施例提供的一种人眼注视区域的检测方法,在本方法中,详细介绍了人眼注视区域的确定过程,具体地,本方法可以包括步骤S610至步骤S680。Please refer to Figure 6. Figure 6 schematically shows a method for detecting the human eye gaze area provided by the third embodiment of the present application. In this method, the determination process of the human eye gaze area is introduced in detail. Specifically, The method may include steps S610 to S680.
步骤S610,获取人眼图像。Step S610: Obtain human eye image.
步骤S620,基于人眼图像,确定亮斑的形状信息。Step S620: Determine the shape information of the bright spot based on the human eye image.
步骤S630,基于亮斑的形状信息,确定亮斑与光源之间的对应关系。Step S630: Determine the corresponding relationship between the bright spot and the light source based on the shape information of the bright spot.
步骤S640,基于亮斑与光源之间的对应关系,确定角膜中心的空间位置信息。Step S640: Determine the spatial position information of the cornea center based on the correspondence between the bright spot and the light source.
作为一种实施方式,在亮斑与光源建立对应关系的情况下,头戴增强现实设备通过读取图像采集装置的硬件信息确定出相机光心的位置信息,进而基于亮斑、对应光源、角膜中心以及相机光心四点共面的原理,通过空间几何关系,求解出角膜中心的空间位置信息。As an implementation manner, when the bright spot establishes a corresponding relationship with the light source, the head-mounted augmented reality device determines the position information of the camera's optical center by reading the hardware information of the image acquisition device, and then based on the bright spot, the corresponding light source, and the cornea Based on the principle that the center and the four points of the camera's optical center are coplanar, the spatial position information of the cornea center is obtained through spatial geometric relationships.
这里需要说明的是,角膜中心的空间位置信息表征角膜中心在目标空间内的位置信息,目标空间为头戴增强现实设备所在的三维空间。具体地,上述三维空间可以基于预设的三维空间直角坐标系进行描述,角膜中心的空间位置信息可以为对应坐标系中的相应坐标。What needs to be explained here is that the spatial position information of the cornea center represents the position information of the cornea center in the target space, and the target space is the three-dimensional space where the head-mounted augmented reality device is located. Specifically, the above three-dimensional space can be described based on a preset three-dimensional space rectangular coordinate system, and the spatial position information of the cornea center can be the corresponding coordinates in the corresponding coordinate system.
步骤S650,基于人眼图像,确定人眼图像中瞳孔中心的位置信息和瞳孔的轮廓信息。Step S650: Based on the human eye image, determine the position information of the pupil center and the pupil outline information in the human eye image.
由于人眼的瞳孔区域颜色较深,且形状近似圆形。因此,本申请中通过二值化操作确定出瞳孔区域,进而对该瞳孔区域采用曲线进行拟合确定的瞳孔的轮廓信息和瞳孔中心的位置信息。具体地,步骤S650可以包括步骤S6510至步骤S6520。Because the pupil area of the human eye is darker in color and approximately round in shape. Therefore, in this application, the pupil area is determined through a binarization operation, and then a curve is used to fit the pupil area to determine the pupil outline information and the position information of the pupil center. Specifically, step S650 may include steps S6510 to S6520.
步骤S6510,将人眼图像中像素值小于或等于预设像素阈值的区域确定为瞳孔区域。Step S6510, determine the area in the human eye image whose pixel value is less than or equal to the preset pixel threshold as the pupil area.
预设像素由头戴增强现实设备默认设定,也可以由研发人员基于实际处理结果进行调整。头戴增强现实设备将人眼图像中像素值小于或等于预设像素阈值的区域确定为瞳孔区域,并将瞳孔区域内的全部像素的像素值置为0(也即,图像置为黑色)。此外,头戴增强现实设备将人眼图像中像素值大于预设像素阈值的区域确定为非瞳孔区域,并将非瞳孔区域内的全部像素的像素值置为1(也即,图像置为白色)。头戴增强现实设备通过上述二值化操作,实现了瞳孔区域和非瞳孔区域的分割。The preset pixels are set by default by the head-mounted augmented reality device, and can also be adjusted by developers based on actual processing results. The head-mounted augmented reality device determines the area in the human eye image with a pixel value less than or equal to the preset pixel threshold as the pupil area, and sets the pixel values of all pixels in the pupil area to 0 (that is, the image is set to black). In addition, the head-mounted augmented reality device determines the area in the human eye image with a pixel value greater than the preset pixel threshold as a non-pupil area, and sets the pixel values of all pixels in the non-pupil area to 1 (that is, the image is set to white ). The head-mounted augmented reality device realizes the segmentation of the pupil area and non-pupil area through the above binary operation.
步骤S6520,基于瞳孔区域,确定瞳孔中心的位置信息和瞳孔的轮廓信息。Step S6520: Based on the pupil area, determine the position information of the pupil center and the outline information of the pupil.
在本申请实施例中,头戴增强现实设备采用预设的拟合曲线对瞳孔区域进行拟合,得到瞳孔的轮廓信息,进而基于拟合完成的曲线,确定瞳孔中心的位置信息。具体地,预设的拟合曲线为椭圆曲线,头戴增强现实设备通过最小二乘法对椭圆曲线进行拟合,得到拟合完成的椭圆曲线,也即瞳孔的轮廓信息。进而基于拟合完成的椭圆曲线,将椭圆曲线的中点坐标确定为瞳孔中心的位置信息。In this embodiment of the present application, the head-mounted augmented reality device uses a preset fitting curve to fit the pupil area to obtain the outline information of the pupil, and then determines the position information of the pupil center based on the fitted curve. Specifically, the preset fitting curve is an elliptic curve, and the head-mounted augmented reality device fits the elliptic curve through the least squares method to obtain the fitted elliptic curve, that is, the contour information of the pupil. Then, based on the fitted elliptic curve, the midpoint coordinates of the elliptic curve are determined as the position information of the pupil center.
步骤S660,基于角膜中心的空间位置信息、瞳孔中心的位置信息和瞳孔的轮廓信息,确定瞳孔中心的空间位置信息。Step S660: Determine the spatial position information of the pupil center based on the spatial position information of the cornea center, the position information of the pupil center, and the pupil outline information.
在本申请实施例中,瞳孔的轮廓信息是通过椭圆曲线进行描述的,头戴增强现实设备基于瞳孔的轮廓信息可以确定椭圆的长轴长度和短轴长度,进而基于角膜中心的空间位置信息和瞳孔中心的位置信息,根据小孔成像原理与折射定律可以确定出瞳孔中心的空间位置信息。同样地,瞳孔中心的空间位置信息同样采用与角膜中心的空间位置信息相同的坐标系进行描述,也即,瞳孔中心的空间位置信息和角膜中心的空间位置信息为相同坐标系下的坐标。In the embodiment of this application, the outline information of the pupil is described by an elliptic curve. The head-mounted augmented reality device can determine the long axis length and the short axis length of the ellipse based on the pupil outline information, and then based on the spatial position information of the corneal center and The position information of the pupil center can be determined based on the pinhole imaging principle and the law of refraction. Similarly, the spatial position information of the pupil center is also described using the same coordinate system as the spatial position information of the cornea center. That is, the spatial position information of the pupil center and the spatial position information of the cornea center are coordinates in the same coordinate system.
步骤S670,基于角膜中心的空间位置信息和瞳孔中心的空间位置信息,确定视轴。Step S670: Determine the visual axis based on the spatial position information of the cornea center and the spatial position information of the pupil center.
视轴用于表征人眼的注视方向。头戴增强现实设备在角膜中心的空间位置信息和瞳孔中心的空间位置信息已知的情况下,基于空间几何关系,确定出光轴。也即,光轴所在的直线是基于角膜中心和瞳孔中心对应的坐标所确定的。头戴增强现实设备进而基于图像采集装置的硬件信息确定出光轴和视轴的夹角信息,进而基于该夹角信息对光轴所在的直线进行角度调整,得到的调整后的直线即为视轴所在的直线。The visual axis is used to represent the gaze direction of the human eye. When the spatial position information of the cornea center and the pupil center are known, the head-mounted augmented reality device determines the optical axis based on the spatial geometric relationship. That is, the straight line where the optical axis is located is determined based on the coordinates corresponding to the center of the cornea and the center of the pupil. The head-mounted augmented reality device then determines the angle information between the optical axis and the visual axis based on the hardware information of the image acquisition device, and then adjusts the angle of the straight line where the optical axis is based on the angle information. The adjusted straight line is the visual axis. The straight line where it is located.
步骤S680,基于视轴,确定人眼注视区域。Step S680: Determine the human eye gaze area based on the visual axis.
头戴增强现实设备通过获取左眼和右眼分别对应的视轴,进而确定两个视轴的交点(也即,视觉注视点)。进而将视觉注视点所在的区域,确定为人眼注视区域。其中,人眼注视区域的大小和形状由头戴增强现实设备默认设置,例如,人眼注视区域为以视觉注视点为球心,半径为指定半径的球状区域。The head-mounted augmented reality device obtains the visual axes corresponding to the left eye and the right eye respectively, and then determines the intersection point of the two visual axes (that is, the visual gaze point). Then, the area where the visual fixation point is located is determined as the human eye fixation area. Among them, the size and shape of the human eye gaze area are set by default by the head-mounted augmented reality device. For example, the human eye gaze area is a spherical area with the visual gaze point as the center and a radius of a specified radius.
本申请提供了一种人眼注视区域的检测方法。在本实施例中详细介绍了人眼注视区域的确定方法,基于该方法,头戴增强现实设备能够基于亮斑与光源之间的对应关系准确地确定出人眼注视区域,提升了用户的使用体验。This application provides a method for detecting human eye gaze areas. In this embodiment, the method for determining the human eye gaze area is introduced in detail. Based on this method, the head-mounted augmented reality device can accurately determine the human eye gaze area based on the correspondence between the bright spot and the light source, which improves the user's use. experience.
下面对分类模型的训练过程进行阐述。分类模型可以由服务器训练完成,也可以由头戴增强现实设备训练完成,本申请实施例对此不作限定。对分类模型的训练过程包括如下步骤:利用样本数据集对初始模型进行迭代训练,得到分类模型。The training process of the classification model is explained below. The classification model can be trained by a server or by a head-mounted augmented reality device, which is not limited in the embodiments of this application. The training process of the classification model includes the following steps: iteratively train the initial model using the sample data set to obtain the classification model.
样本数据集中包括标注有真实形状信息的亮斑图像。亮斑图像的标注过程由人工完成。亮斑图像的数量根据分类模型的精度要求实际设定,分类模型的精度要求越高,则亮斑图像的数量越大。The sample dataset includes bright spot images annotated with real shape information. The annotation process of bright spot images is done manually. The number of bright spot images is actually set according to the accuracy requirements of the classification model. The higher the accuracy requirements of the classification model, the greater the number of bright spot images.
初始模型可以包括输入层、隐层以及输出层。本申请实施例对隐层结构不作限制,其可以由技术人员根据经验选择,例如,隐层可以包括多个卷积层。The initial model can include input layer, hidden layer and output layer. The embodiments of the present application do not limit the structure of the hidden layer, which can be selected by skilled personnel based on experience. For example, the hidden layer can include multiple convolutional layers.
其中,每次模型训练的具体实现方式有:将亮斑图像输入初始模型进行预测处理,得到亮斑图像的预测形状信息;基于预测形状信息和标注的真实形状信息之间的相对误差和损失函数,对初始模型的参数进行调整,将参数调整后的初始模型作为下一次模型训练的初始模型。Among them, the specific implementation methods of each model training include: inputting the bright spot image into the initial model for prediction processing to obtain the predicted shape information of the bright spot image; based on the relative error and loss function between the predicted shape information and the annotated real shape information , adjust the parameters of the initial model, and use the adjusted initial model as the initial model for the next model training.
可选地,服务器在迭代训练的过程中若监测到满足停止迭代条件,则生成分类模型。停止迭代条件可以是参数调整次数大于预设次数,或者,亮斑图像的标注的真实形状信息与预测形状信息之间的相对误差小于预设误差。预设次数和预设误差均可以根据分类模型的精度要求实际设定,分类模型的精度要求越高,则预设次数越大,预设误差越小。Optionally, if the server detects that the iteration stop condition is met during the iterative training process, it generates a classification model. The stop iteration condition may be that the number of parameter adjustments is greater than the preset number, or the relative error between the annotated real shape information and the predicted shape information of the bright spot image is less than the preset error. Both the preset times and the preset error can be actually set according to the accuracy requirements of the classification model. The higher the accuracy requirements of the classification model, the greater the preset times and the smaller the preset error.
损失函数包括且不限于:绝对值损失函数、0-1损失函数、对数损失函数、平方损失函数、感知损失函数、交叉熵损失函数等等。Loss functions include but are not limited to: absolute value loss function, 0-1 loss function, logarithmic loss function, square loss function, perceptual loss function, cross-entropy loss function, etc.
可选地,服务器通过预设算法来实现基于标注的真实形状信息和预测形状信息之间的相对误差和损失函数对初始模型的参数(比如隐层中的各项参数)进行调整。上述预设算法可以是梯度下降算法,包括批量梯度下降(Batch Gradient Descent,BGD)算法、随机梯度下降(Stochastic Gradient Descent,SGD)算法、小批量梯度下降(Mini-BatchGradient Descent,MBGD)算法等等。Optionally, the server uses a preset algorithm to adjust the parameters of the initial model (such as various parameters in the hidden layer) based on the relative error and loss function between the annotated real shape information and the predicted shape information. The above-mentioned preset algorithm can be a gradient descent algorithm, including a batch gradient descent (Batch Gradient Descent, BGD) algorithm, a stochastic gradient descent (Stochastic Gradient Descent, SGD) algorithm, a mini-batch gradient descent (Mini-Batch Gradient Descent, MBGD) algorithm, etc. .
需要说明的是,服务器还可以基于测试亮斑图像对训练完成的分类模型进行测试。测试亮斑图像也被标注有真实形状信息,服务器将测试亮斑图像输入分类模型,将分类模型输出的预测形状信息与标注的真实形状信息进行比对,若二者之间的相对误差小于预设误差,则说明分类模型的参数无需继续调整。It should be noted that the server can also test the trained classification model based on the test bright spot image. The test bright spot image is also annotated with real shape information. The server inputs the test bright spot image into the classification model, and compares the predicted shape information output by the classification model with the annotated real shape information. If the relative error between the two is less than the predicted Assuming an error, it means that the parameters of the classification model do not need to be adjusted further.
本申请实施例提供了一种分类模型的训练方法,基于该方法训练得到的分类模型,能够对人眼图像中的亮斑形状进行准确预测。Embodiments of the present application provide a method for training a classification model. The classification model trained based on this method can accurately predict the shape of bright spots in human eye images.
请参阅图7,图7示意性地示出了本申请实施例提供的一种人眼注视区域的检测装置700,该装置700应用于头戴增强现实设备。其中,头戴增强现实设备包括多个光源,至少一个光源的形状和其他光源的形状不相同。该装置700包括:图像获取模块710、第一确定模块720、第二确定模块730和第三确定模块740。其中,图像获取模块710用于获取人眼图像,人眼图像是对佩戴头戴显示装置的用户的眼睛区域采集得到的,人眼图像包含至少两个亮斑。第一确定模块720用于基于人眼图像,确定亮斑的形状信息。第二确定模块730用于基于亮斑的形状信息,确定亮斑与光源之间的对应关系。第三确定模块740用于基于亮斑与光源之间的对应关系,确定人眼注视区域。Please refer to FIG. 7 , which schematically illustrates a human eye gaze area detection device 700 provided by an embodiment of the present application. The device 700 is applied to a head-mounted augmented reality device. Wherein, the head-mounted augmented reality device includes multiple light sources, and the shape of at least one light source is different from the shapes of other light sources. The device 700 includes: an image acquisition module 710, a first determination module 720, a second determination module 730 and a third determination module 740. The image acquisition module 710 is used to acquire a human eye image. The human eye image is collected from the eye area of the user wearing the head-mounted display device, and the human eye image contains at least two bright spots. The first determination module 720 is used to determine the shape information of the bright spot based on the human eye image. The second determination module 730 is configured to determine the corresponding relationship between the bright spot and the light source based on the shape information of the bright spot. The third determination module 740 is used to determine the human eye gaze area based on the correspondence between the bright spot and the light source.
本申请中的检测装置通过确定出亮斑的形状信息,即使在人眼图像中亮斑缺失的情况下,头戴增强现实设备基于光源的形状信息,能够快速且准确地确定出亮斑和光源之间的对应关系,进而在后续过程中,在确定用户的人眼注视区域时,正确的亮斑和光源的对应关系可以保证人眼注视区域确定的准确性,使得用户的使用体验极佳。The detection device in this application determines the shape information of the bright spot. Even when the bright spot is missing in the human eye image, the head-mounted augmented reality device can quickly and accurately determine the bright spot and the light source based on the shape information of the light source. The corresponding relationship between them, and then in the subsequent process, when determining the user's human eye gaze area, the correct correspondence between the bright spot and the light source can ensure the accuracy of the human eye gaze area determination, making the user's use experience excellent.
在一些实施例中,针对每一亮斑,第一确定模块720还用于基于人眼图像,确定亮斑的位置信息,亮斑的位置信息表征亮斑在人眼图像中的位置;基于亮斑的位置信息对人眼图像中的亮斑进行标记,得到亮斑标记图像;基于亮斑标记图像,确定亮斑的形状信息。In some embodiments, for each bright spot, the first determination module 720 is also used to determine the position information of the bright spot based on the human eye image. The position information of the bright spot represents the position of the bright spot in the human eye image; based on the bright spot The spot position information marks the bright spot in the human eye image to obtain a bright spot mark image; based on the bright spot mark image, the shape information of the bright spot is determined.
在一些实施例中,第一确定模块720还用于通过至少两轮确定过程确定亮斑的位置信息。具体地,第一确定模块720包括第一确定子模块(图中未示出)和第二确定子模块(图中未示出),在至少两轮确定过程中的第i轮确定过程中,i为正整数,第一确定子模块用于基于预设的卷积核对指定图像进行卷积操作,得到中间图像。第二确定子模块用于将中间图像中目标像素点的位置信息确定为第i个亮斑的位置信息,目标像素点的像素值为中间图像中全部像素值的最大值。其中,在i为1的情况下,指定图像为人眼图像;在i大于1的情况下,指定图像通过如下方式获取:将人眼图像中的目标区域的像素值设置为指定像素值,得到指定图像,目标区域基于前i-1个亮斑的位置信息确定。In some embodiments, the first determination module 720 is also configured to determine the location information of the bright spot through at least two rounds of determination processes. Specifically, the first determination module 720 includes a first determination sub-module (not shown in the figure) and a second determination sub-module (not shown in the figure). In the i-th round of determination process among at least two rounds of determination processes, i is a positive integer, and the first determination sub-module is used to perform a convolution operation on the specified image based on a preset convolution kernel to obtain an intermediate image. The second determination sub-module is used to determine the position information of the target pixel point in the intermediate image as the position information of the i-th bright spot, and the pixel value of the target pixel point is the maximum value of all pixel values in the intermediate image. Among them, when i is 1, the specified image is a human eye image; when i is greater than 1, the specified image is obtained in the following way: set the pixel value of the target area in the human eye image to the specified pixel value, and obtain the specified Image, the target area is determined based on the position information of the first i-1 bright spots.
在一些实施例中,第一确定模块720还用于通过分类模型对亮斑标记图像进行预测处理,得到亮斑标记图像中亮斑的形状信息,分类模型是基于至少一个训练样本对初始模型进行训练得到的,至少一个训练样本包括亮斑图像,亮斑图像标注有亮斑的真实形状信息。In some embodiments, the first determination module 720 is also used to perform prediction processing on the bright spot mark image through a classification model to obtain the shape information of the bright spots in the bright spot mark image. The classification model is based on at least one training sample and performs prediction on the initial model. After training, at least one training sample includes a bright spot image, and the bright spot image is annotated with the true shape information of the bright spot.
在一些实施例中,第三确定模块740还用于基于亮斑与光源之间的对应关系,确定角膜中心的空间位置信息,角膜中心的空间位置信息表征角膜中心在目标空间内的位置信息,目标空间为头戴增强现实设备所在的三维空间;基于人眼图像,确定人眼图像中瞳孔中心的位置信息和瞳孔的轮廓信息;基于角膜中心的空间位置信息、瞳孔中心的位置信息和瞳孔的轮廓信息,确定瞳孔中心的空间位置信息;基于角膜中心的空间位置信息和瞳孔中心的空间位置信息,确定视轴,视轴用于表征人眼的注视方向;基于视轴,确定人眼注视区域。In some embodiments, the third determination module 740 is also used to determine the spatial position information of the cornea center based on the correspondence between the bright spot and the light source. The spatial position information of the cornea center represents the position information of the cornea center in the target space, The target space is the three-dimensional space where the head-mounted augmented reality device is located; based on the human eye image, the position information of the pupil center and the pupil outline information in the human eye image are determined; based on the spatial position information of the cornea center, the position information of the pupil center and the pupil's contour information Contour information determines the spatial position information of the pupil center; determines the visual axis based on the spatial position information of the cornea center and the pupil center, and the visual axis is used to characterize the gaze direction of the human eye; determines the human eye gaze area based on the visual axis .
在一些实施例中,第三确定模块740还用于将人眼图像中像素值小于或等于预设像素阈值的区域确定为瞳孔区域;基于瞳孔区域,确定瞳孔中心的位置信息和瞳孔的轮廓信息。In some embodiments, the third determination module 740 is also used to determine the area in the human eye image with a pixel value less than or equal to the preset pixel threshold as the pupil area; based on the pupil area, determine the position information of the pupil center and the outline information of the pupil. .
在一些实施例中,装置700还包括训练模块(图中未示出),训练模块用于利用样本数据集对初始模型进行训练,得到分类模型,样本数据集包括标注有真实形状信息的亮斑图像;训练模块,具体用于将亮斑图像输入初始模型进行预测处理,得到亮斑图像的预测特形状信息;基于预测形状信息和标注的真实形状信息之间的相对误差和损失函数,对初始模型的参数进行调整,将参数调整后的初始模型作为下一次模型训练的初始模型。In some embodiments, the device 700 also includes a training module (not shown in the figure). The training module is used to train the initial model using a sample data set to obtain a classification model. The sample data set includes bright spots marked with real shape information. image; the training module is specifically used to input the bright spot image into the initial model for prediction processing to obtain the predicted special shape information of the bright spot image; based on the relative error and loss function between the predicted shape information and the annotated real shape information, the initial The parameters of the model are adjusted, and the initial model after parameter adjustment is used as the initial model for the next model training.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described devices and modules can be referred to the corresponding processes in the foregoing method embodiments, and will not be described again here.
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In several embodiments provided in this application, the coupling between modules may be electrical, mechanical or other forms of coupling.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software function modules.
请参阅图8,其示出了本申请实施例还提供一种头戴增强现实设备800,该头戴增强现实设备800包括:多个光源810、一个或多个处理器820、存储器830以及一个或多个应用程序。其中,至少一个光源810的形状和其他光源810的形状不相同,一个或多个应用程序被存储在存储器830中并被配置为由一个或多个处理器820执行,一个或多个应用程序配置用于执行上述实施例中所描述的方法。Please refer to Figure 8, which shows that an embodiment of the present application also provides a head-mounted augmented reality device 800. The head-mounted augmented reality device 800 includes: multiple light sources 810, one or more processors 820, a memory 830 and a or multiple applications. Wherein, the shape of at least one light source 810 is different from the shape of other light sources 810, one or more application programs are stored in the memory 830 and configured to be executed by one or more processors 820, and the one or more application programs are configured Used to perform the methods described in the above embodiments.
处理器820可以包括一个或者多个处理核。处理器820利用各种接口和线路连接整个电池管理系统内的各种部分,通过运行或执行存储在存储器830内的指令、程序、代码集或指令集,以及调用存储在存储器830内的数据,执行电池管理系统的各种功能和处理数据。可选地,处理器820可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(ProgrammableLogic Array,PLA)中的至少一种硬件形式来实现。处理器820可集成中央处理器820(Central Processing Unit,CPU)、图像处理器820(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器820中,单独通过一块通信芯片进行实现。Processor 820 may include one or more processing cores. The processor 820 uses various interfaces and lines to connect various parts within the entire battery management system, by running or executing instructions, programs, code sets or instruction sets stored in the memory 830, and calling data stored in the memory 830, Performs various functions of the battery management system and processes data. Optionally, the processor 820 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). implemented in hardware form. The processor 820 may integrate one or a combination of a central processing unit 820 (Central Processing Unit, CPU), a graphics processor 820 (Graphics Processing Unit, GPU), a modem, and the like. Among them, the CPU mainly handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the display content; and the modem is used to handle wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 820 and may be implemented solely through a communication chip.
存储器830可以包括随机存储器830(Random Access Memory,RAM),也可以包括只读存储器830(Read-Only Memory)。存储器830可用于存储指令、程序、代码、代码集或指令集。存储器830可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各种方法实施例的指令等。存储数据区还可以存储电子设备图在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 830 may include a random access memory 830 (Random Access Memory, RAM) or a read-only memory 830 (Read-Only Memory). Memory 830 may be used to store instructions, programs, codes, sets of codes, or sets of instructions. The memory 830 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing an operating system and instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing various method embodiments described below, etc. The storage data area can also store data created during use of the electronic device (such as phone book, audio and video data, chat record data), etc.
请参阅图9,其示出了本申请实施例还提供一种计算机可读存储介质900,该计算机可读存储介质900中存储有计算机程序指令910,计算机程序指令910可被处理器调用以执行上述实施例中所描述的方法。Please refer to Figure 9, which shows that an embodiment of the present application also provides a computer-readable storage medium 900. The computer-readable storage medium 900 stores computer program instructions 910. The computer program instructions 910 can be called by the processor for execution. The method described in the above embodiments.
计算机可读存储介质可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质包括非易失性计算机可读存储介质(non-transitory computer-readable storage medium)。计算机可读存储介质900具有执行上述方法中的任何方法步骤的计算机程序指令910的存储空间。这些计算机程序指令910可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。The computer-readable storage medium may be electronic memory such as flash memory, EEPROM (electrically erasable programmable read-only memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium includes non-transitory computer-readable storage medium (non-transitory computer-readable storage medium). The computer-readable storage medium 900 has storage space for computer program instructions 910 that perform any method steps in the above-described methods. These computer program instructions 910 may be read from or written into one or more computer program products.
以上,仅是本申请的较佳实施例而已,并非对本申请作任何形式上的限制,虽然本申请已以较佳实施例揭示如上,然而并非用以限定本申请,任何本领域技术人员,在不脱离本申请技术方案范围内,当可利用上述揭示的技术内容做出些许更动或修饰为等同变化的等效实施例,但凡是未脱离本申请技术方案内容,依据本申请的技术实质对以上实施例所作的任何简介修改、等同变化与修饰,均仍属于本申请技术方案的范围内。The above are only preferred embodiments of the present application and are not intended to limit the present application in any form. Although the present application has been disclosed as above with preferred embodiments, they are not intended to limit the present application. Any person skilled in the art may Without departing from the scope of the technical solution of the present application, the technical content disclosed above can be used to make some changes or modifications to equivalent embodiments with equivalent changes. Any brief modifications, equivalent changes and modifications made to the above embodiments still fall within the scope of the technical solution of the present application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210772190.3A CN117392736A (en) | 2022-06-30 | 2022-06-30 | Detection method and device for human eye gaze area and head-mounted augmented reality device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210772190.3A CN117392736A (en) | 2022-06-30 | 2022-06-30 | Detection method and device for human eye gaze area and head-mounted augmented reality device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN117392736A true CN117392736A (en) | 2024-01-12 |
Family
ID=89465369
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210772190.3A Pending CN117392736A (en) | 2022-06-30 | 2022-06-30 | Detection method and device for human eye gaze area and head-mounted augmented reality device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117392736A (en) |
-
2022
- 2022-06-30 CN CN202210772190.3A patent/CN117392736A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10832039B2 (en) | Facial expression detection method, device and system, facial expression driving method, device and system, and storage medium | |
| US11650659B2 (en) | User input processing with eye tracking | |
| US9202280B2 (en) | Position estimation based rotation of switched off light source | |
| US20220301218A1 (en) | Head pose estimation from local eye region | |
| CN113015984A (en) | Error correction in convolutional neural networks | |
| CN108427503A (en) | Human eye method for tracing and human eye follow-up mechanism | |
| CN110046546A (en) | A kind of adaptive line of sight method for tracing, device, system and storage medium | |
| CN110555426A (en) | Sight line detection method, device, equipment and storage medium | |
| CN119847330B (en) | A smart control method and system for AR devices | |
| CN110619303A (en) | Method, device and terminal for tracking point of regard and computer readable storage medium | |
| CN110051319A (en) | Adjusting method, device, equipment and the storage medium of eyeball tracking sensor | |
| Wu et al. | Magiceyes: A large scale eye gaze estimation dataset for mixed reality | |
| Chen et al. | Gaze Gestures and Their Applications in human-computer interaction with a head-mounted display | |
| Nakamura et al. | Analyzing the effect of diverse gaze and head direction on facial expression recognition with photo-reflective sensors embedded in a head-mounted display | |
| CN117392736A (en) | Detection method and device for human eye gaze area and head-mounted augmented reality device | |
| CN111507555A (en) | Human body state detection method, classroom teaching quality evaluation method and related device | |
| Chugh | An Eye Tracking System for a Virtual Reality Headset | |
| CN114898452B (en) | Eye movement recognition method, device and related equipment based on deep learning | |
| CN115857678B (en) | Eye movement testing method, device, equipment and storage medium | |
| CN117409471A (en) | Image processing method, device, AR equipment and storage medium | |
| US12481355B2 (en) | Method for determining two-eye gaze point and host | |
| CN116994344B (en) | Method, device, terminal, storage medium and program product for guiding palm verification | |
| CN112528714A (en) | Single light source-based gaze point estimation method, system, processor and equipment | |
| CN117576772A (en) | Method, device and augmented reality device for determining human eye gaze area | |
| Uramune et al. | Fixation-based Self-calibration for Eye Tracking in VR Headsets |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |