Detection method of refractive correction lens and electronic equipment

By taking eye images on the built-in shooting components of the head-mounted display device and matching edge information, checking whether the device is equipped with a light correction lens, solving the problem of difficulty in obtaining user light information in a timely manner in the prior art, realizing the timeliness of automatic detection and information acquisition.

CN119515831APending Publication Date: 2025-02-25VIVO MOBILE COMM CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411583329.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

How to detect whether the head-mounted display device is equipped with refractive correction lenses to obtain the user's refractive information in a timely manner.

Method used

By taking eye images on the shooting component built into the head-mounted display device, and matching the edge information of the eye area with the preset edge information, if it does not match, it is determined that the device is currently equipped with a light correction lens.

Benefits of technology

It realizes automatic detection of whether the head-mounted display device is equipped with luminous correction lenses, timely obtains user luminous information, and improves the device's user experience and image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515831A_ABST
    Figure CN119515831A_ABST
Patent Text Reader

Abstract

The invention discloses a detection method of a refractive correction lens and electronic equipment, and belongs to the technical field of electronic equipment. The method comprises the steps that under the condition that it is detected that the head-mounted display device is worn, shooting is carried out in the eye direction based on the shooting assembly, and an eye image is obtained; matching the edge information of the eye region in the eye image with preset edge information; the preset edge information is edge information of an eye region in a reference eye image, and the reference eye image is obtained by shooting in the eye direction based on the shooting assembly under the condition that the head-mounted display device is not provided with a refractive correction lens; and if the edge information is not matched with the preset edge information, determining that the head-mounted display device is currently configured with a refractive correction lens.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a detection method and electronic equipment for refractive correction lenses. Background Art

[0002] At present, with the continuous development of technologies such as Virtual Reality (VR), Extended Reality (XR), and Mixed Reality (MR), head-mounted display devices have been increasingly widely used. Among the user groups of head-mounted display devices, there are a considerable proportion of users with visual ametropia. If the user has visual ametropia, the head-mounted display device needs to adjust the pupil distance and the line of sight axis and gaze point determined in the eye tracking algorithm based on the user's refractive information during operation.

[0003] In the related art, when users with abnormal vision use head-mounted display devices, they often configure additional refractive correction lenses for the head-mounted display devices. Therefore, how to detect whether the head-mounted display device is configured with refractive correction lenses so as to obtain the user's refractive information in a timely manner has become an urgent problem to be solved. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method and electronic device for detecting a refractive correction lens, which can solve the problem of how to detect whether a head-mounted display device is equipped with a refractive correction lens.

[0005] In a first aspect, an embodiment of the present application provides a method for detecting a refractive correction lens, which is applied to a head-mounted display device, wherein the head-mounted display device has a built-in shooting component, and the method includes:

[0006] When it is detected that the head mounted display device is worn, photographing in the direction of the eyes based on the photographing component to obtain an eye image;

[0007] Matching edge information of the eye region in the eye image with preset edge information; the preset edge information is edge information of the eye region in a reference eye image, and the reference eye image is obtained by photographing the eye direction based on the photographing component when the head mounted display device is not configured with a refractive correction lens;

[0008] If the edge information does not match the preset edge information, it is determined that the head mounted display device is currently configured with a refractive correction lens.

[0009] In a second aspect, an embodiment of the present application provides a detection device for a refractive correction lens, which is applied to a head-mounted display device, wherein the head-mounted display device has a built-in shooting component, and the device includes:

[0010] A first shooting module is used for shooting in the direction of the eyes based on the shooting component to obtain an eye image when detecting that the head mounted display device is worn;

[0011] a matching module, configured to match edge information of an eye region in the eye image with preset edge information; the preset edge information is edge information of the eye region in a reference eye image, and the reference eye image is obtained by photographing the eye direction based on the photographing component when the head mounted display device is not configured with a refractive correction lens;

[0012] The first determination module is configured to determine that the head mounted display device is currently configured with a refractive correction lens if the edge information does not match the preset edge information.

[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the detection method of the refractive correction lens as described in the first aspect are implemented.

[0014] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the detection method of the refractive correction lens as described in the first aspect are implemented.

[0015] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method for detecting refractive correction lenses as described in the first aspect.

[0016] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method for detecting refractive correction lenses as described in the first aspect.

[0017] In an embodiment of the present application, when it is detected that the head-mounted display device is worn, firstly, based on the built-in shooting component of the head-mounted display device, shooting is performed in the direction of the eyes to obtain an eye image. Then, the edge information of the eye area in the eye image is matched with the preset edge information. Since the reference eye image is obtained by shooting in the direction of the eyes based on the shooting component when the head-mounted display device is not configured with a refractive correction lens. Therefore, the preset edge information can characterize the edge information of the eye area in the eye image when the refractive correction lens is not configured. Accordingly, by matching the edge information of the eye area in the eye image with the preset edge information, if the edge information does not match the preset edge information, it can be determined that the head-mounted display device is currently configured with a refractive correction lens, thereby realizing the detection of whether the head-mounted display device is configured with a refractive correction lens.

[0018] In the embodiment of the present application, when the head mounted display device is detected to be worn, an eye image is automatically captured to detect whether the head mounted display device is currently configured with a refractive correction lens. In this way, automatic detection of whether a refractive correction lens is configured can be realized more timely, so that the user's refractive information can be obtained more timely later. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a flowchart of the steps of the detection method of the refractive correction lens provided in the embodiment of the present application;

[0020] Figure 2 is a schematic diagram of a reference eye image provided in an embodiment of the present application;

[0021] Figure 3 is a schematic diagram of another reference eye image provided in an embodiment of the present application;

[0022] Figure 4 is a schematic diagram of an eye image provided in an embodiment of the present application;

[0023] Figure 5 is a schematic diagram of another eye image provided in an embodiment of the present application;

[0024] Figure 6 It is a processing flow diagram provided by an embodiment of the present application;

[0025] Figure 7 is a block diagram of a detection device for a refractive correction lens provided in an embodiment of the present application;

[0026] Figure 8 It is one of the structural schematic diagrams of the electronic device provided in the embodiment of the present application;

[0027] Fig. 9 This is the second structural schematic diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0029] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0030] The embodiment of the present application provides a method for detecting a refractive correction lens, which can be applied to a head-mounted display device. Among them, the head-mounted display device can be VR glasses, XR glasses, MR glasses, etc. The head-mounted display device may include a lens corresponding to the user's eye area, specifically, a left eye lens corresponding to the left eye and a right eye lens corresponding to the right eye. Because there is a considerable proportion of users with abnormal refractive vision among the user group using the head-mounted display device. Users with abnormal refractive vision usually configure additional refractive correction lenses for the head-mounted display device when using the head-mounted display device. Exemplarily, the refractive correction lens can be adsorbed on the lens of the head-mounted display device, so that the light emitted by the display module in the head-mounted display device passes through the refractive correction lens on the lens and enters the human eye, so that users with abnormal refractive vision can see a clear display screen.

