CN116421135A - Vision testing method, device, electronic equipment and storage medium - Google Patents

Vision testing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116421135A
CN116421135A CN202310474920.6A CN202310474920A CN116421135A CN 116421135 A CN116421135 A CN 116421135A CN 202310474920 A CN202310474920 A CN 202310474920A CN 116421135 A CN116421135 A CN 116421135A
Authority
CN
China
Prior art keywords
test
distance
eye
information
target
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
Application number
CN202310474920.6A
Other languages
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.)
Beijing Jingdong Tuoxian Technology Co Ltd
Original Assignee
Beijing Jingdong Tuoxian Technology 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 Beijing Jingdong Tuoxian Technology Co Ltd filed Critical Beijing Jingdong Tuoxian Technology Co Ltd
Priority to CN202310474920.6A priority Critical patent/CN116421135A/en
Publication of CN116421135A publication Critical patent/CN116421135A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B3/00Apparatus for testing the eyes; Instruments for examining the eyes
    • A61B3/02Subjective types, i.e. testing apparatus requiring the active assistance of the patient
    • A61B3/028Subjective types, i.e. testing apparatus requiring the active assistance of the patient for testing visual acuity; for determination of refraction, e.g. phoropters
    • A61B3/032Devices for presenting test symbols or characters, e.g. test chart projectors
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B3/00Apparatus for testing the eyes; Instruments for examining the eyes
    • A61B3/0016Operational features thereof
    • A61B3/0025Operational features thereof characterised by electronic signal processing, e.g. eye models
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B3/00Apparatus for testing the eyes; Instruments for examining the eyes
    • A61B3/0083Apparatus for testing the eyes; Instruments for examining the eyes provided with means for patient positioning
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B3/00Apparatus for testing the eyes; Instruments for examining the eyes
    • A61B3/10Objective types, i.e. instruments for examining the eyes independent of the patients' perceptions or reactions
    • A61B3/14Arrangements specially adapted for eye photography

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Medical Informatics (AREA)
  • Surgery (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Physics & Mathematics (AREA)
  • Molecular Biology (AREA)
  • Ophthalmology & Optometry (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Signal Processing (AREA)
  • Eye Examination Apparatus (AREA)

Abstract

本公开提出一种视力测试方法、装置、电子设备及存储介质。被电子设备执行,方法包括:基于拍摄参数信息,采集眼部图像,并根据所述拍摄参数信息和所述眼部图像,确定所述电子设备与眼部之间的目标测试距离,再根据所述眼部图像和所述目标测试距离,进行视力测试,从而电子设备能够基于拍摄参数信息和所述眼部图像,准确地确定电子设备与眼部之间的目标测试距离,而后能够基于眼部图像和所述目标测试距离,有效地提升视力测试的准确性。

Figure 202310474920

The disclosure proposes a vision testing method, device, electronic equipment and storage medium. Executed by an electronic device, the method includes: collecting an eye image based on shooting parameter information, and determining a target test distance between the electronic device and the eye according to the shooting parameter information and the eye image, and then according to the The eye image and the target test distance are used to perform a vision test, so that the electronic device can accurately determine the target test distance between the electronic device and the eye based on the shooting parameter information and the eye image, and then can determine the target test distance based on the eye image. The distance between the image and the target test can effectively improve the accuracy of the vision test.

Figure 202310474920

Description

视力测试方法、装置、电子设备及存储介质Vision test method, device, electronic equipment and storage medium

技术领域technical field

本公开涉及医疗健康服务技术领域,尤其涉及一种视力测试方法、装置、电子设备及存储介质。The present disclosure relates to the technical field of medical and health services, and in particular to a vision testing method, device, electronic equipment and storage medium.

背景技术Background technique

随着电子技术的发展,基于电子设备进行视力测试成为用户定期检测视力的重要途径,现阶段用户通常是联合视力表自行进行视力测试,即需要用户和视力表保持预设测试距离,而后通过对视力表上测试标记的辨认情况确定用户视力。With the development of electronic technology, vision testing based on electronic equipment has become an important way for users to regularly test vision. The recognition of the test marks on the eye chart determines the user's vision.

相关技术中,不能够准确地确定出视力测试所需的测试距离,可能会影响视力测试结果。In the related art, the test distance required for the vision test cannot be accurately determined, which may affect the result of the vision test.

发明内容Contents of the invention

本公开旨在至少在一定程度上解决相关技术中的技术问题。The present disclosure aims to solve technical problems in the related art at least to a certain extent.

为此,本公开的目的在于提出一种视力测试方法、装置、电子设备、存储介质以及计算机程序产品。Therefore, the purpose of the present disclosure is to provide a vision testing method, device, electronic equipment, storage medium and computer program product.

本公开第一方面实施例提出的视力测试方法,被电子设备执行,方法包括:基于拍摄参数信息,采集眼部图像;根据拍摄参数信息和眼部图像,确定电子设备与眼部之间的目标测试距离;根据眼部图像和目标测试距离,进行视力测试。The vision test method proposed by the embodiment of the first aspect of the present disclosure is executed by an electronic device, and the method includes: collecting an eye image based on shooting parameter information; and determining a target between the electronic device and the eye according to the shooting parameter information and the eye image Test distance; based on the eye image and the target test distance, a vision test is performed.

本公开第二方面实施例提出的视力测试装置,被电子设备执行,装置包括:采集模块,用于基于拍摄参数信息,采集眼部图像;确定模块,用于根据拍摄参数信息和眼部图像,确定电子设备与眼部之间的目标测试距离;处理模块,用于根据眼部图像和目标测试距离,进行视力测试。The vision testing device proposed in the embodiment of the second aspect of the present disclosure is executed by an electronic device, and the device includes: an acquisition module, configured to acquire eye images based on shooting parameter information; a determination module, configured to, based on shooting parameter information and eye images, Determine the target test distance between the electronic device and the eye; the processing module is used to perform vision test according to the eye image and the target test distance.

本公开第三方面实施例提出了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时,实现如本公开第一方面实施例提出的视力测试方法。The embodiment of the third aspect of the present disclosure proposes an electronic device, including a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the program, the embodiment of the first aspect of the present disclosure is implemented. Proposed vision testing method.

本公开第四方面实施例提出了一种非临时性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开第一方面实施例提出的视力测试方法。The embodiment of the fourth aspect of the present disclosure provides a non-transitory computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the vision testing method as proposed in the embodiment of the first aspect of the present disclosure is implemented.

本公开第五方面实施例提出了一种计算机程序产品,当计算机程序产品中的指令处理器执行时,执行如本公开第一方面实施例提出的视力测试方法。The embodiment of the fifth aspect of the present disclosure provides a computer program product. When the instruction processor in the computer program product is executed, the vision testing method as proposed in the embodiment of the first aspect of the present disclosure is executed.

本公开的实施例提供的视力测试方法可以包括以下有益效果:基于拍摄参数信息,采集眼部图像,并根据拍摄参数信息和眼部图像,确定电子设备与眼部之间的目标测试距离,再根据眼部图像和目标测试距离,进行视力测试,从而电子设备能够基于拍摄参数信息和眼部图像,准确地确定电子设备与眼部之间的目标测试距离,而后能够基于眼部图像和目标测试距离,有效地提升视力测试的准确性。The eyesight testing method provided by the embodiments of the present disclosure may include the following beneficial effects: based on the shooting parameter information, the eye image is collected, and according to the shooting parameter information and the eye image, the target test distance between the electronic device and the eye is determined, and then According to the eye image and the target test distance, the vision test is performed, so that the electronic device can accurately determine the target test distance between the electronic device and the eye based on the shooting parameter information and the eye image, and then can be based on the eye image and target test The distance can effectively improve the accuracy of the vision test.

本公开附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本公开的实践了解到。Additional aspects and advantages of the disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the disclosure.

附图说明Description of drawings

本公开上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present disclosure will become apparent and understandable from the following description of the embodiments in conjunction with the accompanying drawings, wherein:

图1是本公开一实施例提出的视力测试方法的流程示意图;FIG. 1 is a schematic flow chart of a vision testing method proposed by an embodiment of the present disclosure;

图2是本公开另一实施例提出的视力测试方法的流程示意图;2 is a schematic flow chart of a vision testing method proposed by another embodiment of the present disclosure;

图3是本公开另一实施例提出的视力测试方法的流程示意图;3 is a schematic flow chart of a vision testing method proposed by another embodiment of the present disclosure;

图4是本公开一实施例提出的瞳孔局部图像中关键点的示意图;Fig. 4 is a schematic diagram of key points in a pupil partial image proposed by an embodiment of the present disclosure;

图5是本公开另一实施例提出的视力测试方法的流程示意图;5 is a schematic flow chart of a vision testing method proposed by another embodiment of the present disclosure;

图6是本公开一实施例提出的视力测试装置的结构示意图;6 is a schematic structural diagram of a vision testing device proposed by an embodiment of the present disclosure;

图7示出了适于用来实现本公开实施方式的示例性电子设备的框图。FIG. 7 shows a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure.

具体实施方式Detailed ways

下面详细描述本公开的实施例,实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本公开,而不能理解为对本公开的限制。相反,本公开的实施例包括落入所附加权利要求书的精神和内涵范围内的所有变化、修改和等同物。Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present disclosure and should not be construed as limiting the present disclosure. On the contrary, the embodiments of the present disclosure include all changes, modifications and equivalents coming within the spirit and scope of the appended claims.

需要说明的是,本公开技术方案中对数据的获取、采集、存储、使用、处理等,其过程均符合相关法律、法规的规定,且不违背公序良俗。It should be noted that the acquisition, collection, storage, use, and processing of data in the technical solutions disclosed herein are all in compliance with relevant laws and regulations, and do not violate public order and good customs.

图1是本公开一实施例提出的视力测试方法的流程示意图。FIG. 1 is a schematic flowchart of a vision testing method proposed by an embodiment of the present disclosure.

其中,需要说明的是,本实施例的视力测试方法的执行主体为视力测试装置,该装置可以由软件和/或硬件的方式实现,该装置可以配置在电子设备中,电子设备可以包括但不限于终端、服务器端等。Wherein, it should be noted that the execution body of the vision testing method of this embodiment is a vision testing device, which can be realized by software and/or hardware, and which can be configured in an electronic device, which can include but not Limited to terminals, servers, etc.

如图1所示,该视力测试方法,被电子设备执行,该电子设备需要配置有摄像装置,电子设备可以具体例如是手机,平板电脑、笔记本电脑等,对此不做限制。As shown in FIG. 1 , the eyesight testing method is executed by electronic equipment, and the electronic equipment needs to be equipped with a camera. The electronic equipment can be, for example, a mobile phone, a tablet computer, a notebook computer, etc., without limitation.

S101:基于拍摄参数信息,采集眼部图像。S101: Collect an eye image based on shooting parameter information.

其中,拍摄参数信息是指电子设备摄像装置的相机参数,该相机参数可以例如为,相机内参,相机外参,焦距等,对此不做限制。Wherein, the shooting parameter information refers to camera parameters of the camera device of the electronic device, and the camera parameters may be, for example, camera internal parameters, camera external parameters, focal length, etc., which are not limited.

其中,眼部图像是指,电子设备的摄像装置采集到的用于对视力测试用户的眼部进行描述的局部图像,该眼部图像可以例如左眼图像,右眼图像,对此不做限制。Wherein, the eye image refers to the partial image collected by the camera device of the electronic device and used to describe the eye of the vision test user. The eye image can be, for example, a left eye image or a right eye image, without limitation. .

也即是说,本公开实施例中,可以是电子设备的摄像装置(该摄像装置具有对应的拍摄参数信息)针对视力测试用户的眼部区域拍摄相应的图像作为眼部图像,或者,还可以是由电子设备的摄像装置采集待检测对象的人脸图像,而后,可以从采集到的人脸图像中裁剪得到眼部图像,对此不做限制。That is to say, in the embodiment of the present disclosure, it may be that the camera of the electronic device (the camera has corresponding shooting parameter information) shoots a corresponding image for the eye area of the vision test user as the eye image, or it may also be The face image of the object to be detected is collected by the camera device of the electronic device, and then the eye image can be obtained by cutting out the collected face image, which is not limited.

S102:根据拍摄参数信息和眼部图像,确定电子设备与眼部之间的目标测试距离。S102: Determine a target test distance between the electronic device and the eye according to the shooting parameter information and the eye image.

可以理解的是,在对用户进行视力测试时,需要用户和视力表保持预设测试距离,而后通过对视力表上测试标记的辨认情况确定用户视力。It can be understood that, when performing a vision test on a user, the user and the vision chart need to maintain a preset test distance, and then the user's vision is determined by identifying the test marks on the vision chart.

本公开实施例中,可以是将显示在视力表中的测试标记显示在电子设备中,而后确定电子设备和眼部之间的水平直线距离即为目标测试距离,而后,电子设备可以基于用户对电子设备显示的测试标记的辨认情况,确定用户视力,从而相比传统视力表测试方法,本公开实施例提出的视力测试方法无需人工参与,使得用户可以基于电子设备自行进行视力测试,从而能够提高视力测试的便捷性。In the embodiment of the present disclosure, the test marks displayed in the eye chart may be displayed on the electronic device, and then the horizontal linear distance between the electronic device and the eye is determined to be the target test distance, and then the electronic device may The identification of the test marks displayed by the electronic device determines the user's vision. Compared with the traditional eye chart test method, the vision test method proposed by the embodiment of the present disclosure does not require manual participation, so that the user can perform the vision test by himself based on the electronic device, thereby improving the visual acuity. The convenience of vision testing.

一些实施例中,根据拍摄参数信息和眼部图像,确定电子设备与眼部之间的目标测试距离,可以是由电子设备对拍摄参数信息和眼部图像进行计算,以确定电子设备与眼部之间的目标测试距离,例如,可以是由电子设备训练相应的用于确定目标测试距离的深度学习模型,而后,可以是将拍摄参数信息和眼部图像提供至深度学习模型,由深度学习模型对拍摄参数信息和眼部图像进行处理,并确定目标测试距离,对此不做限制。In some embodiments, the target test distance between the electronic device and the eye is determined according to the shooting parameter information and the eye image, and the electronic device may calculate the shooting parameter information and the eye image to determine the distance between the electronic device and the eye. The target test distance between, for example, can be trained by the electronic equipment corresponding deep learning model for determining the target test distance, and then, can provide the shooting parameter information and the eye image to the deep learning model, and the deep learning model can The shooting parameter information and the eye image are processed, and the target test distance is determined, which is not limited.

S103:根据眼部图像和目标测试距离,进行视力测试。S103: Perform a vision test according to the eye image and the target test distance.

本公开实施例在获取视力测试用户的眼部图像,并确定视力测试用户眼部至电子设备之间的目标测试距离后,可以根据眼部图像和目标测试距离,进行视力测试。In the embodiment of the present disclosure, after acquiring the eye image of the vision test user and determining the target test distance between the eyes of the vision test user and the electronic device, the vision test may be performed according to the eye image and the target test distance.

举例而言,可以是在视力测试用户的眼部和电子设备之间保持目标测试距离的情况下,由电子设备显示相应视力值的测试标记,再接收用户对该测试标记的辨认信息,并对辨认信息和测试标记进行比对处理,在比对结果显示辨认信息和当前显示的测试标记相同时,根据与该测试标记相应的视力值确定用户的视力,或者,在比对结果显示辨认信息和当前显示的测试标记不相同时,切换显示不同视力值的其他测试标记,对此不做限制。For example, in the case of maintaining a target test distance between the user's eyes and the electronic device for vision testing, the electronic device displays a test mark corresponding to the visual acuity value, and then receives the identification information of the test mark from the user, and performs a test on the test mark. The identification information and the test mark are compared. When the comparison result shows that the identification information is the same as the currently displayed test mark, the user's vision is determined according to the vision value corresponding to the test mark, or, when the comparison result shows that the identification information and the currently displayed test mark are the same, the user's vision is determined. When the currently displayed test marks are different, switch to display other test marks with different visual acuity values, and there is no limitation on this.

本实施例中,通过基于拍摄参数信息,采集眼部图像,并根据拍摄参数信息和眼部图像,确定电子设备与眼部之间的目标测试距离,再根据眼部图像和目标测试距离,进行视力测试,从而电子设备能够基于拍摄参数信息和眼部图像,准确地确定电子设备与眼部之间的目标测试距离,而后能够基于眼部图像和目标测试距离,有效地提升视力测试的准确性。In this embodiment, the eye image is collected based on the shooting parameter information, and the target test distance between the electronic device and the eye is determined according to the shooting parameter information and the eye image, and then the target test distance is determined according to the eye image and the target test distance. Vision test, so that the electronic device can accurately determine the target test distance between the electronic device and the eye based on the shooting parameter information and the eye image, and then can effectively improve the accuracy of the vision test based on the eye image and the target test distance .

图2是本公开另一实施例提出的视力测试方法的流程示意图。Fig. 2 is a schematic flowchart of a vision testing method proposed by another embodiment of the present disclosure.

如图2所示,该视力测试方法,包括:As shown in Figure 2, the visual acuity test method includes:

S201:基于拍摄参数信息,获取至少一帧人脸图像。S201: Acquire at least one frame of face image based on shooting parameter information.

其中,人脸图像是指,电子设备的摄像装置采集到的包含视力测试用户的人脸的图像。Wherein, the face image refers to the image collected by the camera device of the electronic device and includes the face of the vision test user.

也即是说,可以是电子设备的摄像装置(该摄像装置具有对应的拍摄参数信息)针对视力测试用户的脸部区域拍摄相应的图像作为人脸图像。That is to say, it may be that the camera of the electronic device (the camera has corresponding shooting parameter information) shoots a corresponding image for the face area of the vision test user as a face image.

本公开实施例中,获取至少一帧人脸图像,还可以是电子设备的摄像装置(该摄像装置具有对应的拍摄参数信息),针对视力测试用户采集相应的视频流,而后可以对视频流进行解析处理,以得到多个视频帧,并依次将多个视频帧输入至人脸关键点检测模型中,由人脸关键点检测模型检测该视频帧中是否包含人脸,并在人脸关键点检测模型检测到该视频帧中包含人脸时,将该视频帧作为人脸图像,对此不做限制。In the embodiment of the present disclosure, at least one frame of human face image is obtained, which may also be a camera of an electronic device (the camera has corresponding shooting parameter information), and a corresponding video stream is collected for the vision test user, and then the video stream may be processed. Analyze and process to obtain multiple video frames, and input multiple video frames into the face key point detection model in turn, and the face key point detection model detects whether the video frame contains a human face, and the key points of the face When the detection model detects that the video frame contains a human face, the video frame is used as a human face image without limitation.

S202:根据预设像素尺寸信息对人脸图像进行调整,得到待检测图像。S202: Adjust the face image according to preset pixel size information to obtain an image to be detected.

其中,预设像素尺寸信息可以是预先确定的像素尺寸(例如,480宽640高,对此不做限制)。Wherein, the preset pixel size information may be a predetermined pixel size (for example, 480 wide by 640 high, which is not limited).

本公开实施例中,不同电子设备采集到的人脸图像的像素尺寸可能不相同,由此,根据预设像素尺寸信息对人脸图像进行调整,可以是将前述采集到的人脸图像的像素尺寸调整为预设像素尺寸信息所描述的预设像素尺寸,并将前述调整后的人脸图像作为待检测图像。In the embodiments of the present disclosure, the pixel sizes of the face images collected by different electronic devices may be different, so the adjustment of the face images according to the preset pixel size information may be the pixel size of the previously collected face images The size is adjusted to the preset pixel size described by the preset pixel size information, and the aforementioned adjusted face image is used as the image to be detected.

举例而言,电子设备采集得到的人脸图像的像素尺寸是400宽600高,由此,可以对人脸图像进行像素插值,从而将人脸图像的像素尺寸调整为预设像素尺寸信息所描述的预设像素尺寸(480宽640高),以得到待检测图像,对此不做限制。For example, the pixel size of the face image collected by the electronic device is 400 wide by 600 high, thus, the pixel interpolation can be performed on the face image, so as to adjust the pixel size of the face image to be described by the preset pixel size information The preset pixel size (480 wide and 640 high) to obtain the image to be detected is not limited.

S203:从待检测图像中提取眼部图像,得到至少一帧眼部图像。S203: Extract an eye image from the image to be detected to obtain at least one frame of eye image.

本公开实施例在根据预设像素尺寸信息对人脸图像进行调整,得到待检测图像之后,可以取出人眼关键点在待检测图像中的像素坐标,然后左右眼关键点的像素坐标做差算出双眼的眼间距,并取眼间距的一半作为裁剪眼部图像的宽度,而后,可以以此宽度裁剪出左眼图像和右眼图像作为眼部图像。In the embodiment of the present disclosure, after adjusting the face image according to the preset pixel size information to obtain the image to be detected, the pixel coordinates of the key points of the human eyes in the image to be detected can be taken out, and then the pixel coordinates of the key points of the left and right eyes can be calculated by difference The eye distance between the two eyes, and half of the eye distance is taken as the width of the cropped eye image, and then the left eye image and the right eye image can be cropped with this width as the eye image.

本公开实施例中,通过基于拍摄参数信息,获取至少一帧人脸图像,并根预设像素尺寸信息对所述人脸图像进行调整,得到待检测图像,再从所述待检测图像中提取所述眼部图像,得到至少一帧所述眼部图像,从而能够基于预设像素尺寸信息对不同电子设备所采集的像素尺寸进行统一调整,从而可以解决不同电子设备所采集图像的像素大小不统一给视力测试带来的影响。In the embodiment of the present disclosure, at least one frame of face image is acquired based on the shooting parameter information, and the face image is adjusted according to the preset pixel size information to obtain the image to be detected, and then extracted from the image to be detected The eye image obtains at least one frame of the eye image, so that the pixel size collected by different electronic devices can be uniformly adjusted based on preset pixel size information, so that the pixel size of images collected by different electronic devices can be solved. The impact of unification on vision testing.

S204:根据拍摄参数信息和眼部图像,确定电子设备与眼部之间的目标测试距离。S204: Determine a target test distance between the electronic device and the eye according to the shooting parameter information and the eye image.

S204的描述说明具体可以参见上述实施例,在此不再赘述。For the description of S204, reference may be made to the foregoing embodiments for details, and details are not repeated here.

S205:确定目标测试距离和预设距离之间的距离差值。S205: Determine the distance difference between the target test distance and the preset distance.

其中,预设距离,是指预先设定的用于对视力测试用户进行视力测试的最佳测试距离,参考国标GB11533-2011指定的视力检测的测试距离标准,该测试距离一般选取40cm,对此不做限制。Among them, the preset distance refers to the pre-set optimal test distance for vision test users, refer to the test distance standard for vision test specified by the national standard GB11533-2011, the test distance is generally selected as 40cm, for this No restrictions.

本公开实施例中,可以是在确定电子设备与眼部之间的目标测试距离之后,确定目标测试距离和预设距离之间距离差值,而后,可以基于距离差值触发执行后续的视力测试方法,具体可以参见后续实施例,在此不再赘述。In the embodiment of the present disclosure, after the target test distance between the electronic device and the eye is determined, the distance difference between the target test distance and the preset distance can be determined, and then subsequent vision tests can be triggered based on the distance difference For details about the method, refer to the subsequent embodiments, and details are not repeated here.

S206:如果距离差值小于或等于差值阈值,则确定目标测试距离满足距离条件。S206: If the distance difference is less than or equal to the difference threshold, determine that the target test distance satisfies the distance condition.

本公开实施例在确定目标测试距离和预设距离之间的距离差值,可以根据距离差值判断目标测试距离是否满足距离条件。In the embodiments of the present disclosure, when determining the distance difference between the target test distance and the preset distance, it may be determined whether the target test distance satisfies the distance condition according to the distance difference.

本公开实施例在距离差值小于或等于差值阈值时,确定目标测试距离满足距离条件。In the embodiment of the present disclosure, when the distance difference is less than or equal to the difference threshold, it is determined that the target test distance satisfies the distance condition.

S207:响应于目标测试距离满足距离条件的情况下,根据眼部图像进行视力测试。S207: In response to the condition that the target test distance satisfies the distance condition, perform vision test according to the eye image.

本公开实施例中,在确定目标测试距离满足距离条件的时,可以根据眼部图像进行视力测试。In the embodiment of the present disclosure, when it is determined that the target test distance satisfies the distance condition, the vision test may be performed according to the eye image.

可选地,一些实施例中,根据眼部图像进行视力测试,可以是根据眼部图像,确定眼部的眼部状态信息,其中,眼部状态信息是表示眼部的开合状态的信息,根据眼部状态信息,进行视力测试,从而能够根据视力测试用户的眼部开合状态触发相应的视力测试流程,避免因眼部状态无法进行视力测试时进行无效测试操作,从而能够基于眼部状态信息规范视力测试流程。Optionally, in some embodiments, performing a vision test based on an eye image may be to determine the eye state information of the eye according to the eye image, wherein the eye state information is information indicating the opening and closing state of the eye, According to the eye state information, the vision test is carried out, so that the corresponding vision test process can be triggered according to the eye opening and closing state of the vision test user, and the invalid test operation can be avoided when the vision test cannot be performed due to the eye state, so that it can be based on the eye state The information regulates the vision testing process.

本公开实施例中,根据眼部图像,确定眼部的眼部状态信息,可以对眼部图像进行瞳孔识别,在可以从眼部图像中识别到瞳孔的时,确定眼部为睁开状态,在未从眼部图像中识别到瞳孔的时,确定眼部为闭合状态,对此不做限制。In the embodiment of the present disclosure, the eye state information of the eye is determined according to the eye image, and pupil recognition can be performed on the eye image. When the pupil can be identified from the eye image, it is determined that the eye is in an open state. When the pupil is not recognized from the eye image, it is determined that the eye is in a closed state, which is not limited.

举例而言,根据眼部状态信息,进行视力测试,可以是在左眼为闭眼状态且右眼为睁眼状态时,对视力测试用户的右眼进行视力测试,在左眼为睁眼状态且右眼是闭眼状态时,对视力测试用户的左眼进行视力测试。For example, performing a vision test based on the eye state information may be to perform a vision test on the right eye of the vision test user when the left eye is closed and the right eye is open. And when the right eye is closed, the vision test is performed on the left eye of the vision test user.

或者,根据眼部状态信息,进行视力测试,还可以是在左眼为睁开状态且右眼是睁开状态,则生成闭眼提示信息,其中,闭眼提示信息用于提示视力测试用户闭上左眼或右眼,在左眼为闭合状态且右眼是闭合状态时,生成睁眼提示信息,其中,睁眼提示信息用于提示视力测试用户睁开左眼或右眼。Or, according to the eye state information, the vision test is performed, and when the left eye is in an open state and the right eye is in an open state, an eye-closed prompt message is generated, wherein the eye-closed prompt message is used to prompt the vision test user to close the eyes. For the left eye or the right eye, when the left eye is closed and the right eye is closed, an eye-opening prompt message is generated, wherein the eye-opening prompt message is used to prompt the vision test user to open the left eye or the right eye.

S208:如果距离差值大于差值阈值,则确定目标测试距离不满足距离条件。S208: If the distance difference is greater than the difference threshold, determine that the target test distance does not satisfy the distance condition.

本公开实施例在确定目标测试距离不满足距离条件的时,不进行视力测试,此外,电子设备还可以生成相应的提示消息,提示用户调整和电子设备之间的测试距离,并在用户调整和电子设备之间的测试距离之后,触发执行如上述S201-S205的步骤,直至确定目标测试距离满足距离条件。In the embodiment of the present disclosure, when it is determined that the target test distance does not meet the distance condition, the vision test is not performed. In addition, the electronic device can also generate a corresponding prompt message to prompt the user to adjust the test distance between the electronic device and the user. After testing the distance between the electronic devices, the above-mentioned steps of S201-S205 are triggered until it is determined that the target testing distance satisfies the distance condition.

本公开实施例中,通过基于拍摄参数信息,获取至少一帧人脸图像,并根预设像素尺寸信息对所述人脸图像进行调整,得到待检测图像,再从所述待检测图像中提取所述眼部图像,得到至少一帧所述眼部图像,从而能够基于预设像素尺寸信息对不同电子设备所采集的像素尺寸进行统一调整,从而可以解决不同电子设备所采集图像的像素大小不统一给视力测试带来的影响,再根据拍摄参数信息和眼部图像,确定电子设备与眼部之间的目标测试距离,再确定目标测试距离和预设距离之间的距离差值,从而能够在距离差值小于或等于差值阈值,准确地确定目标测试距离满足距离条件,并在目标测试距离满足距离条件的时,根据眼部图像进行视力测试,有效地提升视力测试的准确性,在距离差值大于差值阈值时,确定目标测试距离不满足距离条件,并在目标测试距离不满足距离条件的时,不进行视力测试,从而避免目标测试距离不满足距离条件引起无效测试操作,且能够避免在目标测试距离不满足距离条件时的视力测试结果给用户带来误导。In the embodiment of the present disclosure, at least one frame of face image is acquired based on the shooting parameter information, and the face image is adjusted according to the preset pixel size information to obtain the image to be detected, and then extracted from the image to be detected The eye image obtains at least one frame of the eye image, so that the pixel size collected by different electronic devices can be uniformly adjusted based on preset pixel size information, so that the pixel size of images collected by different electronic devices can be solved. Unify the impact on the vision test, and then determine the target test distance between the electronic device and the eye according to the shooting parameter information and the eye image, and then determine the distance difference between the target test distance and the preset distance, so as to be able to When the distance difference is less than or equal to the difference threshold, accurately determine that the target test distance satisfies the distance condition, and when the target test distance satisfies the distance condition, perform a vision test based on the eye image, effectively improving the accuracy of the vision test. When the distance difference is greater than the difference threshold, it is determined that the target test distance does not meet the distance condition, and when the target test distance does not meet the distance condition, the vision test is not performed, thereby avoiding the invalid test operation caused by the target test distance not satisfying the distance condition, and It is possible to avoid misleading the user by the visual acuity test result when the target test distance does not satisfy the distance condition.

图3是本公开另一实施例提出的视力测试方法的流程示意图。FIG. 3 is a schematic flowchart of a vision testing method proposed by another embodiment of the present disclosure.

如图3所示,该视力测试方法,包括:As shown in Figure 3, the vision testing method includes:

S301:基于拍摄参数信息,采集眼部图像。S301: Collect an eye image based on shooting parameter information.

S301的描述说明具体可以参加上述实施例,在此不再赘述。The description of S301 may specifically refer to the foregoing embodiments, and details are not repeated here.

S302:确定瞳孔局部图像相对于眼部图像的位置信息。S302: Determine the position information of the pupil partial image relative to the eye image.

其中,眼部图像中用于描述视力测试用户瞳孔的局部图像即为瞳孔局部图像。Wherein, the partial image used to describe the pupil of the vision test user in the eye image is the partial image of the pupil.

其中,位置信息用于描述瞳孔局部图像相对于眼部图像的位置,该位置信息可以例如是瞳孔局部图像某一关键点在眼部图像中的像素坐标,对此不做限制。Wherein, the position information is used to describe the position of the partial pupil image relative to the eye image, and the position information may be, for example, the pixel coordinates of a key point in the pupil partial image in the eye image, which is not limited.

本公开实施例中,确定瞳孔局部图像相对于眼部图像的位置信息,可以是将瞳孔局部图像输入至预先训练的瞳孔预测模型之中,经由瞳孔预测模型处理并输出瞳孔局部图像的关键点在眼部图像中的像素坐标,作为瞳孔局部图像相对于眼部图像的位置信息。In the embodiment of the present disclosure, determining the position information of the pupil partial image relative to the eye image may be to input the pupil partial image into a pre-trained pupil prediction model, process and output the pupil partial image through the pupil prediction model. The pixel coordinates in the eye image are used as the position information of the pupil partial image relative to the eye image.

S303:确定眼部的虹膜尺寸。S303: Determine the iris size of the eye.

其中,虹膜尺寸可以例如是虹膜直径,对此不做限制。Wherein, the iris size may be, for example, iris diameter, which is not limited.

本公开实施例中,确定眼部的虹膜尺寸,可以是确定视力测试用户群体的平均虹膜直径作为虹膜尺寸(用户群体的平均虹膜直径约为11.4mm),对此不做限制。In the embodiment of the present disclosure, determining the iris size of the eye may be to determine the average iris diameter of the vision test user group as the iris size (the average iris diameter of the user group is about 11.4mm), which is not limited.

S304:根据位置信息、虹膜尺寸以及拍摄参数信息确定电子设备与眼部之间的候选测试距离。S304: Determine a candidate test distance between the electronic device and the eye according to the position information, iris size, and shooting parameter information.

本公开实施例在确定瞳孔局部图像相对于眼部图像的位置信息,并确定眼部的虹膜尺寸之后,可以根据位置信息、虹膜尺寸以及拍摄参数信息确定电子设备与眼部之间的候选测试距离。In the embodiment of the present disclosure, after determining the position information of the pupil partial image relative to the eye image and determining the iris size of the eye, the candidate test distance between the electronic device and the eye can be determined according to the position information, iris size, and shooting parameter information .

一些实施例中,根据位置信息、虹膜尺寸以及拍摄参数信息,确定电子设备与眼部之间的候选测试距离,可以是由电子设备对位置信息、虹膜尺寸以及拍摄参数信息进行计算,以确定电子设备与眼部之间的候选测试距离,例如,可以是由电子设备训练相应的用于确定目标测试距离的深度学习模型,而后,可以是将位置信息、虹膜尺寸以及拍摄参数信息提供至深度学习模型,由深度学习模型对位置信息、虹膜尺寸以及拍摄参数信息进行处理,并确定目标测试距离,对此不做限制。In some embodiments, the candidate test distance between the electronic device and the eye is determined according to the location information, iris size, and shooting parameter information. The electronic device may calculate the location information, iris size, and shooting parameter information to determine the electronic device. The candidate test distance between the device and the eye, for example, can be trained by the electronic device to determine the corresponding deep learning model of the target test distance, and then the position information, iris size and shooting parameter information can be provided to the deep learning model Model, the position information, iris size and shooting parameter information are processed by the deep learning model, and the target test distance is determined, which is not limited.

本公开实施例中,位置信息包括:瞳孔局部图像中至少一个关键点的初始关键点坐标,拍摄参数信息包括:拍摄装置的焦距。In the embodiment of the present disclosure, the position information includes: the initial key point coordinates of at least one key point in the partial image of the pupil, and the shooting parameter information includes: the focal length of the shooting device.

其中,瞳孔局部图像的关键点,可以例如是瞳孔中心点,和以瞳孔中心点为对称中心位于瞳孔局部图像边缘的多个关键点,如图4所示,图4是本公开一实施例提出的瞳孔局部图像中关键点的示意图。Among them, the key point of the partial image of the pupil can be, for example, the central point of the pupil, and a plurality of key points located at the edge of the partial image of the pupil with the central point of the pupil as a symmetrical center, as shown in FIG. 4 , which is a proposed embodiment of the present disclosure. Schematic representation of keypoints in the pupil partial image of .

其中,瞳孔局部图像中的关键点在瞳孔局部图像中的像素坐标即可以被称为初始关键点坐标。Wherein, the pixel coordinates of the key points in the pupil partial image in the pupil partial image may be referred to as initial key point coordinates.

可选地,一些实施例中,根据位置信息、虹膜直径以及拍摄参数信息确定电子设备与眼部之间的候选测试距离,可以是确定关键点在待检测图像中的目标关键点坐标,并根据至少两个目标关键点坐标,确定瞳孔局部图像的瞳孔尺寸,再确定虹膜尺寸和焦距之间的乘积,并将乘积和瞳孔尺寸之间的比值作为候选测试距离,从而电子设备能够基于位置信息、虹膜直径以及拍摄参数信息,准确地确定电子设备与眼部之间的候选测试距离。Optionally, in some embodiments, determining the candidate test distance between the electronic device and the eye according to the position information, iris diameter and shooting parameter information may be to determine the target key point coordinates of the key point in the image to be detected, and according to At least two target key point coordinates, determine the pupil size of the pupil partial image, then determine the product between the iris size and the focal length, and use the ratio between the product and the pupil size as a candidate test distance, so that the electronic device can be based on position information, Iris diameter and shooting parameter information to accurately determine the candidate test distance between the electronic device and the eye.

其中,瞳孔尺寸是指,瞳孔局部图像所描述瞳孔的瞳孔直径,对此不做限制。Wherein, the pupil size refers to the pupil diameter of the pupil described in the pupil partial image, which is not limited.

本公开实施例中,可以是将瞳孔局部图像中的关键点映射至待检测图像中,并确定瞳孔局部图像中的关键点在待检测图像中的像素坐标作为目标关键点坐标。In the embodiment of the present disclosure, the key points in the partial image of the pupil may be mapped to the image to be detected, and the pixel coordinates of the key points in the partial image of the pupil in the image to be detected may be determined as the coordinates of the target key point.

本公开实施例中,参见上述图4,根据至少两个目标关键点坐标,确定瞳孔局部图像的瞳孔尺寸,可以例如是选取点1和点3两个关键点的目标关键点坐标,而后,可以将点1和点3两个关键点的目标关键点坐标之间的距离确定为瞳孔尺寸。In the embodiment of the present disclosure, referring to the above-mentioned FIG. 4 , according to at least two target key point coordinates, the pupil size of the pupil partial image can be determined, for example, by selecting the target key point coordinates of the two key points of point 1 and point 3, and then, can The distance between the target keypoint coordinates of the two keypoints of point 1 and point 3 is determined as the pupil size.

本公开实施例在确定瞳孔尺寸,焦距以及虹膜尺寸之后,可以确定瞳孔局部图像的瞳孔尺寸,再确定虹膜尺寸和焦距之间的乘积,并将乘积和瞳孔尺寸之间的比值作为候选测试距离D,如下式所示:In the embodiment of the present disclosure, after determining the pupil size, focal length, and iris size, the pupil size of the pupil partial image can be determined, and then the product between the iris size and the focal length can be determined, and the ratio between the product and the pupil size can be used as a candidate test distance D , as shown in the following formula:

Figure BDA0004211462360000071
Figure BDA0004211462360000071

其中,H表示虹膜尺寸,h表示瞳孔尺寸,D表示候选测试距离,d表示电子设备摄像装置的焦距。Wherein, H represents the iris size, h represents the pupil size, D represents the candidate test distance, and d represents the focal length of the camera device of the electronic device.

S305:根据至少一个候选测试距离,确定目标测试距离。S305: Determine a target test distance according to at least one candidate test distance.

本公开实施例在确定电子设备与眼部之间的多个候选测试距离之后,可以根据至少一个候选测试距离,确定目标测试距离。In the embodiment of the present disclosure, after determining multiple candidate test distances between the electronic device and the eye, a target test distance may be determined according to at least one candidate test distance.

一些实施例中,根据至少一个候选测试距离,确定目标测试距离,可以是将多个候选测试距离之中的任一候选测试距离确定为目标测试距离,或者,还可以是在某一候选测试距离和预设测试距离相同时,将与预设测试距离相同的候选测试距离确定为目标测试距离,对此不做限制。In some embodiments, determining the target test distance according to at least one candidate test distance may be determining any candidate test distance among a plurality of candidate test distances as the target test distance, or may also be within a certain candidate test distance When it is the same as the preset test distance, the candidate test distance that is the same as the preset test distance is determined as the target test distance, which is not limited.

可选地,一些实施例中,根据至少一个候选测试距离,确定目标测试距离,可以是在候选测试距离为多个时,将至少部分候选测试距离划分入测试距离组,得到多个测试距离组,并确定每个测试距离组中至少部分候选测试距离之间的距离标准差和平均距离,再在测试距离组中所有的候选测试距离和平均距离之间的距离差值均小于目标乘积值时,将测试距离组中任一个候选测试距离作为目标测试距离,其中,目标乘积值是预设倍数和距离标准差之间的乘积值,由此,可以实现对多个候选测试距离进行分组筛选,从而保障后续处理过程的稳定性,避免后续目标测试距离频繁不达标而影响整体视力测试进度。Optionally, in some embodiments, according to at least one candidate test distance, determining the target test distance may be when there are multiple candidate test distances, dividing at least part of the candidate test distances into test distance groups to obtain multiple test distance groups , and determine the distance standard deviation and average distance between at least some candidate test distances in each test distance group, and then when the distance difference between all candidate test distances and the average distance in the test distance group is less than the target product value , using any candidate test distance in the test distance group as the target test distance, wherein the target product value is the product value between the preset multiple and the standard deviation of the distance, thus, multiple candidate test distances can be grouped and screened, In this way, the stability of the follow-up processing process is guaranteed, and the follow-up target test distance is frequently not up to standard, which will affect the progress of the overall vision test.

其中,测试距离组中可以包含n个候选测试距离。Wherein, the test distance group may include n candidate test distances.

也即是说,本公开实施例在确定多个候选测试距离之后,可以将多个候选测试距离划分入测试距离中,每个测试距离租中包含n个候选测试距离。That is to say, in the embodiment of the present disclosure, after the multiple candidate test distances are determined, the multiple candidate test distances may be divided into test distances, and each test distance L includes n candidate test distances.

本公开实施例中,可以确定每个测试距离组中至少部分候选测试距离之间的平均距离M,并联合平均距离确定每个测试距离组中至少部分候选测试距离之间的距离方差S2,如下式所示:In the embodiment of the present disclosure, the average distance M between at least some of the candidate test distances in each test distance group can be determined, and the distance variance S2 between at least some of the candidate test distances in each test distance group can be determined jointly with the average distance, as follows The formula shows:

Figure BDA0004211462360000081
Figure BDA0004211462360000081

其中,S2表示距离标准差,n表示一个测试距离组中候选测试距离的个数,M为每个测试距离组中至少部分候选测试距离之间的平均距离,xn表示候选测试距离。Among them, S2 represents the distance standard deviation, n represents the number of candidate test distances in a test distance group, M is the average distance between at least some candidate test distances in each test distance group, and xn represents candidate test distances.

而后,可以确定每个测试距离组中至少部分候选测试距离之间的距离标准差σ:Then, the distance standard deviation σ between at least some of the candidate test distances in each test distance group can be determined:

Figure BDA0004211462360000082
Figure BDA0004211462360000082

在测试距离组中所有的候选测试距离和平均距离之间的距离差值均小于目标乘积值时,将测试距离组中任一个候选测试距离作为目标测试距离,其中,目标乘积值是预设倍数和距离标准差之间的乘积值(例如,0.5*σ,对此不做限制),即可以是在xn-M<0.5*σ时,将该测试距离组中的任一候选测试距离确定为目标测试距离,而后,可以基于目标距离进行视力测试,具体可以参见后续实施例,在此不再赘述。When the distance difference between all candidate test distances and the average distance in the test distance group is less than the target product value, any candidate test distance in the test distance group is used as the target test distance, wherein the target product value is a preset multiple and the product value (for example, 0.5*σ, which is not limited) between the distance standard deviation, that is, when xn-M<0.5*σ, any candidate test distance in the test distance group is determined as The target test distance, and then, the vision test may be performed based on the target distance. For details, please refer to the subsequent embodiments, which will not be repeated here.

S306:根据眼部图像和目标测试距离,进行视力测试。S306: Perform a vision test according to the eye image and the target test distance.

S306的描述说明具体可以参见上述实施例,在此不再赘述。For the description of S306, reference may be made to the foregoing embodiments for details, and details are not repeated here.

本公开实施例中,基于拍摄参数信息,采集眼部图像,再确定瞳孔局部图像相对于眼部图像的位置信息,再确定眼部的虹膜尺寸,再根据位置信息、虹膜尺寸以及拍摄参数信息确定电子设备与眼部之间的候选测试距离,从而电子设备能够基于位置信息、虹膜直径以及拍摄参数信息,准确地确定电子设备与眼部之间的候选测试距离,再根据至少一个候选测试距离,确定目标测试距离,并根据眼部图像和目标测试距离,进行视力测试,从而电子设备能够基于拍摄参数信息和眼部图像,准确地确定电子设备与眼部之间的目标测试距离,而后能够基于眼部图像和目标测试距离,有效地提升视力测试的准确性。In the embodiment of the present disclosure, based on the shooting parameter information, the eye image is collected, and then the position information of the pupil partial image relative to the eye image is determined, and then the iris size of the eye is determined, and then determined according to the position information, iris size and shooting parameter information. The candidate test distance between the electronic device and the eye, so that the electronic device can accurately determine the candidate test distance between the electronic device and the eye based on the position information, iris diameter and shooting parameter information, and then according to at least one candidate test distance, Determine the target test distance, and perform a vision test based on the eye image and the target test distance, so that the electronic device can accurately determine the target test distance between the electronic device and the eye based on the shooting parameter information and the eye image, and then based on Eye image and target test distance can effectively improve the accuracy of vision test.

图5是本公开一实施例提出的视力测试方法的流程示意图。FIG. 5 is a schematic flowchart of a vision testing method proposed by an embodiment of the present disclosure.

如图5所示,该视力测试方法,包括:As shown in Figure 5, the vision testing method includes:

S501:基于拍摄参数信息,获取至少一帧人脸图像。S501: Acquire at least one frame of face image based on shooting parameter information.

S502:根据预设像素尺寸信息对人脸图像进行调整,得到待检测图像。S502: Adjust the face image according to preset pixel size information to obtain an image to be detected.

S503:从待检测图像中提取眼部图像,得到至少一帧眼部图像。S503: Extract an eye image from the image to be detected to obtain at least one frame of eye image.

S504:根据拍摄参数信息和眼部图像,确定电子设备与眼部之间的目标测试距离。S504: Determine a target test distance between the electronic device and the eye according to the shooting parameter information and the eye image.

S505:确定目标测试距离和预设距离之间的距离差值。S505: Determine the distance difference between the target test distance and the preset distance.

S506:如果距离差值小于或等于差值阈值,则确定目标测试距离满足距离条件。S506: If the distance difference is less than or equal to the difference threshold, determine that the target test distance satisfies the distance condition.

S501-S506的描述说明具体可以参见上述实施例,在此不再赘述。For the description of S501-S506, reference may be made to the foregoing embodiments for details, and details are not repeated here.

S507:响应于目标测试距离满足距离条件的情况下,在预设时长内显示测试标记,其中,测试标记具有对应的测试信息。S507: In response to the fact that the target test distance satisfies the distance condition, display a test mark within a preset time period, wherein the test mark has corresponding test information.

其中,测试标记是在视力测试过程中用于给视力测试用户辨认的字符,图案等,例如,“E”,用于提供给小朋友辨认的动物图案等,对此不做限制。Wherein, the test mark is a character, a pattern, etc. used for recognition by the vision test user during the vision test, for example, "E", an animal pattern for children to recognize, and there is no limitation on this.

其中,测试信息可以是与测试标记对应的视力值,对此不做限制。Wherein, the test information may be the visual acuity value corresponding to the test mark, which is not limited.

本公开实施例在确定目标测试距离满足距离条件的情况下,可以由电子设备的显示界面中显示预设时长的具有相应测试信息的测试标记。In the embodiment of the present disclosure, when it is determined that the target test distance satisfies the distance condition, the display interface of the electronic device may display a test mark with corresponding test information for a preset duration.

S508:获取测试匹配信息,其中,测试匹配信息用于描述在预设时长内用户对测试标记的辨认结果和测试标记的匹配情况。S508: Obtain test matching information, wherein the test matching information is used to describe a matching situation between the user's identification result of the test mark and the test mark within a preset time period.

其中,测试匹配信息用于描述在预设时长内用户对测试标记的辨认结果和测试标记的匹配情况。Wherein, the test matching information is used to describe the matching between the user's identification result of the test mark and the test mark within a preset time period.

也即是说,本公开实施例中,电子设备在预设时长内显示完成测试标记之后,可以接收视力测试用户对测试标记的辨认结果,并对辨认结果和测试标记进行比对处理,并在辨认结果和测试标记相同时,确定辨认结果和测试标记相匹配,在辨认结果和测试标记不相同时,确定辨认结果和测试标记不匹配。That is to say, in the embodiment of the present disclosure, after the electronic device displays the completion of the test mark within a preset period of time, it can receive the recognition result of the test mark by the vision test user, compare the recognition result with the test mark, and When the recognition result is identical to the test mark, it is determined that the recognition result matches the test mark, and when the recognition result is different from the test mark, it is determined that the recognition result does not match the test mark.

S509:根据测试匹配信息和测试信息,进行视力测试。S509: Perform a vision test according to the test matching information and the test information.

可选地,一些实施例中,根据测试匹配信息和测试信息,进行视力测试,可以是在测试匹配信息指示辨认结果和测试标记不匹配,则显示第一测试标记,并对测试匹配信息的数量进行计数,得到第一次数,其中,测试标记和第一测试标记之间的标记尺寸相同,在第一次数达到第一次数阈值时,显示第二测试标记,直至基于第二测试标记得到的辨认结果和第二测试标记匹配,将第二测试标记的测试信息作为视力测试结果,其中,第二测试标记的标记尺寸大于测试标记。Optionally, in some embodiments, the vision test is performed according to the test matching information and the test information. When the test matching information indicates that the recognition result does not match the test marks, the first test mark is displayed, and the number of test matching information Counting is performed to obtain the first number, wherein the mark size between the test mark and the first test mark is the same, and when the first number reaches the first number threshold, the second test mark is displayed until the second test mark is based on the second test mark The obtained identification result is matched with the second test mark, and the test information of the second test mark is used as the vision test result, wherein the mark size of the second test mark is larger than the test mark.

本公开实施例中,测试标记的数量是多个,至少部分测试标记之间的标记尺寸相同。In the embodiment of the present disclosure, there are multiple test marks, and at least some of the test marks have the same size.

其中,第一测试标记是与先前显示的测试标记尺寸相同的测试标记,第二测试标记是大于先前显示的测试标记尺寸的测试标记。Wherein, the first test mark is a test mark with the same size as the previously displayed test mark, and the second test mark is a test mark with a larger size than the previously displayed test mark.

也即是说,本公开实施例中,可以是在测试匹配信息指示辨认结果和测试标记不匹配时,显示与先前显示的测试标记尺寸相同的第一测试标记,并对测试匹配信息的数量进行计数,以得到第一次数,并在第一次数达到第一次数阈值时,显示标记尺寸大于先前显示测试标记的第二测试标记,直至基于第二测试标记得到的辨认结果和第二测试标记匹配,将第二测试标记的测试信息作为视力测试结果。That is to say, in the embodiment of the present disclosure, when the test matching information indicates that the recognition result does not match the test mark, the first test mark with the same size as the previously displayed test mark may be displayed, and the number of test matching information may be calculated. Counting to obtain the first number, and when the first number reaches the first number threshold, the size of the display mark is larger than the second test mark of the previously displayed test mark, until the recognition result obtained based on the second test mark and the second test mark The test marks are matched, and the test information of the second test mark is used as the vision test result.

S510:如果距离差值大于差值阈值,则确定目标测试距离不满足距离条件。S510: If the distance difference is greater than the difference threshold, determine that the target test distance does not satisfy the distance condition.

S510-S510的描述说明具体可以参见上述实施例,在此不再赘述。For the description of S510-S510, reference may be made to the foregoing embodiments for details, and details are not repeated here.

本公开实施例中,通过基于拍摄参数信息,获取至少一帧人脸图像,并根据预设像素尺寸信息对人脸图像进行调整,得到待检测图像,再从待检测图像中提取眼部图像,得到至少一帧眼部图像,再根据拍摄参数信息和眼部图像,确定电子设备与眼部之间的目标测试距离,并确定目标测试距离和预设距离之间的距离差值,再确定目标测试距离和预设距离之间的距离差值,从而能够在距离差值小于或等于差值阈值,准确地确定目标测试距离满足距离条件,并在目标测试距离满足距离条件的情况下,在预设时长内显示测试标记,其中,测试标记具有对应的测试信息,并获取测试匹配信息,其中,测试匹配信息用于描述在预设时长内用户对测试标记的辨认结果和测试标记的匹配情况,再根据测试匹配信息和测试信息,进行视力测试,从而提升视力测试操作的便捷性,从而用户能够联合电子设备显示的测试标记自行进行视力测试,有效地提升视力测试的准确性,在距离差值大于差值阈值时,确定目标测试距离不满足距离条件,并在目标测试距离不满足距离条件的情况下,不进行视力测试,从而避免目标测试距离不满足距离条件引起无效测试操作,且能够避免在目标测试距离不满足距离条件时的视力测试结果给用户带来误导。In the embodiment of the present disclosure, at least one frame of face image is obtained based on the shooting parameter information, and the face image is adjusted according to the preset pixel size information to obtain the image to be detected, and then the eye image is extracted from the image to be detected, Obtain at least one frame of the eye image, and then determine the target test distance between the electronic device and the eye according to the shooting parameter information and the eye image, and determine the distance difference between the target test distance and the preset distance, and then determine the target The distance difference between the test distance and the preset distance, so that when the distance difference is less than or equal to the difference threshold, it can be accurately determined that the target test distance satisfies the distance condition, and when the target test distance satisfies the distance condition, the preset Display test marks within a preset time period, wherein the test marks have corresponding test information, and obtain test matching information, wherein the test matching information is used to describe the matching between the user's identification result of the test mark and the test mark within a preset time period, According to the test matching information and test information, the vision test is carried out, thereby improving the convenience of the vision test operation, so that the user can combine the test marks displayed by the electronic device to conduct the vision test by themselves, effectively improving the accuracy of the vision test. When it is greater than the difference threshold, it is determined that the target test distance does not meet the distance condition, and when the target test distance does not meet the distance condition, the vision test is not performed, thereby avoiding invalid test operations caused by the target test distance not satisfying the distance condition, and can avoid The vision test result when the target test distance does not satisfy the distance condition is misleading to the user.

图6是本公开一实施例提出的视力测试装置的结构示意图。Fig. 6 is a schematic structural diagram of a vision testing device proposed by an embodiment of the present disclosure.

如图6所示,该视力测试装置60,包括:As shown in Figure 6, the vision testing device 60 includes:

采集模块601,用于基于拍摄参数信息,采集眼部图像;An acquisition module 601, configured to acquire eye images based on shooting parameter information;

确定模块602,用于根据拍摄参数信息和眼部图像,确定电子设备与眼部之间的目标测试距离;A determination module 602, configured to determine the target test distance between the electronic device and the eye according to the shooting parameter information and the eye image;

处理模块603,用于根据眼部图像和目标测试距离,进行视力测试。The processing module 603 is configured to perform a vision test according to the eye image and the target test distance.

在本公开的一些实施例中,处理模块603,还用于:In some embodiments of the present disclosure, the processing module 603 is further configured to:

响应于目标测试距离满足距离条件的情况下,根据眼部图像进行视力测试。In response to the fact that the target test distance satisfies the distance condition, the vision test is performed according to the eye image.

在本公开的一些实施例中,眼部图像的帧数是至少一帧;其中,采集模块601,还用于:In some embodiments of the present disclosure, the number of frames of the eye image is at least one frame; wherein, the collection module 601 is also used for:

基于拍摄参数信息,获取至少一帧人脸图像;Acquiring at least one frame of face image based on shooting parameter information;

根据预设像素尺寸信息对人脸图像进行调整,得到待检测图像;Adjust the face image according to the preset pixel size information to obtain the image to be detected;

从待检测图像中提取眼部图像,得到至少一帧眼部图像。The eye image is extracted from the image to be detected to obtain at least one frame of the eye image.

在本公开的一些实施例中,眼部图像包括:瞳孔局部图像和虹膜局部图像;其中,确定模块602,还用于:In some embodiments of the present disclosure, the eye image includes: a partial image of the pupil and a partial image of the iris; wherein, the determination module 602 is also used for:

确定瞳孔局部图像相对于眼部图像的位置信息;Determine the position information of the pupil partial image relative to the eye image;

确定眼部的虹膜尺寸;Determine the iris size of the eye;

根据位置信息、虹膜尺寸以及拍摄参数信息确定电子设备与眼部之间的候选测试距离;Determine the candidate test distance between the electronic device and the eye according to the position information, iris size and shooting parameter information;

根据至少一个候选测试距离,确定目标测试距离。A target test distance is determined based on at least one candidate test distance.

在本公开的一些实施例中,位置信息包括:瞳孔局部图像中至少一个关键点的初始关键点坐标,拍摄参数信息包括:拍摄装置的焦距;In some embodiments of the present disclosure, the location information includes: the initial key point coordinates of at least one key point in the partial pupil image, and the shooting parameter information includes: the focal length of the shooting device;

其中,确定模块602,还用于:Wherein, the determining module 602 is also used for:

确定关键点在待检测图像中的目标关键点坐标;Determine the target key point coordinates of the key point in the image to be detected;

根据至少两个目标关键点坐标,确定瞳孔局部图像的瞳孔尺寸;Determine the pupil size of the pupil partial image according to the coordinates of at least two target key points;

确定虹膜尺寸和焦距之间的乘积,并将乘积和瞳孔尺寸之间的比值作为候选测试距离。Determine the product between iris size and focal length, and use the ratio between the product and pupil size as a candidate test distance.

在本公开的一些实施例中,确定模块602,还用于:In some embodiments of the present disclosure, the determining module 602 is further configured to:

如果候选测试距离为多个,则将至少部分候选测试距离划分入测试距离组,得到多个测试距离组;If there are multiple candidate test distances, at least part of the candidate test distances are divided into test distance groups to obtain multiple test distance groups;

确定每个测试距离组中至少部分候选测试距离之间的距离标准差和平均距离;determining a distance standard deviation and an average distance between at least some of the candidate test distances in each test distance group;

如果测试距离组中所有的候选测试距离和平均距离之间的距离差值均小于目标乘积值,则将测试距离组中任一个候选测试距离作为目标测试距离,其中,目标乘积值是预设倍数和距离标准差之间的乘积值。If the distance difference between all candidate test distances and the average distance in the test distance group is less than the target product value, any candidate test distance in the test distance group is used as the target test distance, wherein the target product value is a preset multiple and the distance standard deviation.

在本公开的一些实施例中,处理模块603,还用于:In some embodiments of the present disclosure, the processing module 603 is further configured to:

根据眼部图像,确定眼部的眼部状态信息,其中,眼部状态信息是表示眼部的开合状态的信息;Determine the eye state information of the eye according to the eye image, wherein the eye state information is information indicating the opening and closing state of the eye;

根据眼部状态信息,进行视力测试。Based on the eye status information, a vision test is performed.

在本公开的一些实施例中,处理模块603,还用于:In some embodiments of the present disclosure, the processing module 603 is further configured to:

在预设时长内显示测试标记,其中,测试标记具有对应的测试信息;Displaying test marks within a preset duration, wherein the test marks have corresponding test information;

获取测试匹配信息,其中,测试匹配信息用于描述在预设时长内用户对测试标记的辨认结果和测试标记的匹配情况;Obtaining test matching information, wherein the test matching information is used to describe the user's recognition result of the test mark and the matching situation of the test mark within a preset time period;

根据测试匹配信息和测试信息,进行视力测试。Based on the test matching information and the test information, a vision test is performed.

在本公开的一些实施例中,述测试标记的数量是多个,至少部分测试标记之间的标记尺寸相同;其中,处理模块603,还用于:In some embodiments of the present disclosure, the number of test marks is multiple, and at least some of the test marks have the same size; wherein, the processing module 603 is also used to:

如果测试匹配信息指示辨认结果和测试标记不匹配,则显示第一测试标记,并对测试匹配信息的数量进行计数,得到第一次数,其中,测试标记和第一测试标记之间的标记尺寸相同;If the test matching information indicates that the recognition result does not match the test mark, then display the first test mark, and count the number of test match information to obtain the first number, wherein the mark size between the test mark and the first test mark same;

如果第一次数达到第一次数阈值,则显示第二测试标记,直至基于第二测试标记得到的辨认结果和第二测试标记匹配,将第二测试标记的测试信息作为视力测试结果,其中,第二测试标记的标记尺寸大于测试标记。If the first number reaches the first number threshold, the second test mark is displayed until the identification result obtained based on the second test mark matches the second test mark, and the test information of the second test mark is used as the vision test result, wherein , the mark size of the second test mark is larger than the test mark.

在本公开的一些实施例中,处理模块603,还用于:In some embodiments of the present disclosure, the processing module 603 is further configured to:

确定目标测试距离和预设距离之间的距离差值;Determine the distance difference between the target test distance and the preset distance;

如果距离差值小于或等于差值阈值,则确定目标测试距离满足距离条件;If the distance difference is less than or equal to the difference threshold, it is determined that the target test distance satisfies the distance condition;

如果距离差值大于差值阈值,则确定目标测试距离不满足距离条件。If the distance difference is greater than the difference threshold, it is determined that the target test distance does not satisfy the distance condition.

与上述图1至图5实施例提供的视力测试方法相对应,本公开还提供一种视力测试装置,由于本公开实施例提供的视力测试装置与上述图1至图5实施例提供的视力测试方法相对应,因此在视力测试方法的实施方式也适用于本公开实施例提供的视力测试装置,在本公开实施例中不再详细描述。Corresponding to the vision testing method provided by the embodiments of FIGS. 1 to 5 above, the present disclosure also provides a vision testing device. The method is corresponding, so the implementation of the vision testing method is also applicable to the vision testing device provided in the embodiments of the present disclosure, and will not be described in detail in the embodiments of the present disclosure.

本实施例中,通过基于拍摄参数信息,采集眼部图像,并根据拍摄参数信息和眼部图像,确定电子设备与眼部之间的目标测试距离,再根据眼部图像和目标测试距离,进行视力测试,从而电子设备能够基于拍摄参数信息和眼部图像,准确地确定电子设备与眼部之间的目标测试距离,而后能够基于眼部图像和目标测试距离,有效地提升视力测试的准确性。In this embodiment, the eye image is collected based on the shooting parameter information, and the target test distance between the electronic device and the eye is determined according to the shooting parameter information and the eye image, and then the target test distance is determined according to the eye image and the target test distance. Vision test, so that the electronic device can accurately determine the target test distance between the electronic device and the eye based on the shooting parameter information and the eye image, and then can effectively improve the accuracy of the vision test based on the eye image and the target test distance .

为了实现上述实施例,本公开还提出一种电子设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时,实现如本公开前述实施例提出的视力测试方法。In order to realize the above embodiments, the present disclosure also proposes an electronic device, including: a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the program, the foregoing embodiments of the present disclosure are implemented. Proposed vision testing method.

为了实现上述实施例,本公开还提出一种非临时性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开前述实施例提出的视力测试方法。In order to realize the above-mentioned embodiments, the present disclosure also proposes a non-transitory computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the vision testing method as proposed in the foregoing embodiments of the present disclosure is implemented.

为了实现上述实施例,本公开还提出一种计算机程序产品,当计算机程序产品中的指令处理器执行时,执行如本公开前述实施例提出的视力测试方法。In order to realize the above-mentioned embodiments, the present disclosure also proposes a computer program product. When the instruction processor in the computer program product executes, the eyesight testing method provided in the foregoing embodiments of the present disclosure is executed.

图7示出了适于用来实现本公开实施方式的示例性电子设备的框图。图7显示的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。FIG. 7 shows a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure. The electronic device shown in FIG. 7 is only an example, and should not limit the functions and application scope of the embodiments of the present disclosure.

如图7所示,电子设备以通用计算设备的形式表现。电子设备的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。As shown in Figure 7, the electronic device takes the form of a general-purpose computing device. Components of the electronic device may include, but are not limited to: one or more processors or processing units 16, system memory 28, bus 18 connecting various system components including system memory 28 and processing unit 16.

总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(Industry StandardArchitecture;以下简称:ISA)总线,微通道体系结构(Micro Channel Architecture;以下简称:MAC)总线,增强型ISA总线、视频电子标准协会(Video Electronics StandardsAssociation;以下简称:VESA)局域总线以及外围组件互连(Peripheral ComponentInterconnection;以下简称:PCI)总线。Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (Industry Standard Architecture; hereinafter referred to as: ISA) bus, Micro Channel Architecture (Micro Channel Architecture; hereinafter referred to as: MAC) bus, enhanced ISA bus, video electronics standard Association (Video Electronics Standards Association; hereinafter referred to as: VESA) local bus and peripheral component interconnection (Peripheral Component Interconnection; hereinafter referred to as: PCI) bus.

电子设备典型地包括多种计算机系统可读介质。这些介质可以是任何能够被电子设备访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。Electronic devices typically include a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device and include both volatile and nonvolatile media, removable and non-removable media.

存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(Random Access Memory;以下简称:RAM)30和/或高速缓存存储器32。电子设备可以进一步包括其他可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可移动的、非易失性磁介质(图7未显示,通常称为“硬盘驱动器”)。The memory 28 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (Random Access Memory; hereinafter referred to as: RAM) 30 and/or a cache memory 32 . The electronic device may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 7, commonly referred to as a "hard drive").

尽管图7中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如:光盘只读存储器(Compact Disc Read OnlyMemory;以下简称:CD-ROM)、数字多功能只读光盘(Digital Video Disc Read OnlyMemory;以下简称:DVD-ROM)或者其他光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本公开各实施例的功能。Although not shown in FIG. 7, a disk drive for reading and writing to a removable nonvolatile disk (such as a "floppy disk") may be provided, as well as a disk drive for removable nonvolatile disks (such as a CD-ROM (Compact Disc Read Only Memory (hereinafter referred to as: CD-ROM), Digital Video Disc Read Only Memory (hereinafter referred to as: DVD-ROM) or other optical media) read and write optical disc drives. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present disclosure.

具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如存储器28中,这样的程序模块42包括但不限于操作系统、一个或者多个应用程序、其他程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本公开所描述的实施例中的功能和/或方法。Program/utility 40 may be stored, for example, in memory 28 as a set (at least one) of program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data , each or some combination of these examples may include implementations of network environments. The program modules 42 generally perform the functions and/or methods of the embodiments described in this disclosure.

电子设备也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该电子设备交互的设备通信,和/或与使得该电子设备能与一个或多个其他计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口22进行。并且,电子设备还可以通过网络适配器20与一个或者多个网络(例如局域网(Local Area Network;以下简称:LAN),广域网(WideArea Network;以下简称:WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器20通过总线18与电子设备的其他模块通信。应当明白,尽管图中未示出,可以结合电子设备使用其他硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The electronic device may also communicate with one or more external devices 14 (e.g., a keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to An electronic device is any device (eg, network card, modem, etc.) capable of communicating with one or more other computing devices. Such communication may occur through input/output (I/O) interface 22 . Moreover, the electronic device can also communicate with one or more networks (such as a local area network (Local Area Network; hereinafter referred to as: LAN), a wide area network (WideArea Network; hereinafter referred to as: WAN) and/or a public network such as the Internet) through the network adapter 20. . As shown, network adapter 20 communicates with other modules of the electronic device via bus 18 . It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and Data backup storage system, etc.

处理单元16通过运行存储在系统存储器28中的程序,从而执行各种功能应用以及数据处理,例如实现前述实施例中提及的视力测试方法。The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28 , such as implementing the vision testing method mentioned in the foregoing embodiments.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其他实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. The present disclosure is intended to cover any modification, use or adaptation of the present disclosure. These modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

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

需要说明的是,在本公开的描述中,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。此外,在本公开的描述中,除非另有说明,“多个”的含义是两个或两个以上。It should be noted that, in the description of the present disclosure, terms such as "first" and "second" are used for description purposes only, and should not be understood as indicating or implying relative importance. In addition, in the description of the present disclosure, unless otherwise specified, "plurality" means two or more.

流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本公开的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本公开的实施例所属技术领域的技术人员所理解。Any process or method descriptions in flowcharts or otherwise described herein may be understood to represent modules, segments or portions of code comprising one or more executable instructions for implementing specific logical functions or steps of the process , and the scope of preferred embodiments of the present disclosure includes additional implementations in which functions may be performed out of the order shown or discussed, including substantially concurrently or in reverse order depending on the functions involved, which shall It is understood by those skilled in the art to which the embodiments of the present disclosure pertain.

应当理解,本公开的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present disclosure may be implemented in hardware, software, firmware or a combination thereof. In the embodiments described above, various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques known in the art: Discrete logic circuits, ASICs with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those of ordinary skill in the art can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. During execution, one or a combination of the steps of the method embodiments is included.

此外,在本公开各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing module, each unit may exist separately physically, or two or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.

上述提到的存储介质可以是只读存储器,磁盘或光盘等。The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本公开的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present disclosure. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

尽管上面已经示出和描述了本公开的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本公开的限制,本领域的普通技术人员在本公开的范围内可以对上述实施例进行变化、修改、替换和变型。Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limitations on the present disclosure, and those skilled in the art can understand the above-mentioned embodiments within the scope of the present disclosure. The embodiments are subject to changes, modifications, substitutions and variations.

Claims (13)

1. A vision testing method, performed by an electronic device, the method comprising:
acquiring an eye image based on shooting parameter information;
determining a target test distance between the electronic equipment and the eyes according to the shooting parameter information and the eye images;
and performing vision testing according to the eye images and the target testing distance.
2. The method of claim 1, wherein said performing a vision test based on said eye image and said target test distance comprises:
and in response to the target test distance meeting a distance condition, performing the vision test according to the eye image.
3. The method of claim 2, wherein the number of frames of the ocular image is at least one frame; wherein, based on shooting parameter information, gather eye image, include:
Acquiring at least one frame of face image based on shooting parameter information;
adjusting the face image according to preset pixel size information to obtain an image to be detected;
and extracting the eye image from the image to be detected to obtain at least one frame of eye image.
4. The method of claim 3, wherein the ocular image comprises: pupil partial images and iris partial images;
the determining, according to the shooting parameter information and the eye image, a target test distance between the electronic device and the eye includes:
determining positional information of the pupil partial image relative to the eye image;
determining an iris size of the eye;
determining candidate test distances between the electronic equipment and the eyes according to the position information, the iris size and the shooting parameter information;
and determining the target test distance according to at least one candidate test distance.
5. The method of claim 4, wherein the location information comprises: the initial key point coordinates of at least one key point in the pupil partial image, and the shooting parameter information includes: a focal length of the photographing device;
Wherein the determining a candidate test distance between the electronic device and the eye according to the position information, the iris diameter and the photographing parameter information includes:
determining target key point coordinates of the key points in the image to be detected;
determining the pupil size of the pupil partial image according to at least two target key point coordinates;
and determining the product between the iris size and the focal length, and taking the ratio between the product and the pupil size as the candidate test distance.
6. The method of claim 4, wherein said determining said target test distance based on at least one of said candidate test distances comprises:
if the candidate test distances are multiple, dividing at least part of the candidate test distances into test distance groups to obtain multiple test distance groups;
determining a standard deviation and an average distance between at least some of the candidate test distances in each of the test distance groups;
and if the distance difference between all the candidate test distances and the average distance in the test distance group is smaller than a target product value, taking any one of the candidate test distances in the test distance group as the target test distance, wherein the target product value is a product value between a preset multiple and the distance standard deviation.
7. The method of claim 2, wherein said performing said vision test from said eye image comprises:
determining eye state information of the eyes according to the eye images, wherein the eye state information is information representing the opening and closing states of the eyes;
and carrying out the vision test according to the eye state information.
8. The method of any one of claims 1-7, wherein performing a vision test comprises:
displaying a test mark within a preset time length, wherein the test mark has corresponding test information;
obtaining test matching information, wherein the test matching information is used for describing the recognition result of the user on the test mark and the matching condition of the test mark within the preset time length;
and performing the vision test according to the test matching information and the test information.
9. The method of claim 8, wherein the number of test marks is a plurality, at least some of the marks between the test marks being the same size; wherein, according to the test matching information and the test information, performing the vision test includes:
If the test matching information indicates that the identification result is not matched with the test mark, displaying a first test mark, and counting the number of the test matching information to obtain a first number of times, wherein the sizes of the test mark and the first test mark are the same;
and if the first time number reaches a first time number threshold value, displaying a second test mark until the identification result obtained based on the second test mark is matched with the second test mark, and taking the test information of the second test mark as a vision test result, wherein the mark size of the second test mark is larger than that of the test mark.
10. The method of claim 2, wherein the method further comprises:
determining a distance difference value between the target test distance and a preset distance;
if the distance difference is less than or equal to a difference threshold, determining that the target test distance meets the distance condition;
and if the distance difference value is larger than the difference value threshold value, determining that the target test distance does not meet the distance condition.
11. An vision testing apparatus for execution by an electronic device, the apparatus comprising:
The acquisition module is used for acquiring eye images based on shooting parameter information;
the determining module is used for determining a target test distance between the electronic equipment and the eyes according to the shooting parameter information and the eye images;
and the processing module is used for performing vision testing according to the eye images and the target testing distance.
12. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-10.
13. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-10.
CN202310474920.6A 2023-04-27 2023-04-27 Vision testing method, device, electronic equipment and storage medium Pending CN116421135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310474920.6A CN116421135A (en) 2023-04-27 2023-04-27 Vision testing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310474920.6A CN116421135A (en) 2023-04-27 2023-04-27 Vision testing method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116421135A true CN116421135A (en) 2023-07-14

Family

ID=87085406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310474920.6A Pending CN116421135A (en) 2023-04-27 2023-04-27 Vision testing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116421135A (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1686051A (en) * 2005-05-08 2005-10-26 上海交通大学 Canthus and pupil location method based on VPP and improved SUSAN
CN103119623A (en) * 2010-09-24 2013-05-22 松下电器产业株式会社 Pupil detection device and pupil detection method
JP2018047049A (en) * 2016-09-21 2018-03-29 株式会社ニデック Subjective optometer and subjective optometric program
US20190246896A1 (en) * 2016-09-15 2019-08-15 Essilor International Measurement method for the determination of a value of a visual correction need for near vision of an individual
US20200022577A1 (en) * 2015-03-10 2020-01-23 Eyefree Assisting Communication Ltd. System and method for enabling communication through eye feedback
CN111904375A (en) * 2020-07-13 2020-11-10 中山大学中山眼科中心 Visual chart for self-test and use method thereof
GB202019264D0 (en) * 2020-12-08 2021-01-20 Kay Pictures Ltd Vision Assessment
CN112799508A (en) * 2021-01-18 2021-05-14 Oppo广东移动通信有限公司 Display method and device, electronic device and storage medium
CN113509136A (en) * 2021-04-29 2021-10-19 京东方艺云(北京)科技有限公司 Detection method, vision detection method, device, electronic device and storage medium
CN113920195A (en) * 2021-10-08 2022-01-11 Oppo广东移动通信有限公司 Distance detection method, control method, device, storage medium and electronic equipment
CN115039130A (en) * 2020-12-22 2022-09-09 株式会社燕孵 Method, device and program for estimating apparent distance
US20230020578A1 (en) * 2021-07-07 2023-01-19 Warby Parker Inc. Systems and methods for vision test and uses thereof

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1686051A (en) * 2005-05-08 2005-10-26 上海交通大学 Canthus and pupil location method based on VPP and improved SUSAN
CN103119623A (en) * 2010-09-24 2013-05-22 松下电器产业株式会社 Pupil detection device and pupil detection method
US20200022577A1 (en) * 2015-03-10 2020-01-23 Eyefree Assisting Communication Ltd. System and method for enabling communication through eye feedback
US20190246896A1 (en) * 2016-09-15 2019-08-15 Essilor International Measurement method for the determination of a value of a visual correction need for near vision of an individual
JP2018047049A (en) * 2016-09-21 2018-03-29 株式会社ニデック Subjective optometer and subjective optometric program
CN111904375A (en) * 2020-07-13 2020-11-10 中山大学中山眼科中心 Visual chart for self-test and use method thereof
GB202019264D0 (en) * 2020-12-08 2021-01-20 Kay Pictures Ltd Vision Assessment
CN115039130A (en) * 2020-12-22 2022-09-09 株式会社燕孵 Method, device and program for estimating apparent distance
CN112799508A (en) * 2021-01-18 2021-05-14 Oppo广东移动通信有限公司 Display method and device, electronic device and storage medium
CN113509136A (en) * 2021-04-29 2021-10-19 京东方艺云(北京)科技有限公司 Detection method, vision detection method, device, electronic device and storage medium
US20230020578A1 (en) * 2021-07-07 2023-01-19 Warby Parker Inc. Systems and methods for vision test and uses thereof
CN113920195A (en) * 2021-10-08 2022-01-11 Oppo广东移动通信有限公司 Distance detection method, control method, device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US11967089B2 (en) Object tracking method, tracking processing method, corresponding apparatus, and electronic device
WO2020248387A1 (en) Face recognition method and apparatus based on multiple cameras, and terminal and storage medium
CN109214337B (en) Crowd counting method, device, equipment and computer readable storage medium
WO2018028546A1 (en) Key point positioning method, terminal, and computer storage medium
WO2019210555A1 (en) People counting method and device based on deep neural network and storage medium
CN105516280B (en) A kind of Multimodal Learning process state information packed record method
WO2020000912A1 (en) Behavior detection method and apparatus, and electronic device and storage medium
CN107958230B (en) Facial expression recognition method and device
WO2019218427A1 (en) Method and apparatus for detecting degree of attention based on comparison of behavior characteristics
WO2020244160A1 (en) Terminal device control method and apparatus, computer device, and readable storage medium
CN112116556B (en) Passenger flow volume statistics method and device and computer equipment
WO2021179719A1 (en) Face detection method, apparatus, medium, and electronic device
CN112101124A (en) Sitting posture detection method and device
JP7139704B2 (en) CONCENTRATION EVALUATION PROGRAM, APPARATUS, AND METHOD
CN113763348A (en) Image quality determination method and device, electronic equipment and storage medium
CN113920563B (en) Online exam cheating identification method, device, computer equipment and storage medium
WO2023160666A1 (en) Target detection method and apparatus, and target detection model training method and apparatus
CN112115803A (en) Mask status reminder method, device and mobile terminal
CN111611939A (en) Eye fatigue state detection method and device
CN116957863A (en) Online learning assessment method and device, electronic equipment and storage medium
WO2021093744A1 (en) Method and apparatus for measuring diameter of pupil, and computer-readable storage medium
CN113128421A (en) Learning state detection method and system, learning terminal, server and electronic equipment
CN113688785A (en) Multi-supervision-based face recognition method and device, computer equipment and storage medium
WO2024222426A1 (en) Vision test method and apparatus, and vision test device and storage medium
Yin et al. Hearing loss detection from facial expressions in one-on-one conversations

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20230714

RJ01 Rejection of invention patent application after publication