VR-based automatic optometry and glasses fitting method, device, smart glasses and storage medium
Through the VR-based automatic optometry and glasses fitting method, the infrared camera and liquid lens are used to detect and adjust the diopter, which solves the problem of vision detection and correction when wearing VR glasses, and improves the wearing experience and vision protection effect.
Patent Information
- Application Number
- CN202311227649.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-21
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-09-21
AI Technical Summary
Existing technology is difficult to effectively detect and correct vision when wearing VR glasses, especially for people with nearsightedness or farsightedness. The shape and specifications of glasses are different for each person, which affects the wearing experience of VR glasses.
A VR-based automatic optometry method is used to obtain human eye images through infrared cameras, extract iris elliptical features, calculate the gaze direction, and use liquid lenses and interactive prompts to adjust the diopter to match the user's visual acuity.
It realizes convenient vision detection and correction, improves the VR experience, and is especially beneficial for young people in terms of vision protection, and the detection and correction effects are more accurate.
Smart Images

Figure CN117045191B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart glasses, and in particular to a VR-based automatic optometry and glasses fitting method, device, smart glasses and storage medium. Background Art
[0002] There are many types of smart glasses, mainly including mainstream VR glasses and eye trackers. Eye tracking is a process of identifying what someone is looking at and how they are looking at it. It has been widely used in many fields such as human-computer interaction, virtual reality, vehicle assisted driving, human factors analysis and psychological research. From the physiological structure of the eyeball, humans mainly obtain visual data through the fovea, which can only provide about 1-2 degrees of viewing angle. Although this area only occupies a very small part of the visual field, the information recorded by this area contains 50% of the effective visual information transmitted to the brain through the optic nerve. Therefore, the human visual and attention systems work around one main goal: to focus the optical imaging of the target of interest on the fovea. This is the most fundamental and main reason for eye movement behavior.
[0003] In society, due to improper use of eyes and eye fatigue, more and more people are short-sighted or long-sighted. When people test their eyesight, they usually go to an ophthalmologist or an eyewear store and use a vision chart. People usually go to test their eyesight with the intention of buying glasses. If they just want to test their eyesight, it seems too troublesome to go to a hospital or an eyewear store.
[0004] Also, in the prior art, if people with myopia or hyperopia want to better experience VR glasses, they need to wear vision correction glasses at the same time. However, since the shapes and specifications of each person's glasses are different, wearing vision correction glasses can easily affect the wearing of VR glasses, which needs to be solved. Summary of the invention
[0005] In view of the above technical problems, the present invention provides a VR-based automatic eye examination and glasses fitting method, device, smart glasses and storage medium to provide a technical solution that can detect and correct vision anytime and anywhere.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to one aspect of the present invention, a VR-based automatic optometry and glasses fitting method is disclosed, the method comprising:
[0008] Acquire an image of a human eye illuminated by infrared light, taken by an infrared camera;
[0009] Processing the human eye image, extracting iris ellipse features in the human eye image, and calculating the current gaze direction of the human eye;
[0010] A liquid lens and a visual acuity chart are arranged in front of the user's eyes, wherein the liquid lens comprises a container filled with a fluid and an elastic film arranged on the container and capable of changing the diopter as the filling amount of the fluid changes, and the visual acuity chart comprises visual acuity icons in multiple directions representing a certain visual acuity value;
[0011] The vision icon interactively prompts the user to look in a certain direction through the liquid lens;
[0012] Determine whether the vision icon that the human eye is looking at is in the same direction as the vision icon that prompts the user to look at, so as to determine whether the current refractive power of the liquid lens matches the vision value of the user;
[0013] If they do not match, the filling amount of the fluid is adjusted so that the diopter of the liquid lens matches the user's vision value.
[0014] Furthermore, the extracting of the iris ellipse feature in the human eye image and calculating the current gaze direction of the human eye includes:
[0015] Extracting the iris ellipse features and eye corner coordinates in the human eye image, wherein the iris ellipse features include the ellipse major axis, minor axis, iris center and inclination;
[0016] According to the iris ellipse features and the eye corner coordinates in the multiple eye images of the same eye, the iris center, iris radius and iris normal vector of the current eye are calibrated to calculate the corneal curvature center;
[0017] The current gaze direction of the human eye is obtained according to the iris center and the corneal curvature center.
[0018] Furthermore, when processing the human eye image, it specifically includes:
[0019] Preprocessing the human eye image, wherein the preprocessing at least includes distortion correction, image smoothing and light normalization;
[0020] An iris image in the preprocessed human eye image is acquired, wherein the iris image includes an elliptical feature of the human eye's iris.
[0021] Furthermore, the step of obtaining the preprocessed iris image in the human eye image includes:
[0022] Removing the background of the non-human eye area in the preprocessed human eye image;
[0023] Based on a multi-threshold operation, a high threshold is used to obtain a first binarized image of the human eye image with the background removed, and a low threshold is used to obtain a second binarized image of the original human eye image, wherein at least an iris region of the human eye is displayed in the first binarized image and the second binarized image;
[0024] The non-iris background of the first binary image and the second binary image is removed, and the first binary image and the second binary image after the background removal are fused to obtain the iris image.
[0025] Furthermore, after obtaining the iris image in the preprocessed human eye image, the method further includes:
[0026] Determining the edge contour of the iris in the iris image based on boundary hub analysis;
[0027] Fitting the edge contour to obtain an iris ellipse, and using the center coordinates of the iris ellipse as the iris center of the human eye image;
[0028] Display multiple calibration points in front of the human eye;
[0029] When the human eye gazes at each of the calibration points in sequence, calculating the iris center of the corresponding captured human eye image;
[0030] Associatively mapping the coordinates of the iris center and the coordinates of the correction point to obtain a correction relationship between the coordinates of the iris center and the correction point;
[0031] The gaze direction is obtained according to the correction relationship and the iris center.
[0032] Further, the determining whether the direction of the vision icon that the human eye is gazing at is consistent with the direction of the vision icon that prompts the user to gaze at, so as to determine whether the current refractive power of the liquid lens matches the vision value of the user, specifically includes:
[0033] If the vision icon that the human eye is looking at is in the same direction as the vision icon that prompts the user to look at, the vision icons in other directions of the same level of vision value continue to be displayed; if the directions of the multiple vision icons that the human eye is looking at and the multiple vision icons of the current level of vision value are all consistent, it is determined that the current refractive power of the liquid lens matches the user's vision value;
[0034] The step of adjusting the filling amount of the fluid so that the diopter of the liquid lens matches the vision value of the user comprises:
[0035] The filling amount of the fluid is adjusted until the user can clearly see the vision icon representing a certain vision value, and the current refractive power of the liquid lens is used as the user's optometry degree.
[0036] Further, the determining whether the direction of the vision icon that the human eye is gazing at is consistent with the direction of the vision icon that prompts the gaze, comprises:
[0037] Establish a mapping between the three-dimensional coordinate system of the current gaze direction in the infrared camera and the plane coordinate system of the vision icon to obtain the landing point of the gaze direction in the plane coordinate system of the vision icon;
[0038] Determine whether the landing point is within the trigger range of the vision icon that prompts the gaze, and if so, determine that it is consistent;
[0039] Among them, different vision icons of the same level have four directions.
[0040] According to a second aspect of the present disclosure, there is provided an automatic optometry and glasses fitting device based on VR, comprising: an image acquisition unit, for acquiring an image of a human eye illuminated by infrared light and taken by an infrared camera; an image processing unit, for processing the image of the human eye, extracting iris ellipse features in the image of the human eye, and calculating the current gaze direction of the human eye; a display unit, for displaying the contents of a vision chart in front of the human eye, the contents of the vision chart including vision icons of multiple directions representing a certain vision value, interactively prompting a user to gaze at the vision icon in a certain direction; a refractive adjustment unit, the refractive adjustment unit being arranged at In front of the human eye, it includes a container filled with fluid, an elastic film arranged on the container and capable of changing the diopter as the filling amount of the fluid changes; an optometry and glasses fitting control unit, used for interactively prompting the user to look at the vision icon in a certain direction through the refractive adjustment unit, judging whether the vision icon looked at by the human eye is consistent with the direction of the vision icon prompted to look, so as to judge whether the current diopter of the refractive adjustment unit matches the user's vision value; if not, adjusting the filling amount of the fluid so that the diopter of the refractive adjustment unit matches the user's vision value.
[0041] According to a third aspect of the present disclosure, there is provided a pair of smart glasses, comprising: one or more infrared cameras, respectively pointing to the left and right human eyes; an infrared floodlight emitter, facing the human eyes; a display screen; a liquid lens, the liquid lens comprising a container filled with a fluid, and an elastic film disposed on the container, the refractive power of which can change with the filling amount of the fluid; one or more processors; a storage device, for storing one or more programs, so that when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned VR-based automatic eye examination and glasses fitting method.
[0042] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, storing a computer program, wherein when the computer program is executed by a processor, the automatic eye examination and glasses fitting method based on VR as described above is implemented.
[0043] The technical solution disclosed in this disclosure has the following beneficial effects:
[0044] Based on this method, according to eye tracking and interactive operations, people can conveniently use VR glasses with cameras to detect their eyesight, making it easier for people to understand their own eyesight, especially for teenagers, which is more conducive to encouraging teenagers to protect their eyesight.
[0045] The process of detecting and correcting vision is based on a liquid lens that can change the refractive power. Therefore, the detection and correction effects will be more accurate. In addition, using the liquid lens that determines the refractive power as a dedicated configuration for the user can greatly improve the user's VR experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a flow chart of a VR-based automatic optometry and glasses fitting method in an embodiment of this specification;
[0047] Figure 2 is a demonstration diagram of the vision chart in the embodiments of this specification;
[0048] Figure 3 is a structural principle diagram of a liquid lens in an embodiment of this specification;
[0049] Figure 4 is a flow chart of another gaze direction calculation method in an embodiment of this specification;
[0050] Figure 5 It is a structural block diagram of the automatic optometry and glasses fitting device based on VR in the embodiment of this specification;
[0051] Figure 6 It is a terminal device of the gaze point tracking method in the embodiment of this specification;
[0052] Figure 7 This is a structural block diagram of the smart glasses in the embodiments of this specification;
[0053] Figure 8 A computer-readable storage medium for the gaze tracking method in the embodiments of this specification. DETAILED DESCRIPTION
[0054] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0055] In addition, the accompanying drawings are only schematic illustrations of the present disclosure. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities, which do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0056] like Figure 1 As shown, the embodiment of this specification provides a method for automatic eye examination and glasses fitting based on VR, and the execution subject of the method can be a computer, a server, a wearable smart device, etc. The method can specifically include the following steps S101 to S104:
[0057] In step S101, an image of a human eye illuminated by infrared light captured by an infrared camera is obtained.
[0058] The number of infrared cameras can be any, as long as they can capture a complete image of the human eye. Using an infrared camera plus infrared light can avoid the limitations of a visible light camera. For example, a visible light camera requires light to illuminate in order to obtain a clear photo. Since the object being photographed is the human eye, visible light sources can cause discomfort to the human eye, thus affecting the acquisition effect. In addition, generally speaking, the imaging of an infrared camera is a grayscale image, so there is no need for special grayscale processing in subsequent image processing, which can improve processing efficiency.
[0059] In step S102, the human eye image is processed, the iris ellipse feature in the human eye image is extracted, and the current gaze direction of the human eye is calculated.
[0060] Generally speaking, the iris contour can be approximated as an ellipse or a near circle. The iris ellipse features include the iris center coordinates, the major axis length (or radius), the minor axis length (or radius), the rotation angle (inclination), etc. of the circle based on the graphic shape itself, and can also include the ratio of black and white pixels in the iris part of the image, and the standard deviation of the radius corresponding to the heterochromatic edge. These features can be used to calculate the shape and position of the iris contour, and then calculate the iris normal vector, and thus the gaze direction.
[0061] In step S103, a liquid lens is placed in front of the user's eyes and the contents of a vision chart are displayed. The liquid lens includes a container filled with fluid, and an elastic film disposed on the container that can change the refractive power as the filling amount of the fluid changes. The contents of the vision chart include vision icons in multiple different directions representing a certain vision value.
[0062] Among them, the visual acuity chart may be displayed on the display screen of the VR glasses, such as Figure 2 As shown, the vision chart has four directions, namely "up, down, left, and right". When displaying the vision chart, a row of multiple vision icons representing the same vision can be displayed, and these vision icons should include all directions. It is also possible to display vision icons of the same vision value in each direction one by one on the display screen. When the vision icons are displayed, interactive prompts are given to the user to cooperate, such as displaying text on the display screen or using voice reminders.
[0063] like Figure 3 The liquid lens may include a transparent container 1 and a transparent elastic film 2 formed on the container 1, a fluid 3, i.e., a transparent medium, is arranged between the film 2 and the container 1, the container 1 may have a flat surface, and may also include a pump body 4 and a liquid storage tank 5 for storing the fluid, when the pump body 4 draws the fluid from the liquid storage tank 5 into the container 2, the film 3 expands to form a convex shape, when the light passes through the container 2, the fluid 4, and the convex film 2 from the flat side of the container 2, the light is diffused, i.e., the diopter changes, which plays a role in correcting vision, such as Figure 3 As shown in a; when the content of the fluid 3 in the container 1 changes so that the film 2 is level with the flat side of the container 1, as shown in Figure 3 As shown in b, the light passing through is not affected and vision is not corrected; Figure 3 As shown in c, when the fluid in the container 1 is extracted, the film 2 is sunken to form a concave shape, and the light passing through is gathered, which plays a role in correcting vision.
[0064] In step S104, the user is interactively prompted to look at the vision icon in a certain direction through the liquid lens.
[0065] In step S105, it is determined whether the vision icon that the human eye is gazing at is in the same direction as the vision icon that prompts the user to gaze at, so as to determine whether the current diopter of the liquid lens matches the vision value of the user.
[0066] In step S106, if there is a mismatch, the filling amount of the fluid is adjusted so that the diopter of the liquid lens matches the user's vision value.
[0067] Among them, in the execution of the above steps S104-S106, the three-dimensional coordinate system of the gaze direction in the infrared camera and the plane coordinate system of the vision icon are mapped to obtain the landing point of the gaze direction in the plane coordinate system of the vision icon; it is determined whether the landing point is within the trigger range of the vision icon prompted, if so, the gaze direction is consistent with the direction of the vision icon, wherein the multiple vision icons of the same level include at least four equally divided directions, specifically up, down, left, and right. That is, the screen area displaying the vision icon is divided into four equal parts, each of which represents a direction. When the landing point is located in the first equal part, it means that the user indicates the vision direction of the first equal part. Exemplarily, four vision icons are displayed on the screen, and the directions of these four vision icons are up, down, left, and right, respectively. At this time, the user is reminded by voice or large text display that the single eye is gazing at the vision icon with the direction up, and the user then looks at the vision icon with the direction up as the answer. At this time, according to the human eye image captured by the infrared camera in real time, the vision icon selected by the user is obtained after analysis, which can be judged as consistent in direction. Of course, in one display, there can be more than four vision icons, but two, six, eight, etc., and the directions are not necessarily four, but two, three, four, etc. For example, six vision icons are displayed at one time, with two in the up direction, three in the down direction, and one in the left direction; two in the left direction, two in the right direction, and two in the up or down direction; or eight in one time, with two in each of the four directions of up, down, left, and right, etc.
[0068] In addition, as an explanation of the principle of vision testing, the standard definition of normal vision is that when looking at things at infinity, the eyes do not need to adjust, and the external objects are refracted by the refractive system and fall just on the retina. This is called emmetropia. Generally, light rays five meters away are considered to be parallel rays. There is also the influence of degree, which is generally 1 / 5, and there is 20 degrees of myopia, which is artificially introduced. Normal lenses are replaced at 25 degrees, so 20 degrees can also be ignored. However, when checking at a position of 3 meters, it is 1 / 3, which is 33 degrees. Walk forward, for example, standing at a position of 1 meter, the eye chart is 1.0, but in fact it is 1 / 1, and 100 degrees of myopia is ignored. Therefore, in physical space, the physical eye chart should be 5 meters away from the human eye. The closer the distance, the greater the error.
[0069] Therefore, in one embodiment, the vision chart of the present application is designed according to the optical properties of the human eye, and is designed according to the minimum viewing angle for the eye to distinguish objects. Wherein, viewing angle: the angle between the line of sight and the vertical direction of the display screen, that is, the angle formed by the intersection of light rays drawn from the two ends (up, down or left, right) of the object in the human eye when observing the object. The smaller the size of the object, the smaller the viewing angle when standing farther away. Generally speaking, the minimum viewing angle for a normal eye to distinguish two points on an object is about 1'. In order to reduce the error of VR vision detection, the virtual image of the vision icon displayed in front of the human eye set in this embodiment is visually equivalent to a distance of five meters from a single human eye in physical space. This is achieved by controlling the size of the vision icon to avoid the vision icon being too close, causing the human eye to be in a state of refractive adjustment, which leads to errors in vision measurement.
[0070] Common such as Figure 2 In the E-letter eye chart shown, when the observer's eyes can clearly see the direction of an E-shaped opening (the distance of the gap or opening is 1.5mm) 5 meters away in the physical space, the distance of this gap in the retinal image is about 5μm according to calculation, which is exactly the minimum visual angle 1' that the eye can distinguish objects. At this time, it can be determined that the eyesight is normal and is set to 1.0. If the size of the E-letter gap needs to be increased, or the distance from the eye to the eye chart needs to be reduced to see the letter clearly, then it means that the normal vision level cannot be achieved, which is the principle of vision detection in this application.
[0071] Based on the vision detection principle, if the vision icon that the human eye is looking at is in the same direction as the vision icon that prompts the user to look at, the vision icons in other directions of the same level of vision value will continue to be displayed. If the directions of the multiple vision icons that the human eye is looking at and the multiple vision icons of the current level of vision value are all consistent, it is determined that the current refractive power of the liquid lens matches the user's vision value.
[0072] If the current refractive power of the liquid lens cannot adapt to the user's vision, that is, the user cannot correctly judge the square of the vision icon, the filling amount of the fluid is adjusted until the user can clearly see the vision icon representing a certain vision value, and then repeat the above operation to display the vision icons in other directions of the same level of vision value. If the directions of the multiple vision icons that the human eye is looking at are calculated in sequence are consistent with the directions of the multiple vision icons of the current level of vision value, the current refractive power of the liquid lens is used as the user's optometry degree, and the optometry degree is used to correct the user's vision in the subsequent VR content display to obtain a better VR experience.
[0073] In one embodiment, a method for calculating gaze direction is provided, which can be applied to multiple human eye images taken by multiple infrared cameras, and the calculation includes:
[0074] The iris ellipse features and eye corner coordinates in the human eye image are extracted, wherein the iris ellipse features include the ellipse major axis, minor axis, iris center and inclination.
[0075] Generally speaking, the iris contour can be approximated as an ellipse. The iris ellipse features include the iris center coordinates, major axis length, minor axis length, rotation angle (inclination), etc. These features can be used to calculate the shape and position of the iris contour.
[0076] According to the iris ellipse features and the eye corner coordinates in the multiple eye images of the same eye, the iris center, iris radius and iris normal vector of the current eye are calibrated to calculate the corneal curvature center.
[0077] After obtaining the iris ellipse feature and eye corner coordinates, the iris center, iris radius, iris normal vector and other data can be calculated, and then the corneal curvature center can be calculated. The corneal curvature center is usually the projection point of the iris center on the corneal surface. When there are multiple infrared cameras shooting the same human eye, and each infrared camera is arranged in different directions, after obtaining multiple human eye images in multiple directions relative to the human eye, since the position of each infrared camera is known, the position of the corneal curvature center can be determined after calibration calculation.
[0078] The current gaze direction of the human eye is obtained according to the iris center and the corneal curvature center.
[0079] Among them, since there are multiple infrared cameras for the same human eye, a unified world coordinate system can be established for the multiple infrared cameras first. It can be assumed that the coordinate system of the infrared camera located at the center is the unified world coordinate system. The other infrared cameras are described by rotation and translation matrices according to their relative relationship with the central infrared camera. Based on the corresponding spatial ellipse feature parameter equation, the iris ellipse feature is decomposed, and the iris center and iris ellipse normal vector in the human eye image collected by each infrared camera are calculated and expressed as a straight line in three-dimensional space.
[0080] The iris ellipse normal vector of each infrared camera is mapped to the world coordinate system, and can be calculated based on the transformation matrix between each infrared camera coordinate system and the unified world coordinate system.
[0081] The center of corneal curvature is obtained based on the intersection of the iris ellipse normal vectors corresponding to each infrared camera in the world coordinate system. Specifically, the center of corneal curvature in the unified world coordinate system is calculated. The center of corneal curvature can be approximately considered as the intersection of the straight lines of the iris ellipse normal vectors collected by multiple infrared cameras in the unified world coordinate system, but in actual situations, it is impossible to have an ideal intersection. Therefore, the average value of the midpoints of the two common perpendicular lines can be used to determine it, that is, the center of corneal curvature can be estimated.
[0082] The corneal curvature center in the world coordinate system is mapped to the coordinate system of a separate infrared camera, and the predicted sight direction of each infrared camera is obtained according to the corneal curvature center and the iris center of each infrared camera in its coordinate system to obtain the gaze direction. Specifically, according to the predicted sight direction of each infrared camera, an average processing or a weighted average processing is performed on it to obtain the predicted sight direction, that is, the gaze direction.
[0083] In another embodiment, if the infrared camera has low resolution and poor clarity, and there is only one infrared camera for the same human eye, it will be difficult to directly analyze the iris center from the human eye image. Therefore, another method for analyzing the gaze direction is provided in an embodiment of the present invention, such as Figure 3 As shown, the method includes the following steps S401-S403:
[0084] In step S401, the human eye image is preprocessed, and the preprocessing at least includes distortion correction, image smoothing and light normalization, and an iris image in the preprocessed human eye image is obtained, and the iris image includes an iris ellipse feature of the human eye.
[0085] Specifically, the original human eye image captured by a low-cost small infrared camera has a lot of noise and low pixel stability. Therefore, the human eye image needs to be preprocessed multiple times to make the image suitable for subsequent analysis. In addition, the value of the infrared camera can be set in advance to increase the shooting brightness. In this way, the iris will appear as dark content in the obtained human eye image, and the skin, background, and non-iris area in the human eye will appear as bright content.
[0086] First, due to the hardware characteristics and manufacturing methods of each infrared camera, deformed images may be produced. Therefore, it is necessary to obtain the camera parameters (intrinsic and external parameters) in advance to reversely deform the human eye image, that is, distortion correction.
[0087] After distortion correction, the human eye image can be smoothed using a bilateral filter to retain the edge of the human eye area containing the iris ellipse feature, as follows:
[0088]
[0089]
[0090] Where p is the target pixel, q is a pixel around the target pixel p, Ip is the color of the target pixel, Iq is the color of the pixels around the target pixel, s is the pixel group around the target pixel, Gδ s is the pixel weighted according to the distance, and Gδr is the value weighted according to the pixel color difference.
[0091] In addition, in order to further eliminate the noise in the human eye image and make the color uniform, a mean shift filter can be further used:
[0092]
[0093] Among them, S h is a high-dimensional sphere with radius h. A mean shift filter is used to smooth pixels of similar colors in the image and preserve the edges of the human eye area.
[0094] Since the human eye is close to the screen, the brightness of the screen will affect the image light, and the image thresholds obtained at different times are different from the thresholds of the binary image. Therefore, light normalization is performed and the depth information of the pixels is used to convert the human eye image into a grayscale image to reduce the amount of calculation.
[0095] In addition, in order to ensure the continuity of the iris contour in the subsequent human eye image and avoid the appearance of breakpoints and fragments, the processed human eye image can also be subjected to corrosion operation to enlarge the dark part in the human eye image; because the corrosion operation will cause the iris in the image to deform, the human eye image after the corrosion operation is subjected to dilation operation to enlarge the bright part in the human eye image, that is, the iris in the image is restored to its normal size as much as possible, so that the dark color (black pixel) iris part in the image is more continuous.
[0096] Among them, after the above preprocessing, it is necessary to obtain the iris part in the preprocessed human eye image so that the pupil or iris center in the iris can be determined, and the following operations are performed:
[0097] The non-human eye area background in the preprocessed human eye image is removed. Based on a multi-threshold operation, a high threshold is used to obtain a first binarized image of the human eye image with the background removed, and a low threshold is used to obtain a second binarized image of the original human eye image. The first binarized image and the second binarized image at least show an iris area of the human eye. The non-iris background of the first binarized image and the second binarized image is removed, and the first binarized image and the second binarized image after the background is removed are fused to obtain the iris image.
[0098] Specifically, when photographing human eyes, a single infrared camera is used and the ideal position of the infrared camera is located inside the two eyes for easy installation. The infrared camera points to the human eyes and may photograph content that does not belong to the human body, which can also be described as photographing non-human eye content. In order to extract the iris ellipse feature and avoid interference in the extraction process, the non-human eye content needs to be removed, that is, to avoid the black pixels in the non-human eye content interfering with the extraction of the dark part (black pixels) in the iris.
[0099] Subsequently, it is necessary to obtain an iris image. Since a possible iris image contains brighter reflection points and darker pixels far away from the light source, a single threshold cannot be appropriately used to identify the iris. Using a high threshold and a low threshold as intervals, the two threshold binarization results of the iris image are combined so that the black pixels in the processed human eye image are retained, and the black pixels at the iris position in the original human eye image are retained. The combination of the two makes the imaged black image an accurate iris image.
[0100] In step S402, based on the boundary hub analysis, the edge contour of the iris in the iris image is determined; the edge contour is fitted to obtain an iris ellipse, and the center coordinates of the iris ellipse are used as the iris center of the human eye image.
[0101] The iris image obtained above is a binary image composed of black pixels and white pixels. Therefore, the iris image can be subjected to boundary contour analysis to obtain an irregular ellipse-like shape, and then the contour can be fitted. Since the ellipse is a continuous and smooth shape, the fitting can be specifically to reconnect the gaps and line segments with large bending angles of the contour to obtain an elliptical iris shape, and the center coordinates of the iris ellipse are the iris center in the original human eye image.
[0102] In step S403, multiple correction points are displayed in front of the human eye. When the human eye gazes at each of the correction points in turn, the iris center of the corresponding captured human eye image is calculated, and the coordinates of the iris center are associated with the coordinates of the correction points and mapped to obtain a correction relationship between the coordinates of the iris center and the correction points. Based on the correction relationship and the iris center, the gaze direction is obtained.
[0103] After calculating the coordinates of the iris center point in the image, the correlation between the iris center and the coordinates of the gaze point on the screen can be evaluated, and then the current gaze direction of the human eye can be obtained. Specifically, the evaluation method includes: displaying multiple correction points in front of the human eye; when the human eye gazes at each correction point in turn, calculating the iris center of the corresponding captured human eye image; associating and mapping the coordinates of the iris center with the coordinates of the correction point to obtain the correction relationship between the coordinates of the iris center and the correction point; and obtaining the gaze direction based on the correction relationship and the iris center.
[0104] Since eye movement is nonlinear, the second-order polynomial formula can be used for calculation:
[0105] S x =a6x 2 +a5y 2 +a4xy+a3x+a2y+a1
[0106] S y =b6x 2 +b5y 2 +b4xy+b3x+b2y+b1
[0107] Sx and Sy are the coordinate points on the screen; x and y are the images of the human eye captured by the camera. The conversion is performed through 12 unknown parameters such as a1~a6 and b1~b6, which are obtained through nine calibration points. After the calibration process is completed, in subsequent use, after calculating the iris center, you can directly go to the intersection of the gaze direction on the display screen.
[0108] Based on the above steps S401-S403, a single infrared camera can be used, and the gaze direction can be accurately analyzed through a low-resolution human eye image, which has the advantages of low cost and fast response.
[0109] Based on the same idea, Figure 5As shown, the exemplary embodiment of the present disclosure also provides an automatic optometry and eyeglass fitting device based on VR, comprising: an image acquisition unit 501, used to acquire an image of a human eye illuminated by infrared light and taken by an infrared camera; an image processing unit 502, used to process the image of the human eye, extract the iris ellipse feature in the image of the human eye, and calculate the current gaze direction of the human eye; a display unit 503, used to display the contents of a vision chart in front of the human eye, the contents of the vision chart including vision icons of multiple directions representing a certain vision value, interactively prompting the user to gaze at the vision icon in a certain direction; a refractive adjustment unit 504, the refractive adjustment unit 505, The adjustment unit is arranged in front of the human eye, and comprises a container filled with fluid, and an elastic film arranged on the container, the diopter of which changes as the filling amount of the fluid changes; the optometry and glasses fitting control unit 505 is used to interactively prompt the user to look at the vision icon in a certain direction through the refractive adjustment unit, and judge whether the vision icon looked at by the human eye is consistent with the direction of the vision icon prompted to look, so as to judge whether the current diopter of the refractive adjustment unit matches the user's vision value; if not, adjust the filling amount of the fluid so that the diopter of the refractive adjustment unit matches the user's vision value.
[0110] Based on the above device, according to eye tracking and interactive operations, people can conveniently use VR glasses with cameras to detect their eyesight, making it easier for people to understand their own eyesight, especially for teenagers, which is more conducive to encouraging teenagers to protect their eyesight.
[0111] The process of detecting and correcting vision is based on a liquid lens that can change the refractive power. Therefore, the detection and correction effects will be more accurate. In addition, using the liquid lens that determines the refractive power as a dedicated configuration for the user can greatly improve the user's VR experience.
[0112] The specific details of each unit in the above device have been described in detail in the implementation method of the method part. The undisclosed details can be found in the implementation method of the method part, so they will not be repeated here.
[0113] Based on the same idea, the embodiment of this specification also provides an automatic eye examination and glasses fitting device based on VR, such as Figure 5 shown.
[0114] The VR-based automatic eye examination and glasses fitting device may be the terminal device or server provided in the above-mentioned embodiment.
[0115] The VR-based automatic optometry and eyeglass fitting device may have relatively large differences due to different configurations or performances, and may include one or more processors 601 and memory 602, and the memory 602 may store one or more storage applications or data. Among them, the memory 602 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) and / or a cache storage unit, and may further include a read-only storage unit. The application stored in the memory 602 may include one or more program modules (not shown in the figure), such program modules include but are not limited to: an operating system, one or more applications, other program modules, and program data, each of these examples or some combination may include the implementation of a network environment. Furthermore, the processor 601 can be configured to communicate with the memory 602 to execute a series of computer executable instructions in the memory 602 on the VR-based automatic optometry and eyeglass fitting device. The VR-based automatic optometry device may also include one or more power supplies 603, one or more wired or wireless network interfaces 604, one or more I / O interfaces (input and output interfaces) 605, one or more external devices 606 (such as keyboards, pointing devices, Bluetooth devices, etc.), and may also communicate with one or more devices that enable a user to interact with the device, and / or communicate with any device that enables the device to communicate with one or more other computing devices (such as routers, modems, etc.). Such communication may be performed through the I / O interface 605. In addition, the device may also communicate with one or more networks (such as a local area network (LAN)) through the wired or wireless interface 604.
[0116] Specifically, in this embodiment, the VR-based automatic optometry and eyeglass fitting device includes a memory 602 and one or more programs, wherein the one or more programs are stored in the memory 602, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the VR-based automatic optometry and eyeglass fitting device, and the one or more programs are configured to be executed by one or more processors 601, including the following computer executable instructions:
[0117] Acquire an image of a human eye illuminated by infrared light and taken by an infrared camera; process the image of the human eye, extract the iris ellipse feature in the image of the human eye, and calculate the current gaze direction of the human eye; place a liquid lens in front of the user's eyes and display the contents of a vision chart, the liquid lens comprising a container filled with fluid, and an elastic film disposed on the container, the refractive power of which can change as the filling amount of the fluid changes, the contents of the vision chart comprising vision icons of multiple different directions representing a certain vision value; interactively prompt the user to look at the vision icon in a certain direction through the liquid lens; determine whether the direction of the vision icon being looked at by the human eye is consistent with the direction of the vision icon prompted to be looked at, so as to determine whether the current refractive power of the liquid lens matches the user's vision value; if not, adjust the filling amount of the fluid to make the refractive power of the liquid lens match the user's vision value.
[0118] Based on the same idea, the embodiment of this specification also provides a smart glasses, such as Figure 5 As shown, the smart glasses include: at least two infrared cameras 701, which are respectively directed to the left and right human eyes; at least two visible light cameras 702, which are respectively directed to the front of the left and right human eyes; an infrared flood emitter 703, which is directed to the human eyes; one or more processors 704; a liquid lens 706, which includes a container filled with a fluid and an elastic film disposed on the container, which can change the diopter as the filling amount of the fluid changes; a storage device 705, which is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors 704 implement the following method:
[0119] Acquire an image of a human eye illuminated by infrared light and taken by an infrared camera; process the image of the human eye, extract the iris ellipse feature in the image of the human eye, and calculate the current gaze direction of the human eye; place a liquid lens in front of the user's eyes and display the contents of a vision chart, the liquid lens comprising a container filled with fluid, and an elastic film disposed on the container, the refractive power of which can change as the filling amount of the fluid changes, the contents of the vision chart comprising vision icons of multiple different directions representing a certain vision value; interactively prompt the user to look at the vision icon in a certain direction through the liquid lens; determine whether the direction of the vision icon being looked at by the human eye is consistent with the direction of the vision icon prompted to be looked at, so as to determine whether the current refractive power of the liquid lens matches the user's vision value; if not, adjust the filling amount of the fluid to make the refractive power of the liquid lens match the user's vision value.
[0120] Based on the same idea, the exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of the present specification.
[0121] refer to Figure 8 As shown, a program product 800 for implementing the above method according to an exemplary embodiment of the present disclosure is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0122] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0123] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0124] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0125] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0126] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the exemplary implementation of the present disclosure.
[0127] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiment of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0128] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0129] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0130] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0131] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A VR-based automatic optometry and glasses fitting method, characterized in that: The method comprises: Acquire an image of a human eye illuminated by infrared light, taken by an infrared camera; Preprocessing the human eye image, the preprocessing at least includes distortion correction, image smoothing and light normalization, removing the background of the non-human eye area in the preprocessed human eye image, the distortion correction includes reverse deformation of the human eye image according to camera parameters, the image smoothing includes using a bilateral filter to smooth the human eye image and using a mean shift filter to smooth pixels of similar colors in the image, retaining the edge of the human eye area containing the iris ellipse feature, the light normalization includes using the depth information of the pixel to convert the human eye image into a grayscale image, based on multi-threshold operation, using a high threshold to obtain a first binary image of the human eye image with the background removed, using a low threshold to obtain a second binary image of the original human eye image, the first binary image and the second binary image at least display an iris region of a human eye, removing the non-iris background of the first binary image and the second binary image, and fusing the first binary image and the second binary image after the background is removed to obtain an iris image, wherein the iris image includes an iris ellipse feature of the human eye, determining an edge contour of the iris in the iris image based on a boundary hub analysis, fitting the edge contour to obtain an iris ellipse, taking the center coordinates of the iris ellipse as the iris center of the human eye image, displaying a plurality of correction points in front of the human eye, calculating the iris center of the correspondingly captured human eye image when the human eye gazes at each of the correction points in turn, associating and mapping the coordinates of the iris center with the coordinates of the correction points to obtain a correction relationship between the coordinates of the iris center and the correction points, and obtaining a gaze direction according to the correction relationship and the iris center; A liquid lens and a visual acuity chart are arranged in front of the user's eyes, wherein the liquid lens comprises a container filled with a fluid and an elastic film arranged on the container and capable of changing the diopter as the filling amount of the fluid changes, and the visual acuity chart comprises visual acuity icons in multiple directions representing a certain visual acuity value; The vision icon interactively prompts the user to look in a certain direction through the liquid lens; Determine whether the vision icon that the human eye is looking at is in the same direction as the vision icon that prompts the user to look at, so as to determine whether the current refractive power of the liquid lens matches the user's vision value; If they do not match, the filling amount of the fluid is adjusted so that the diopter of the liquid lens matches the user's vision value.
2. The VR-based automatic optometry and glasses fitting method according to claim 1, characterized in that: The determining whether the direction of the vision icon that the human eye is gazing at is consistent with the direction of the vision icon that prompts the user to gaze at, so as to determine whether the current refractive power of the liquid lens matches the vision value of the user, specifically includes: If the vision icon that the human eye is looking at is in the same direction as the vision icon that prompts the user to look at, the vision icons in other directions of the same level of vision value continue to be displayed; if the directions of the multiple vision icons that the human eye is looking at and the multiple vision icons of the current level of vision value are all consistent, it is determined that the current refractive power of the liquid lens matches the user's vision value; The step of adjusting the filling amount of the fluid so that the diopter of the liquid lens matches the vision value of the user comprises: The filling amount of the fluid is adjusted until the user can clearly see the vision icon representing a certain vision value, and the current refractive power of the liquid lens is used as the user's optometry degree.
3. The VR-based automatic optometry and glasses fitting method according to claim 1, characterized in that: The determining whether the direction of the vision icon that the human eye is gazing at is consistent with the direction of the vision icon that prompts the eye to gaze, comprises: Establish a mapping between the three-dimensional coordinate system of the current gaze direction in the infrared camera and the plane coordinate system of the vision icon to obtain the landing point of the gaze direction in the plane coordinate system of the vision icon; Determine whether the landing point is within the trigger range of the vision icon prompting the gaze, and if so, determine that it is consistent; Among them, different vision icons of the same level have four directions.
4. A VR-based automatic optometry and glasses fitting device, characterized in that: include: An image acquisition unit, used to acquire an image of a human eye illuminated by infrared light, taken by an infrared camera; The image processing unit is used to preprocess the human eye image, wherein the preprocessing includes at least distortion correction, image smoothing and light normalization, and removes the background of the non-human eye area in the preprocessed human eye image. The distortion correction includes reverse deformation of the human eye image according to the camera parameters. The image smoothing includes smoothing the human eye image with a bilateral filter and smoothing the pixels of similar colors in the image with a mean shift filter, and retaining the edge of the human eye area containing the iris ellipse feature. The light normalization includes converting the human eye image into a grayscale image using the depth information of the pixel. Based on multi-threshold operation, a high threshold is used to obtain a first binary image of the human eye image with the background removed, and a low threshold is used to obtain a second binary image of the original human eye image. The first binary image and the second binary image are At least an iris region of a human eye is displayed, non-iris backgrounds of the first binary image and the second binary image are removed, and the first binary image and the second binary image after the background removal are fused to obtain an iris image, wherein the iris image includes an iris ellipse feature of the human eye, an edge contour of the iris in the iris image is determined based on boundary hub analysis, an iris ellipse is obtained by fitting the edge contour, a central coordinate of the iris ellipse is used as the iris center of the human eye image, a plurality of correction points are displayed in front of the human eye, and when the human eye gazes at each of the correction points in turn, the iris center of the corresponding captured human eye image is calculated, the coordinates of the iris center are associated and mapped with the coordinates of the correction points to obtain a correction relationship between the coordinates of the iris center and the correction points, and a gaze direction is obtained according to the correction relationship and the iris center; A display unit is used to display the contents of a vision chart in front of a person's eyes, wherein the contents of the vision chart include vision icons in multiple directions representing a certain vision value, and interactively prompt the user to look at the vision icon in a certain direction; A refraction adjustment unit, which is arranged in front of the human eye and includes a container filled with a fluid, and an elastic film arranged on the container and capable of changing the refraction as the filling amount of the fluid changes; The eye examination and glasses fitting control unit is used to interactively prompt the user to look at the vision icon in a certain direction through the refractive adjustment unit, determine whether the vision icon looked at by the human eye is in the same direction as the vision icon prompted to look at, so as to determine whether the current refractive power of the refractive adjustment unit matches the user's vision value; if not, adjust the filling amount of the fluid so that the refractive power of the refractive adjustment unit matches the user's vision value.
5. A smart glasses, characterized in that: include: One or more infrared cameras, pointing to the left and right human eye settings; Infrared flood emitter, set towards the human eye; Display screen; A liquid lens, comprising a container filled with a fluid, and an elastic film disposed on the container, the refractive power of which changes as the filling amount of the fluid changes; one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the VR-based automatic optometry and glasses fitting method as described in claim 1.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the VR-based automatic eye examination and glasses fitting method as described in any one of claims 1 to 3 is implemented.