[0031] Furthermore, when the head-mounted display device is running, it will perform an operation to determine the pupil distance and implement an eye tracking function based on an eye-related algorithm (e.g., an iris recognition algorithm). When performing eye tracking, it is necessary to determine the line of sight axis and the gaze point. If the user has refractive error, it is necessary to adjust the pupil distance and the determined line of sight axis and gaze point in combination with the user's refractive information to ensure accuracy. If the user has refractive error, the head-mounted display device is configured with a refractive correction lens, but the corresponding refractive information cannot be obtained, which will lead to inaccurate pupil distance, and then cause the screen presented to the user to have poor image quality, blur, binocular mismatch and other problems, as well as inaccurate eye tracking, which in turn causes problems with hand-eye interaction and the inability to perform precise control. To this end, an embodiment of the present application provides a method for detecting a refractive correction lens to detect whether a head-mounted display device is configured with a refractive correction lens, so that the user's refractive information can be obtained in a timely manner later.

[0032] The following is a detailed description of the detection method of the refractive correction lens provided in the embodiment of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0033] Figure 1 is a flow chart of the steps of the detection method of the refractive correction lens provided in the embodiment of the present application, such as Figure 1 As shown, the method includes:

[0034] Step 101: When it is detected that the head mounted display device is worn, the shooting component is used to shoot in the direction of the eyes to obtain an eye image.

[0035] Step 102, matching edge information of the eye area in the eye image with preset edge information; the preset edge information is edge information of the eye area in a reference eye image, and the reference eye image is obtained by shooting in the direction of the eye based on the shooting component when the head-mounted display device is not equipped with a refractive correction lens.

[0036] Step 103: If the edge information does not match the preset edge information, it is determined that the head mounted display device is currently configured with a refractive correction lens.

[0037] In an embodiment of the present application, the head-mounted display device can detect whether it is currently being worn based on an internal sensor. For example, when a contact sensor detects a contact signal, it can be determined that the head-mounted display device is currently being worn. In a specific usage scenario, after the user wears the head-mounted display device, the contact area between the face and the head-mounted display device will exert pressure on the head-mounted display device, so the contact signal can be pressure information. Alternatively, other methods can be used to determine whether the head-mounted display device is currently being worn. For example, by using a built-in accelerometer and gyroscope, it is detected that the movement and direction changes of the device meet the preset change conditions, and it is determined that the head-mounted display device is currently being worn. Furthermore, in the scenario of using a head-mounted display device, the user often wears the head-mounted display device first. Therefore, when it is detected that the head-mounted display device is currently being worn, the detection method of the refractive correction lens provided in the embodiment of the present application can be started, so that it can be timely detected whether the user is currently configured with a refractive correction lens.

[0038] The head-mounted display device is equipped with a built-in shooting component, which can be arranged opposite to the surface provided with the lens, and the surface provided with the lens is the surface close to the user's eyes. The light emitted by the display module in the head-mounted display device enters the human eye through the lens so that the user can see the display image. Specifically, the shooting component can be built into the optical machine, wherein the optical machine refers to the component composed of the display module and the lens, and the shooting component can be specifically arranged on the side of the lens away from the human eye. The built-in shooting component of the head-mounted display device can be an infrared camera of the eye tracking device in the head-mounted display device. In this way, the detection method of the refractive correction lens provided in the embodiment of the present application can be implemented without adding an additional camera, which can reduce the hardware implementation cost.

[0039] The shooting component can shoot toward the surface where the lens is provided. Since the surface where the lens is provided is the surface close to the user's eyes, an eye image can be obtained after shooting. Specifically, the eye image can be an eye image of the user obtained by shooting in the direction of the eye based on the shooting component when the head-mounted display device is detected to be worn. When the head-mounted display device is detected to be worn, the shooting component can be controlled to shoot in the direction of the eye to obtain the eye image, and then the eye image is obtained. Among them, the eye area in the eye image can refer to the area corresponding to the lens, and the eye area in the eye image can also be called the effective area. Since in the surface where the lens is provided, all areas except the area where the lens is located are the lens barrel wall, and the lens barrel wall itself is not transparent. Therefore, in the eye image obtained by shooting in the direction of the eye by the shooting component, there is a difference in brightness between the eye area and the non-eye area. In this way, the eye area in the eye image can be captured more conveniently. Among them, the non-eye area can refer to the area of ​​the lens barrel wall in the surface corresponding to the lens, and the non-eye area can be a black area. The lens barrel wall is the outer shell of the lens barrel, which is used to accommodate the optical machine and other components, such as batteries, motherboards, etc.

[0040] In an embodiment of the present application, the edge information refers to the edge information of the eye area in the eye image. After obtaining the eye image, the edge information of the eye area in the eye image can be extracted. Then the extracted edge information is matched with the preset edge information. Among them, the preset edge information can be edge information extracted in advance from a reference eye image, and the reference eye image is also an eye image obtained by the head-mounted display device based on the shooting component shooting in the direction of the eye. Since the head-mounted display device is not equipped with a refractive correction lens when shooting the reference eye image, the preset edge information can reflect the edge features of the eye area in the eye image captured by the shooting component when the head-mounted display device is not equipped with a refractive correction lens.

[0041] Furthermore, there may be an angle between the shooting component and the configured refractive correction lens. For example, when there is an angle of M degrees between the plane where the shooting component is located and the surface where the lens is set, there will often be at least an angle of M degrees between the shooting component and the configured refractive correction lens, which is affected by the angle between the shooting component and the configured refractive correction lens, the influence of the refractive correction lens on the optical path of the lens area, and the occlusion of the lens area by the edge of the refractive correction lens. When the head-mounted display device is configured with a refractive correction lens, the eye area in the eye area will change. For example, the eye area will be offset and the area will become smaller, resulting in the edge of the eye area in the eye image captured this time becoming shorter and the edge points becoming fewer, which in turn causes the extracted edge information to differ from the preset edge information. Therefore, if the edge information matches the preset edge information, it means that the edge information of the eye image meets the edge features of the eye area in the eye image captured by the shooting component when the refractive correction lens is not configured. Accordingly, it can be determined that the head-mounted display device is not currently configured with a refractive correction lens. On the contrary, if the edge information does not match the preset edge information, it means that the edge information of the eye image does not conform to the edge features of the eye area in the eye image captured by the shooting component when the refractive correction lens is not configured. Accordingly, it can be determined that the head mounted display device is currently configured with a refractive correction lens.

[0042] In an embodiment of the present application, when it is detected that the head-mounted display device is worn, the built-in shooting component of the head-mounted display device is first used to shoot in the direction of the eye to obtain the eye image. Then, the edge information of the eye area in the eye image is matched with the preset edge information. Since the reference eye image is obtained by shooting in the direction of the eye based on the shooting component when the head-mounted display device is not configured with a refractive correction lens. Therefore, the preset edge information can represent the edge information of the eye area in the eye image when the refractive correction lens is not configured. Accordingly, by matching the edge information of the eye area in the eye image with the preset edge information, if the edge information does not match the preset edge information, it can be determined that the head-mounted display device is currently configured with a refractive correction lens, thereby realizing the detection of whether the head-mounted display device is configured with a refractive correction lens.

[0043] In the embodiment of the present application, when the head mounted display device is detected to be worn, an eye image is automatically captured to detect whether the head mounted display device is currently configured with a refractive correction lens. In this way, automatic detection of whether a refractive correction lens is configured can be realized more timely, so that the user's refractive information can be obtained more timely later.

[0044] Optionally, the embodiment of the present application may further include the following steps:

[0045] Step S21, when it is determined that the head mounted display device is currently configured with refractive correction lenses, a refractive information input interface is displayed; the refractive information input interface is used to prompt the user to input refractive information.

[0046] Step S22, receiving the refractive information input by the user in the refractive information input interface.

[0047] In an embodiment of the present application, when it is determined that a refractive correction lens is currently configured, the head-mounted display device can notify the operating system through a message mechanism to perform an operation of displaying a refractive information input interface, thereby guiding the user to input the refractive information. Exemplarily, the processing flow of the above-mentioned detection method can be implemented based on a processor, and when it is detected that a refractive correction lens is configured, a message is sent to the upper system to notify the upper system that a refractive correction lens is currently detected to be configured. The refractive information input interface can be a pre-designed display interface. The display interface may include prompt information to guide the user to complete the refractive information. Exemplarily, the refractive information may include refractive power, astigmatism, etc. The refractive power may be myopia or hyperopia. Accordingly, the display interface may include a refractive power input box and an astigmatism input box. The user can enter his or her own refractive power and astigmatism in the refractive power input box and the astigmatism input box, respectively. After receiving the refractive information input by the user, the pupil distance as well as the line of sight axis and the gaze point can be adjusted based on the refractive information. This can more accurately complete the pupil distance adjustment and eye tracking functions and ensure the user's device usage experience.

[0048] Exemplarily, the influence of refractive correction lenses with different refractive information on the optical path can be simulated in advance by optical simulation, and the pupil distance values ​​corresponding to different refractive information can be calculated, or the deviation value of the pupil distance after adding the refractive correction lens with different refractive information is calculated as the pupil distance compensation value compared with the default pupil distance without adding the refractive correction lens. The different refractive information and its corresponding pupil distance value / pupil distance compensation value are recorded in correspondence to obtain a first corresponding relationship. After receiving the refractive information input by the user, the pupil distance value corresponding to the refractive information input by the user can be found from the first corresponding relationship as the target pupil distance. Alternatively, the corresponding pupil distance compensation value is found as the target compensation value, and the target pupil distance is calculated according to the default pupil distance and the target compensation value. The control motor of the head-mounted display device can automatically adjust the pupil distance according to the value of the target pupil distance. The influence of refractive correction lenses with different refractive information on the optical path can be simulated in advance by optical simulation, and the eyeball center compensation position and / or pupil center compensation position corresponding to the different refractive information can be calculated. The different refractive information and its corresponding eyeball center compensation position and / or pupil center compensation position are recorded in correspondence to obtain a second corresponding relationship. After receiving the refractive information input by the user, the eyeball center compensation position and / or pupil center compensation position corresponding to the refractive information input by the user can be found from the second corresponding relationship. According to the eyeball center compensation position and / or pupil center compensation position, the target gaze optical axis direction is calculated. The control motor of the head-mounted display device can adjust the sight axis and the gaze point according to the target gaze optical axis direction. Of course, other methods can also be used to adjust the pupil distance and adjust the sight axis and the gaze point according to the refractive information, and the embodiments of the present application are not limited to this.

[0049] Compared with providing the reporting option for the user, the user actively triggers the reporting option to actively report the refractive information. Limited by the user's personal cognition, many users are often not clear about the importance of improving the refractive information. Therefore, the user often does not actively trigger the reporting option to improve the refractive information. Therefore, in this way, the user's refractive information is often not obtained in time. In the embodiment of the present application, by displaying the refractive information input interface when it is detected that the refractive correction lens is configured, the user is actively prompted to improve the refractive information, so that the user's refractive information can be obtained in time.

[0050] Furthermore, compared to the method of directly displaying the refractive information input interface to the user regardless of whether the user has refractive error and whether the head-mounted display device is configured with refractive correction lenses. In the implementation of the present application, when it is detected that the head-mounted display device is worn, it is first detected whether the head-mounted display device is currently configured with refractive correction lenses. When it is detected that the head-mounted display device is not configured with refractive correction lenses, the refractive information input interface is not displayed. When it is detected that the refractive correction lenses are configured, the refractive information input interface is displayed. In this way, while timely guiding users with refractive error to complete their refractive information, it is possible to avoid performing unnecessary interface display operations on users with normal refractive power who do not need to wear refractive correction lenses, thereby saving display resources. At the same time, the display operation of the refractive information input interface can be made a non-perceptual experience for users with normal refractive power who do not need to wear refractive correction lenses.

[0051] Optionally, in the embodiment of the present application, the eye image and the reference front eye image are obtained by shooting based on the same shooting parameters. Specifically, the above step of obtaining the eye image based on shooting in the direction of the eye by the shooting component may specifically include: step 1011, based on shooting in the direction of the eye according to specified shooting parameters by the shooting component, obtaining the eye image.

[0052] Accordingly, the above-mentioned reference eye image can be obtained through the following steps: Step S31, when no refractive correction lens is configured, based on the shooting component, shooting in the direction of the eye according to the specified shooting parameters to obtain the reference eye image.

[0053] In an embodiment of the present application, the designated shooting parameters may be pre-set shooting parameters, and parameters that can make the brightness of the captured image moderate may be set as designated shooting parameters. Specifically, the types of parameters included in the designated shooting parameters and the specific values ​​of the various parameters may be set based on experience. Exemplarily, the designated shooting reference may include exposure time, and the exposure time may be 200 milliseconds. Furthermore, the designated shooting parameters may also include sensitivity (ISO), etc., which is not limited in the embodiment of the present application.

[0054] The head mounted display device can be controlled in advance to shoot in the direction of the eye based on the shooting component according to the set fixed shooting parameters to obtain a reference eye image. Specifically, the reference eye image can be shot in the device calibration link. When shooting the reference eye image, a solid color background can be set in the direction of the eye. For example, the head mounted display device can be placed on a horizontal plane, and then a pure white background board can be set on the surface where the lens is set. Since the other areas except the area where the lens is located in the surface where the lens is set are the lens barrel wall, and the lens barrel wall itself is not transparent, the shooting component will shoot the lens barrel wall when shooting in the direction of the eye. Therefore, in the eye image obtained by shooting in the direction of the eye by the shooting component, the non-eye area is black. In this way, when shooting the reference eye image, a pure white background board is set in the direction of the eye, which can magnify the difference between the eye area and the non-eye area in the reference eye image as much as possible, thereby facilitating the extraction of the edge information of the eye area in the reference eye image. Further, the fixed shooting parameters used to shoot the reference eye image are stored as the above-mentioned specified shooting parameters in the fixed directory of the head mounted display device. Accordingly, when it is detected that the head mounted display device is being worn, the specified shooting parameters can be read from a fixed directory, and then the shooting component can be used to shoot in the direction of the eyes according to the specified shooting parameters to obtain the eye image.

[0055] In the embodiment of the present application, the eye image and the reference eye image are both photographed according to the specified photographing parameters. In this way, the eye image and the reference eye image are photographed with the same photographing parameters, which can avoid the influence of different photographing parameters on the edge information, thereby improving the accuracy of the subsequent detection of whether to configure the refractive correction lens by matching the edge information extracted from the eye image with the preset edge information to a certain extent.

[0056] Optionally, the edge information of the eye region in the eye image captured in the embodiment of the present application and the preset edge information are respectively acquired from the eye image and the reference front eye image based on the same acquisition method. Specifically, before matching the edge information of the eye region in the eye image with the preset edge information, the embodiment of the present application may further include the following steps:

[0057] Step S41, binarizing the eye image according to a preset pixel value threshold.

[0058] Step S42: Based on a preset edge detection algorithm, pixel coordinates of edge pixel points in the eye area in the eye image after the binarization process are obtained to obtain the edge information.

[0059] Accordingly, the preset edge information can be obtained through the following steps:

[0060] Step S51 : binarizing the reference eye image according to the preset pixel value threshold.

[0061] Step S52: Based on the preset edge detection algorithm, pixel coordinates of edge pixels in the eye area of ​​the reference eye image after the binarization process are obtained to obtain the preset edge information.

[0062] In an embodiment of the present application, edge information may include pixel coordinates of edge pixels. The preset pixel value threshold may be set according to actual conditions. For example, the preset pixel value threshold may be 24. Binarization may refer to converting an image into an image with only two pixel values: 0 and 255. The image after binarization is a black and white image. Specifically, binarization of the eye image may be performed by setting pixels whose pixel values ​​are not less than the preset pixel value threshold to 255 and pixels whose pixel values ​​are less than the preset pixel value threshold to 0. In this way, after binarization, the difference between the eye area and the non-eye area in the eye image can be made greater, and the edge between the eye area and the non-eye area can be made clearer, thereby facilitating subsequent edge information extraction. The preset edge detection algorithm may be selected according to actual needs. For example, the preset edge detection algorithm may be a Canny edge detection algorithm, a Sobel edge detection algorithm, a differential edge detection algorithm, and the like.

[0063] Edge points are often located at positions where brightness changes significantly. After binarization of the eye image, a preset edge detection algorithm can be used to identify points at positions where brightness changes significantly in the eye image. Further, the points identified by the preset edge detection algorithm can be traversed one by one, and the pixel coordinates of the points can be obtained, thereby obtaining a set of pixel coordinates. The edge information is determined based on the set of pixel coordinates. Specifically, when determining the edge information based on the set of pixel coordinates, the pixel coordinates whose distance from the upper edge of the image is less than a preset distance threshold can be first determined. The preset distance threshold can characterize the distance between the pixel point close to the upper edge of the lens and the upper edge of the image. These pixel coordinates are determined as edge information. Alternatively, a first number of pixel coordinates are selected from these pixel coordinates and a second number of pixel coordinates are selected from other pixel coordinates, and the selected pixel coordinates are determined as edge information. Among them, the first number is greater than the second number. In this way, the edge information can include more pixel coordinates of edge points on the upper edge. Since the upper edge direction is less affected by reflected light, the upper edge is often clearer. Therefore, including more pixel coordinates of edge points on the upper edge in the edge information can improve the accuracy of subsequent edge comparison.

[0064] Accordingly, after obtaining the reference eye image in advance, the edge information in the reference eye image can be obtained in advance as the preset edge information. Specifically, the reference eye image can be binarized first, and specifically, the pixel points whose pixel values ​​are not less than the preset pixel value threshold can be set to 255, and the pixel points whose pixel values ​​are less than the preset pixel value threshold can be set to 0. In this way, after the binarization process, the difference between the eye area and the non-eye area in the reference eye image can be made greater, and the edge between the eye area and the non-eye area can be made clearer, thereby facilitating the subsequent edge information extraction. After the reference eye image is binarized, the preset edge detection algorithm can be used to identify the points in the position where the brightness changes significantly in the reference eye image. Furthermore, the points identified by the preset edge detection algorithm can be traversed one by one, and the pixel coordinates of the point can be obtained, thereby obtaining a pixel coordinate set. The reference edge information is determined based on the pixel coordinate set.

[0065] Specifically, when determining the reference edge information based on the pixel coordinate set, the pixel coordinates whose distance from the upper edge of the image is less than a preset distance threshold can be determined first. These pixel coordinates are determined as the reference edge information. Alternatively, a first number of pixel coordinates are selected from these pixel coordinates and a second number of pixel coordinates are selected from other pixel coordinates, and the selected pixel coordinates are determined as the reference edge information. Among them, the first number is greater than the second number. In this way, the reference edge information can include more pixel coordinates of edge points on the upper edge. Since the upper edge direction is less affected by reflected light, the upper edge is often clearer. Therefore, including more pixel coordinates of edge points on the upper edge in the reference edge information can improve the accuracy of subsequent edge comparison.

[0066] It should be noted that, since the eyeball area of ​​the eye area often appears black after binarization, and other areas of the eye area appear white, there are also edge points inside the eye area. Therefore, in an embodiment of the present invention, it is also possible to identify the connected area composed of all white areas, and then remove the pixel coordinates of the points located in the connected area from the edge information. In this way, the edge information can accurately characterize the edge features between the eye area and the non-eye area. Furthermore, the connected area with an area less than a preset area threshold can be used as a target connected area, and the pixel coordinates of the edge points of the target connected area can be removed from the edge information. In this way, the edge information can accurately characterize the edge features between the eye area and the non-eye area.

[0067] Figure 2 is a schematic diagram of a reference eye image provided in an embodiment of the present application, such as Figure 2As shown, the black area corresponds to the wall of the lens barrel, and the white area corresponds to the area where the lens is located. The white area is the eye area. It should be noted that for head-mounted display devices, due to the influence of the installation position, processing technology and installation technology of the shooting component, the left eye area and the right eye area in the captured eye image are not completely symmetrical. At the same time, the built-in shooting component will reflect infrared light when shooting. After the infrared light passes through the lens area to reach the user's eyes, the shooting component receives the infrared light reflected by the user's eyes to form an eye image. Since part of the light will be reflected to other places when passing through the lens, the boundaries of the white area are irregular. Figure 3 is a schematic diagram of another reference eye image provided in an embodiment of the present application, such as Figure 3 As shown in FIG. 1 , in the reference eye image after binarization, the edge between the eye area (white area) and the non-eye area (black area) is clearer. Furthermore, Figure 4 is a schematic diagram of an eye image provided in an embodiment of the present application, such as Figure 4 As shown, when it is detected that the head mounted display device is worn, the specified shooting parameters can be used to shoot, thereby obtaining Figure 4 The image shown in . Figure 5 is a schematic diagram of another eye image provided in an embodiment of the present application, such as Figure 5 As shown in FIG. 1 , the eye image is a binarized eye image. The edge information can be extracted from the binarized eye image in the same manner.

[0068] It should be noted that, compared with the eye area in the reference eye image, when a refractive correction lens is configured, the eye area in the eye image is smaller and the position of the eye area is offset. The greater the refractive power of the refractive correction lens, the smaller the eye area and the greater the degree of offset of the position of the eye area. Exemplarily, in the case of a 300-degree refractive correction lens, a 500-degree refractive correction lens, and a 700-degree refractive correction lens, in the corresponding three eye images taken, the smaller the eye area, the greater the degree of offset of the position of the eye area.

[0069] In an embodiment of the present application, when extracting preset edge information, the reference eye image is first binarized according to a preset pixel value threshold. Then, based on a preset edge detection algorithm, the pixel coordinates of the edge pixel points of the eye area in the reference eye image after binarization are obtained as the preset edge information. When extracting edge information, the image is also first binarized according to a preset pixel value threshold, and then, based on the same preset edge detection algorithm, the pixel coordinates of the edge pixel points of the eye area in the eye image after binarization are obtained as the edge information. In this way, by extracting edge information and preset edge information in the same manner, the influence of different edge information acquisition methods on edge information can be avoided, thereby improving the accuracy of subsequent detection of whether to configure a refractive correction lens by matching edge information and preset edge information.

[0070] Optionally, after obtaining the preset edge information, the embodiment of the present application may further include: step S61, storing the preset edge information in a specified directory of the head mounted display device. Accordingly, before the above step of matching the edge information of the eye area in the eye image with the preset edge information, the embodiment of the present application may further include: step S71, loading the preset edge information from the specified directory.

[0071] The designated directory can be set as needed. For example, a fixed target whose content will not be overwritten can be selected as the designated directory. Accordingly, by pre-acquiring the preset edge information, the preset edge information is stored in the designated directory of the head-mounted display device after the preset edge information is obtained in advance. In this way, when it is detected that the head-mounted display device is worn and it is necessary to detect whether the head-mounted display device is equipped with a refractive correction lens, the preset edge information can be obtained by directly loading it from the designated directory, thereby improving the detection efficiency of the refractive correction lens to a certain extent.

[0072] Optionally, the step of matching the edge information of the eye region in the eye image with the preset edge information may specifically include:

[0073] Step 1021: Determine the pixel coordinates included in the preset edge information as first coordinates, and determine the pixel coordinates included in the edge information as second coordinates.

[0074] Step 1022: For any of the first coordinates, if there is no second coordinate matching the first coordinate, the first coordinate is determined as the target coordinate.

[0075] Step 1023: When the number of the target coordinates is greater than a preset number threshold, determine that the edge information does not match the preset edge information.

[0076] Step 1024: When the number of the target coordinates is not greater than the preset number threshold, determine that the edge information matches the preset edge information.

[0077] In the embodiment of the present application, X represents the number of pixel coordinates included in the preset edge information, and the X pixel coordinates are the first coordinates. Y represents the number of pixel coordinates included in the edge information, and the Y pixel coordinates are the second coordinates. Among them, X and Y may be equal or unequal. The first coordinates are traversed, and for any first coordinate traversed, it can be detected whether there is a second coordinate matching the first coordinate in the second coordinate. If it exists, it can be determined that there is an edge point corresponding to the edge point represented by the second coordinate in the eye image. On the contrary, if it does not exist, it means that there is no edge point corresponding to the edge point represented by the second coordinate in the eye image, and the first coordinate can be used as the target coordinate. Accordingly, the number of target coordinates can represent the number of edge points in the reference eye image that are not matched to the corresponding edge point in the eye image. N represents the number of target coordinates, and the initial value of N can be 0. After each target coordinate is determined, N can be added by 1. When the value of N is greater than the preset number threshold, even if there are still first coordinates that have not been traversed, it can be determined that the edge information does not match the preset edge information. The untraversed first coordinate refers to a first coordinate for which it has not yet been determined whether there is a second coordinate matching the first coordinate. In this way, unnecessary determination operations can be avoided. After completing the traversal of all first coordinates, if N is not greater than a preset number threshold, it can be determined that the extracted edge information matches the preset edge information.

[0078] The preset number threshold may be a preset empirical value, and illustratively, the preset number threshold may be 15. If the number of target coordinates is greater than the preset number threshold, it means that the edge information extracted is significantly different from the preset edge information, and the difference may be caused by the current configuration of the refractive correction lens. Therefore, it can be determined that the edge information does not match the preset edge information. If the number of target coordinates is not greater than the preset number threshold, it means that the edge information extracted is not different from the preset edge information or the difference is small, and the difference may be caused by a shooting error or an edge information acquisition error. Therefore, it can be determined that the edge information matches the preset edge information.

[0079] In an embodiment of the present application, the pixel coordinates included in the preset edge information are first determined as the first coordinates, and the pixel coordinates included in the edge information are determined as the second coordinates. For any first coordinate, if there is no second coordinate that matches the first coordinate, the first coordinate is determined as the target coordinate. Then, when the number of target coordinates is greater than the preset number threshold, it is determined that the edge information does not match the preset edge information. When the number of target coordinates is not greater than the preset number threshold, it is determined that the edge information matches the preset edge information. In this way, by counting the number of target coordinates, based on the size relationship between the number of target coordinates and the preset number threshold, it can be determined whether the edge information matches the preset edge information, which can ensure the matching efficiency, and further ensure the detection efficiency of the refractive correction lens.

[0080] Optionally, the embodiment of the present application may further include:

[0081] Step S81: for any of the first coordinates, taking the pixel point corresponding to the first coordinate in the eye image as the central pixel point, and determining a pixel area of ​​a preset size centered on the central pixel point as a reference pixel area.

[0082] Step S82: If there is no second coordinate belonging to the reference pixel area, it is determined that there is no second coordinate matching the first coordinate.

[0083] Step S83: If there is a second coordinate belonging to the reference pixel area, determine that there is a second coordinate matching the first coordinate.

[0084] In the embodiment of the present application, the preset size may be pre-set, and the preset size may include a preset pixel area width and a preset pixel area height. For example, the preset pixel area width and the preset pixel area height may both be 5 pixels. Accordingly, the obtained reference pixel area is a 5×5 pixel area, and the reference pixel area includes a total of 25 pixels.

[0085] Exemplarily, assuming that the first coordinate currently traversed is (a, b), then the pixel point at the coordinate (a, b) in the eye image can be used as the central pixel point. After determining the central pixel point, a pixel area with a preset pixel area width and a preset pixel area height can be divided with the central pixel point as the center, as the reference pixel area corresponding to the first coordinate currently traversed. Exemplarily, assuming that the first coordinate currently traversed is (a, b), then a 5×5 neighborhood of (a, b) in the eye image can be used as the reference pixel area.

[0086] Then, each second coordinate is compared with the coordinate of the pixel point included in the reference pixel area. If there is at least one second coordinate belonging to the coordinate of the pixel point included in the reference pixel area, then it can be determined that there is a second coordinate belonging to the reference pixel area, and there is an edge pixel point in the eye image corresponding to the edge pixel point represented by the first coordinate. Among them, the second coordinate belongs to the coordinate of the pixel point included in the reference pixel area, which means that among the coordinates of the pixel points included in the reference pixel area, there is a coordinate consistent with the second coordinate. On the contrary, it can be determined that there is no second coordinate belonging to the reference pixel area, and there is no edge pixel point in the eye image corresponding to the edge pixel point represented by the first coordinate. Correspondingly, the above-mentioned N can specifically represent the sum of the number of edge points in the benchmark eye image that do not have edge pixels in the corresponding reference pixel area in the eye image.

[0087] In the embodiment of the present invention, for any first coordinate, the pixel point corresponding to the first coordinate in the eye image is used as the central pixel point, and a pixel area of ​​a preset size centered on the central pixel point is determined as the reference pixel area. By determining whether there is a second coordinate belonging to the reference pixel area, it is determined whether there is a second coordinate matching the first coordinate. Since the reference pixel area has a larger range, the probability that the second coordinate hits the reference pixel area is greater. In this way, the error of the edge point not being able to completely correspond due to shooting or edge information extraction errors can be avoided, thereby improving the accuracy of matching.

[0088] Figure 6 is a processing flow diagram provided by an embodiment of the present application, such as Figure 6 As shown, during the device calibration phase, a reference eye image can be captured according to specified shooting parameters. Then, edge information in the reference eye image is extracted as preset edge information according to a specified acquisition method. The specified acquisition method may be the acquisition method represented by steps S51 to S52 above. Then, the preset edge information is stored in a specified directory. When it is detected that the head-mounted display device is worn, an eye image is captured according to specified shooting parameters. Then, edge information in the eye image is extracted according to the specified acquisition method. It is determined whether the extracted edge information is consistent with the preset edge information. That is, the extracted edge information is matched with the preset edge information. If the two match, it means that the edges are consistent, and the process can be terminated. On the contrary, if the two do not match, it means that the edges are inconsistent, and the refractive information input interface can be displayed.

[0089] See also Figure 7 The embodiment of the present application provides a detection device for a refractive correction lens, which is applied to a head-mounted display device, wherein the head-mounted display device has a built-in shooting component, and the device includes:

[0090] A first shooting module 201 is used for shooting in the direction of the eyes based on the shooting component to obtain an eye image when it is detected that the head mounted display device is worn;

[0091] A matching module 202 is used to match edge information of the eye region in the eye image with preset edge information; the preset edge information is edge information of the eye region in a reference eye image, and the reference eye image is obtained by photographing the eye direction based on the photographing component when the head mounted display device is not configured with a refractive correction lens;

[0092] The first determination module 203 is configured to determine that the head mounted display device is currently configured with a refractive correction lens if the edge information does not match the preset edge information.

[0093] Optionally, the device further comprises:

[0094] When it is determined that the head mounted display device is currently equipped with a refractive correction lens, a refractive information input interface is displayed; the refractive information input interface is used to prompt the user to input refractive information;

[0095] Refractive information input by a user in the refractive information input interface is received.

[0096] Optionally, the first shooting module 201 is specifically used to: shoot in the direction of the eye according to specified shooting parameters based on the shooting component to obtain the eye image;

[0097] The reference eye image is obtained by the following modules:

[0098] The second shooting module is used to shoot in the direction of the eye based on the shooting component according to the specified shooting parameters when no refractive correction lens is configured to obtain the reference eye image.

[0099] Optionally, the device further comprises:

[0100] A first processing module, configured to perform binarization processing on the eye image according to a preset pixel value threshold;

[0101] A second acquisition module is used to acquire the pixel coordinates of the edge pixel points of the eye area in the eye image after the binarization process based on a preset edge detection algorithm to obtain the edge information;

[0102] The preset edge information is obtained through the following modules: a second processing module, used to binarize the reference eye image according to the preset pixel value threshold; a second acquisition module, used to obtain the pixel coordinates of the edge pixel points of the eye area in the reference eye image after the binarization processing based on the preset edge detection algorithm, to obtain the preset edge information.

[0103] Optionally, the apparatus further comprises: a storage module, configured to store the preset edge information in a designated directory of the head mounted display device;

[0104] A loading module is used to load the preset edge information from the specified directory.

[0105] Optionally, the matching module 202 is specifically configured to:

[0106] Determining pixel coordinates included in the preset edge information as first coordinates, and determining pixel coordinates included in the edge information as second coordinates;

[0107] For any of the first coordinates, if there is no second coordinate matching the first coordinate, determining the first coordinate as the target coordinate;

[0108] When the number of the target coordinates is greater than a preset number threshold, determining that the edge information does not match the preset edge information;

[0109] When the number of the target coordinates is not greater than the preset number threshold, it is determined that the edge information matches the preset edge information.

[0110] Optionally, the device further comprises:

[0111] A second determination module is used for, for any of the first coordinates, taking a pixel point corresponding to the first coordinate in the eye image as a central pixel point, and determining a pixel area of ​​a preset size centered on the central pixel point as a reference pixel area;

[0112] a third determination module, configured to determine that there is no second coordinate matching the first coordinate if there is no second coordinate belonging to the reference pixel area;

[0113] The fourth determination module is used to determine the existence of a second coordinate matching the first coordinate if there is a second coordinate belonging to the reference pixel area.

[0114] The advantages of the detection device for refractive correction lenses and the detection method for refractive correction lenses described in the previous embodiments over the related art are the same, and will not be described in detail here.

[0115] The detection device of the refractive correction lens in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than the terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (Augmented Reality, AR) / virtual reality (Virtual Reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (Personal Computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application. The detection device of the refractive correction lens in the embodiment of the present application can be a device with an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application. The detection device of the refractive correction lens provided in the embodiment of the present application can realize Figure 1 The various processes implemented by the method embodiment achieve the same technical effect and will not be described again here to avoid repetition.

[0116] In some embodiments, Figure 8 As shown, the embodiment of the present application further provides an electronic device M40, including a processor M401 and a memory M402, the memory M402 stores a program or instruction that can be run on the processor M401, and when the program or instruction is executed by the processor M401, each step of the above-mentioned refractive correction lens detection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.

[0117] Fig. 9A schematic diagram of the hardware structure of another electronic device for implementing an embodiment of the present application. The electronic device 500 includes, but is not limited to, components such as a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, and a processor 510. It can be understood by those skilled in the art that the electronic device 500 may also include a power supply (such as a battery) for supplying power to each component, and the power supply may be logically connected to the processor 510 through a power management system, thereby realizing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0118] The processor 510 is configured to, when detecting that the head mounted display device is worn, shoot in the direction of the eyes based on the shooting component to obtain an eye image;

[0119] Matching edge information of the eye region in the eye image with preset edge information; the preset edge information is edge information of the eye region in a reference eye image, and the reference eye image is obtained by photographing the eye direction based on the photographing component when the head mounted display device is not configured with a refractive correction lens;

[0120] If the edge information does not match the preset edge information, it is determined that the head mounted display device is currently configured with a refractive correction lens.

[0121] The processor 510 is further configured to display a refractive information input interface when it is determined that the head mounted display device is currently configured with refractive correction lenses; the refractive information input interface is used to prompt the user to input refractive information; and receive the refractive information input by the user in the refractive information input interface.

[0122] The processor 510 is also used to obtain the eye image by shooting in the direction of the eye based on the shooting component according to the specified shooting parameters; the reference eye image is obtained in the following manner: when no refractive correction lens is configured, the shooting component is used to shoot in the direction of the eye according to the specified shooting parameters to obtain the reference eye image.

[0123] The processor 510 is further configured to binarize the eye image according to a preset pixel value threshold before matching the edge information of the eye area in the eye image with the preset edge information; obtain the pixel coordinates of the edge pixel points of the eye area in the eye image after the binarization process based on a preset edge detection algorithm to obtain the edge information; the preset edge information is obtained in the following manner: binarize the reference eye image according to the preset pixel value threshold; obtain the pixel coordinates of the edge pixel points of the eye area in the reference eye image after the binarization process based on the preset edge detection algorithm to obtain the preset edge information.

[0124] The processor 510 is further configured to, after obtaining the preset edge information, store the preset edge information in a specified directory of the head mounted display device; and load the preset edge information from the specified directory before matching the edge information of the eye area in the eye image with the preset edge information.

[0125] The processor 510 is further configured to determine the pixel coordinates included in the preset edge information as first coordinates, and to determine the pixel coordinates included in the edge information as second coordinates; for any first coordinate, if there is no second coordinate matching the first coordinate, the first coordinate is determined as a target coordinate; when the number of the target coordinates is greater than a preset number threshold, it is determined that the edge information does not match the preset edge information; when the number of the target coordinates is not greater than the preset number threshold, it is determined that the edge information matches the preset edge information.

[0126] Processor 510 is also used to, for any of the first coordinates, take the pixel point corresponding to the first coordinate in the eye image as the center pixel point, and determine a pixel area of ​​a preset size centered on the center pixel point as a reference pixel area; if there is no second coordinate belonging to the reference pixel area, determine that there is no second coordinate matching the first coordinate; if there is a second coordinate belonging to the reference pixel area, determine that there is a second coordinate matching the first coordinate.

[0127] The advantages of the electronic device and the detection method of the refractive correction lens described in the above embodiment over the related art are the same, which will not be described in detail here.

[0128] It should be understood that in the embodiment of the present application, the input unit 504 may include a graphics processor (GPU) 5041 and a microphone 5042, and the graphics processor 5041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 507 includes a touch panel 5071 and at least one of other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts: a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0129] The memory 509 can be used to store software programs and various data. The memory 509 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 509 may include a volatile memory or a non-volatile memory, or the memory 509 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 509 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0130] The processor 510 may include one or more processing units; in some embodiments, the processor 510 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 510.

[0131] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned detection method of the refractive correction lens is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Wherein, the processor is the processor in the electronic device described in the above-mentioned embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a disk or an optical disk, etc. The embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement each process of the above-mentioned detection method of the refractive correction lens, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. It should be understood that the chip mentioned in the embodiment of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc. The embodiment of the present application provides a computer program product, which is stored in a storage medium, and the program product is executed by at least one processor to implement each process of the above-mentioned detection method of the refractive correction lens, and the same technical effect can be achieved. To avoid repetition, it is not repeated here.

[0132] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0133] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0134] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for detecting a refractive correction lens, characterized in that: Applied to a head mounted display device, the head mounted display device has a built-in shooting component, the method comprises: When it is detected that the head mounted display device is worn, photographing in the direction of the eyes based on the photographing component to obtain an eye image; Matching edge information of the eye region in the eye image with preset edge information; the preset edge information is edge information of the eye region in a reference eye image, and the reference eye image is obtained by photographing the eye direction based on the photographing component when the head mounted display device is not configured with a refractive correction lens; If the edge information does not match the preset edge information, it is determined that the head mounted display device is currently configured with a refractive correction lens.

2. The method according to claim 1, characterized in that The method further comprises: When it is determined that the head mounted display device is currently equipped with a refractive correction lens, a refractive information input interface is displayed; the refractive information input interface is used to prompt the user to input refractive information; Refractive information input by a user in the refractive information input interface is received.

3. The method according to claim 1, characterized in that The method of obtaining an eye image by shooting in the direction of the eye based on the shooting component includes: obtaining the eye image by shooting in the direction of the eye based on the shooting component according to specified shooting parameters; The reference eye image is obtained by: In the case where a refractive correction lens is not configured, the reference eye image is obtained by shooting in the direction of the eye based on the shooting component according to the specified shooting parameters.

4. The method according to claim 1, characterized in that: Before matching the edge information of the eye region in the eye image with the preset edge information, the method further includes: Performing binarization processing on the eye image according to a preset pixel value threshold; Based on a preset edge detection algorithm, pixel coordinates of edge pixel points of an eye region in the eye image after the binarization process are acquired to obtain the edge information; The preset edge information is obtained in the following manner: binarizing the reference eye image according to the preset pixel value threshold; based on the preset edge detection algorithm, obtaining the pixel coordinates of the edge pixel points of the eye area in the reference eye image after the binarization process to obtain the preset edge information.

5. The method according to claim 4, characterized in that After obtaining the preset edge information, the method further includes: storing the preset edge information in a designated directory of the head mounted display device; Before matching the edge information of the eye region in the eye image with the preset edge information, the method further includes: loading the preset edge information from the designated directory.

6. The method according to any one of claims 1 to 5, characterized in that: The matching the edge information of the eye region in the eye image with the preset edge information includes: Determining pixel coordinates included in the preset edge information as first coordinates, and determining pixel coordinates included in the edge information as second coordinates; For any of the first coordinates, if there is no second coordinate matching the first coordinate, determining the first coordinate as the target coordinate; When the number of the target coordinates is greater than a preset number threshold, determining that the edge information does not match the preset edge information; When the number of the target coordinates is not greater than the preset number threshold, it is determined that the edge information matches the preset edge information.

7. The method according to claim 6, characterized in that The method further comprises: For any of the first coordinates, taking the pixel point corresponding to the first coordinate in the eye image as the central pixel point, and determining a pixel area of ​​a preset size centered on the central pixel point as a reference pixel area; If there is no second coordinate belonging to the reference pixel area, determining that there is no second coordinate matching the first coordinate; If there is a second coordinate belonging to the reference pixel area, it is determined that there is a second coordinate matching the first coordinate.

8. A detection device for a refractive correction lens, characterized in that: Applied to a head mounted display device, the head mounted display device has a built-in shooting component, and the device comprises: A first shooting module is used for shooting in the direction of the eyes based on the shooting component to obtain an eye image when detecting that the head mounted display device is worn; a matching module, configured to match edge information of an eye region in the eye image with preset edge information; the preset edge information is edge information of the eye region in a reference eye image, and the reference eye image is obtained by photographing the eye direction based on the photographing component when the head mounted display device is not configured with a refractive correction lens; The first determination module is configured to determine that the head mounted display device is currently configured with a refractive correction lens if the edge information does not match the preset edge information.

9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the detection method of the refractive correction lens as described in any one of claims 1 to 7 are implemented.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the detection method of the refractive correction lens as described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Refraction-corrective lens detection method, and electronic device

    WO2026098393A1