A method and device for vision detection based on VR, and smart glasses
Through VR-based vision testing methods and devices, infrared cameras and eye tracking technology are used to provide convenient vision testing solutions. Users can conduct vision testing at home, improving the convenience and effectiveness of vision testing.
Patent Information
- Application Number
- CN202311128844.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-31
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2043-08-31
AI Technical Summary
The existing technology is difficult to provide a convenient vision testing method, especially for personal vision testing. The traditional vision testing method requires going to a hospital or optical shop, and is not convenient enough.
Using VR-based vision detection methods and devices, the infrared camera is used to obtain human eye images, extract iris features, calculate the gaze direction through eye movement tracking, and display an eye chart in front of the display screen to interactively prompt the user to gaze at vision icons in different directions. Visual acuity values are determined by changes in gaze direction.
It realizes convenient vision detection, and users can understand their vision condition anytime and anywhere, especially for teenagers, which helps to promote vision protection.
Smart Images

Figure CN117137427B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart glasses, and in particular to a method and device for vision detection based on VR, and smart glasses. 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 myopic. When people test their eyesight, they usually go to an ophthalmologist or an eyewear store and use an eye 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. Summary of the invention
[0004] In view of the above technical problems, the present invention provides a VR-based vision detection method and device, and smart glasses to provide a technical solution that can detect vision anytime and anywhere.
[0005] 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.
[0006] According to one aspect of the present invention, a method for vision detection based on VR is disclosed, the method comprising:
[0007] Acquire an image of a human eye illuminated by infrared light, taken by an infrared camera;
[0008] Processing the human eye image to extract iris features of the human eye, wherein the iris features at least include the iris center, and performing sight tracking calculation on the processed human eye image to obtain the current gaze direction of the human eye;
[0009] Displaying the contents of a vision chart in front of a person's eyes, wherein the contents of the vision chart include a plurality of vision icons in different directions representing a certain vision value, and interactively prompting the user to look at one of the vision icons;
[0010] Determine whether the vision icon that the human eye is gazing at is in the same direction as the vision icon that prompts the eye to gaze;
[0011] If the gaze direction is consistent with the direction of the corresponding vision icon, the vision icons of other directions of the same level of vision value continue to be displayed; if the gaze directions calculated in sequence are consistent with the directions of multiple vision icons of the current level of vision value, the vision icon of a smaller level is displayed;
[0012] If the gaze direction is inconsistent with the direction of the corresponding vision icon, a vision icon of a larger level is displayed;
[0013] The above method is repeated until the smallest vision icon that the user can see is obtained, and the vision value represented by the smallest vision icon is used as the vision value of the user.
[0014] Furthermore, performing vision tracking calculation on the processed human eye image to obtain the current gaze direction of the human eye includes:
[0015] Extracting iris ellipse feature parameters and eye corner coordinates in the human eye image, wherein the iris ellipse feature parameters include the ellipse major axis, the minor axis, the iris center and the inclination angle;
[0016] According to the iris ellipse feature parameters 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 grayscale conversion, and the iris portion of the preprocessed human eye image is extracted;
[0020] Performing Hough circle detection on the dark iris part in the preprocessed human eye image to obtain a circular area;
[0021] Based on the least square method, the radius of the largest circle in the circular area is used as the search radius to find the heterochromatic edge, where the heterochromatic edge is the boundary between the black pixels and the white pixels in the preprocessed human eye image;
[0022] Based on the heterochromatic edge, the iris feature is obtained, and the iris feature at least includes the iris center, the iris radius, the ratio of black and white pixels in the iris part, and the standard deviation of the radius corresponding to the heterochromatic edge.
[0023] Further, after obtaining the iris feature, tracking the iris center in the next plurality of groups of human eye images includes:
[0024] Randomly distributing samples of the position of the iris center obtained based on the least square method;
[0025] Comparing the processed samples with the iris features, and calculating a weight value of each sample;
[0026] The samples with high weight values are weighted, and the samples with high importance are resampled and the weight values are recalculated, and the processed sample with the highest weight value is used as the new iris center.
[0027] Furthermore, the preprocessing specifically includes:
[0028] Gray-scaling the human eye image;
[0029] Based on the automatic multi-level threshold technology, obtaining the threshold area of the grayscale human eye image;
[0030] Performing an erosion operation on the threshold region so as to amplify a dark portion within the threshold region;
[0031] A dilation operation is performed on the threshold region after the erosion operation, so that the bright part in the threshold region is enlarged to obtain the dark iris part in the human eye image.
[0032] Furthermore, when the automatic multi-level thresholding technology is used to obtain the threshold area, it specifically includes:
[0033] Evenly converting the grayscaled human eye image into a histogram;
[0034] Perform automatic multi-level thresholding at least twice to automatically confirm the threshold;
[0035] The histogram is redistributed using a sigmoid function to obtain the threshold region.
[0036] Furthermore, performing eye tracking calculation on the processed human eye image to obtain the current gaze direction of the human eye includes:
[0037] Display multiple calibration points in front of the human eye;
[0038] When the human eye gazes at each of the calibration points in sequence, calculating the iris center of the corresponding captured human eye image;
[0039] Associatively mapping the coordinates of the iris center and the coordinates of the correction points to obtain a correction relationship between the coordinates of the iris center and the correction points;
[0040] The gaze direction is obtained according to the correction relationship and the iris center.
[0041] 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:
[0042] 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;
[0043] 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;
[0044] Among them, different vision icons of the same level have four directions.
[0045] According to a second aspect of the present disclosure, a vision detection device based on VR is provided, 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 features of the human eye, wherein the iris features at least include the iris center, and performing line of sight tracking calculation on the processed image of the human eye to obtain 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, wherein the contents of the vision chart include vision icons of multiple different directions representing a certain vision value, and interactively prompting a user to gaze at the vision icon in a certain direction; a vision judgment unit, for judging whether the direction of the vision icon gazed by the human eye is consistent with the direction of the vision icon prompted to gaze; if the directions are consistent, then continue to display the vision icons of other directions of the same level of vision value, and if the directions of the multiple vision icons gazed by the human eye calculated in sequence are consistent with the directions of the multiple vision icons of the current level of vision value, then display a smaller level of vision icon; if the directions are inconsistent, then display a larger level of vision icon; repeat the above method until the smallest vision icon that the user can see is obtained, and the vision value represented by the smallest vision icon is used as the user's vision value.
[0046] According to a third aspect of the present disclosure, there is provided a pair of smart glasses, comprising: a plurality of infrared cameras, respectively pointing to the left and right human eyes and arranged in preset positions; an infrared floodlight emitter, facing the human eyes; a display screen; 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 vision detection method as described above.
[0047] The technical solution disclosed in this disclosure has the following beneficial effects:
[0048] 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a flow chart of a method for visual acuity detection based on VR in an embodiment of this specification;
[0050] Figure 2 is a demonstration diagram of the vision chart in the embodiments of this specification;
[0051] Figure 3 is a flow chart of another gaze direction calculation method in an embodiment of this specification;
[0052] Figure 4 This is a structural block diagram of a VR-based vision detection device in an embodiment of this specification;
[0053] Figure 5 It is a terminal device of the gaze point tracking method in the embodiment of this specification;
[0054] Figure 6 This is a structural block diagram of the smart glasses in the embodiments of this specification;
[0055] Figure 7 A computer-readable storage medium for the gaze tracking method in the embodiments of this specification. DETAILED DESCRIPTION
[0056] 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.
[0057] 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.
[0058] like Figure 1 As shown, the embodiment of this specification provides a method for vision detection 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~S104:
[0059] In step S101, an image of a human eye illuminated by infrared light captured by an infrared camera is obtained.
[0060] 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.
[0061] In step S102, the human eye image is processed to extract the iris features of the human eye, wherein the iris features at least include the iris center, and a sight tracking calculation is performed on the processed human eye image to obtain the current gaze direction of the human eye.
[0062] Generally speaking, the iris contour can be approximated as an ellipse or a near circle. The iris ellipse features include the iris center coordinates, major axis length (or radius), minor axis length (or radius), rotation angle (inclination), etc. of the circle based on the graphic shape itself. It 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.
[0063] In step S103, the contents of the vision chart are displayed in front of the eyes of the person, wherein the contents of the vision chart include vision icons in multiple directions representing a certain vision value, and the user is interactively prompted to look at the vision icon in a certain direction.
[0064] Among them, the visual acuity chart may be displayed on the display screen of the VR glasses, such as Figure 2As 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.
[0065] In step S104, it is determined 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.
[0066] In step S105, if the directions are consistent, the vision icons of 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 calculated in sequence are consistent with the directions of the multiple vision icons of the current level of vision value, the vision icon of a smaller level is displayed.
[0067] In step S106, if the directions are inconsistent, a larger vision icon is displayed.
[0068] In step S107, the above method is repeated until the smallest vision icon that the user can see is obtained, and the vision value represented by the smallest vision icon is used as the vision value of the user.
[0069] Among them, in the execution of the above steps S104-S107, 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 prompted vision icon, 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 in real time by the infrared camera, the vision icon selected by the user is obtained after analysis, and it can be judged that the direction is consistent. 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.
[0070] 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.
[0071] 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.
[0072] 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, according to calculation, the distance of this gap in the retinal image is about 5μm, which is exactly the minimum visual angle 1' that the eye can distinguish objects. At this time, it can be determined that the eyesight of the eye 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 determining the user's vision value in this application.
[0073] In one embodiment, a method for calculating a gaze direction is provided, comprising:
[0074] Extracting iris ellipse feature parameters and eye corner coordinates from the human eye image, wherein the iris ellipse feature parameters include the ellipse major axis, minor axis, the iris center and the inclination angle.
[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 feature parameters 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 characteristic parameters and the 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 characteristic parameter equation, the iris ellipse characteristic parameters are 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, it will be difficult to directly analyze the iris center from the human eye image. Therefore, another method for predicting the gaze direction is provided in an embodiment of the present invention, such as Figure 3As shown, the method includes the following steps S301-S305:
[0084] In step S301, the human eye image is preprocessed, and the preprocessing at least includes grayscale conversion, and the iris part in the preprocessed human eye image is extracted.
[0085] Specifically, the preprocessing needs to grayscale the human eye image to increase the amount of iris information obtained. After obtaining the iris information, the iris part in the image can be extracted, and then the automatic multi-level threshold technology is used to achieve contrast enhancement to obtain the threshold area of the grayscaled human eye image, that is, the area of interest; then, the threshold area is corroded to enlarge the dark part in the threshold area; because the corrosion operation will cause the iris in the image to deform, the threshold area after the corrosion operation is expanded to enlarge the bright part in the threshold area, so as to restore the iris in the image to its normal size as much as possible, and obtain the dark color (black pixel) iris part in the image.
[0086] Generally speaking, in order to further obtain iris features, automatic multi-level threshold processing can be used, but general threshold processing has difficulties in obtaining thresholds. In this embodiment, the grayscale human eye image is uniformed into a histogram, and automatic multi-level threshold processing is performed at least twice to automatically confirm the threshold, which significantly improves the resolution of iris features, reduces other noise, and improves the detection rate of iris. The histogram can be used to redistribute and accumulate the pixel values of the grayscale image. Finally, the sigmoid function is used to redistribute the histogram to obtain the threshold area again.
[0087] In step S302, Hough circle detection is performed on the dark iris portion in the preprocessed human eye image to obtain a circular area.
[0088] Generally speaking, the iris can be considered as a circle or an ellipse. Based on the Hough circle detection, the preprocessed image is input and the circular structure can be obtained after the Hough circle detection. The circular structure coincides with the iris to a certain extent.
[0089] In step S303, based on the least square method, the radius of the largest circle in the circular area is used as the search radius to find a heterochromatic edge, where the heterochromatic edge is the boundary between black pixels and white pixels in the preprocessed human eye image.
[0090] The circle obtained by Hough circle detection is not accurate, so it needs to be corrected. In terms of human structure, the edges of the iris and sclera can be used as a basis for judgment. The radius of the largest circle in the circular area is used as the search radius, and N rays are expanded to cover the lower area (the upper part of the eyeball will be covered by the eyelid, and the angle between the covered area and the lower part can be considered to be less than 120°). When the white pixels and black pixels in the preprocessed image are found, the search is stopped. The boundary between the white pixels and the black pixels is the edge of the iris and sclera, that is, the heterochromatic edge.
[0091] Specifically, x and y are the coordinates of a feature point of the heterochromatic edge being searched. Based on the least squares circle method, we can get:
[0092]
[0093] In step S304, the iris feature is obtained based on the heterochromatic edge, and the iris feature at least includes the iris center, the iris radius, the ratio of black and white pixels in the iris part, and the standard deviation of the radius corresponding to the heterochromatic edge.
[0094] When the parameters a, b, and c are obtained from the least squares circle formula above, the total error between all feature points and the circle can be minimized according to the following formula, that is, the center of the circle that best represents the iris is used as the center of the iris:
[0095]
[0096] Integrating the formula, we get:
[0097]
[0098]
[0099]
[0100] Among them, the unknown constants a, b and c can be partially differentiated. When the partial differential is 0, the error is minimal, and a, b and c can be calculated. The center coordinates p(x, y) and the radius R can be expressed as:
[0101]
[0102]
[0103] After obtaining the coordinates of the center of the circle and the radius, combined with the standard deviation of the radius of each feature point of the heterochromatic edge mentioned above and the ratio of white pixels to black pixels in the circle, the gaze direction tracking prediction can be performed in the subsequent process.
[0104] In step S305, after obtaining the iris features, the iris center is tracked in the next multiple sets of human eye images. Assuming that the imaging of the infrared camera is low-resolution and low-definition, when the human eye moves, the iris center in one human eye image calculated at one time is not accurate. Therefore, this step adds a tracking method to compensate for the accuracy.
[0105] Specifically, step S305 includes: randomly distributing processed samples at the position of the iris center obtained based on the least squares method; comparing the processed samples with the iris features to calculate the weight value of each sample; weighting the samples with high weight values, and resampling and recalculating the weight values of the samples with high importance, and taking the processed sample with the highest weight value as the new iris center.
[0106] The above is a calculation method based on particle filter. In fact, the original algorithm of particle filter is divided into three stages: random sampling, importance sampling and resampling. First, when randomly sampling, if it is the first tracking, the samples are distributed according to the results of the iris center. In subsequent tracking, the samples are distributed according to the results of the last tracking. Importance sampling is the second stage, which is used to determine whether each sample is the same as the target being tracked, and assign a weight value to each sample, weight the samples with high weight values, and resample and recalculate the weight values of samples with high importance. Finally, the sample with the highest weight value is used as the tracking result. The resampling in the third stage is mainly used to distribute the position of each sample in advance. Other new samples can be generated around particles with high weight values. Samples with low weight values can only exist and cannot generate new particles around them. This stage will not generate images of tracking results, but will redistribute the positions of new samples according to the weights. After the samples with high weight values are redistributed, new samples can be generated around the high weight samples, and a small number or no new samples are generated around the samples with low weight values. This is tracked back and forth until only high weight samples are left.
[0107] In importance sampling, the weights of samples can be assigned based on the coordinates of the center of the circle, the radius of the circle, the standard deviation of the radius of each feature point of the heterochromatic edge, the ratio of white pixels to black pixels in the circle, etc.
[0108] Based on the above steps S301-S305, 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] In one embodiment, 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.
[0110] Since eye movement is nonlinear, the second-order polynomial formula can be used for calculation:
[0111]
[0112] 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 in the display screen.
[0113] Based on the same idea, Figure 4 As shown, the exemplary embodiment of the present disclosure also provides a vision detection device based on VR, including: an image acquisition unit 401, used to acquire a human eye image illuminated by infrared light taken by an infrared camera; an image processing unit 402, used to process the human eye image, extract the iris features of the human eye, the iris features at least including the iris center, perform line of sight tracking calculation on the processed human eye image, and obtain the current gaze direction of the human eye; a display unit 403, used to display the contents of a vision chart in front of the human eye, the contents of the vision chart include a plurality of vision icons in different directions representing a certain vision value, and interactively prompt the user to gaze at the certain direction of the vision icon. Vision icon; a vision judgment unit 404, judging whether the vision icon being gazed at by the human eye is in the same direction as the vision icon being prompted to be gazed; if the directions are consistent, continuing to display the vision icons in other directions of the same level of vision value, and if the directions of the multiple vision icons being gazed at by the human eye calculated in sequence are consistent with the directions of the multiple vision icons of the current level of vision value, displaying a vision icon of a smaller level; if the directions are inconsistent, displaying a vision icon of a larger level; repeating the above method until the smallest vision icon that the user can see is obtained, and taking the vision value represented by the smallest vision icon as the user's vision value.
[0114] Based on the above device, according to eye tracking and interactive operation, people can conveniently use VR glasses with cameras to detect their vision, making it easier for people to understand their vision, especially for teenagers, which is more conducive to encouraging teenagers to protect their eyesight.
[0115] 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.
[0116] Based on the same idea, the embodiment of this specification also provides a vision detection device based on VR, such as Figure 5 shown.
[0117] The VR-based vision detection device may be the terminal device or server provided in the above-mentioned embodiment.
[0118] The VR-based vision detection device may have relatively large differences due to different configurations or performances, and may include one or more processors 501 and memory 502, and the memory 502 may store one or more storage applications or data. Among them, the memory 502 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 502 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 501 can be configured to communicate with the memory 502 to execute a series of computer executable instructions in the memory 502 on the VR-based vision detection device. The VR-based vision detection device may also include one or more power supplies 503, one or more wired or wireless network interfaces 504, one or more I / O interfaces (input and output interfaces) 505, one or more external devices 506 (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 505. 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 504.
[0119] Specifically, in this embodiment, the VR-based vision detection device includes a memory 502 and one or more programs, wherein the one or more programs are stored in the memory 502, 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 vision detection device, and the one or more programs are configured to be executed by one or more processors 501, including the following computer-executable instructions:
[0120] Acquire multiple human eye images illuminated by infrared light and taken by two infrared cameras; perform line of sight tracking calculation on the multiple human eye images to obtain the gaze vector of the human eye in the human eye images; acquire visible light images of the real physical world in front of the human eye taken by two visible light cameras and disparity images corresponding to the visible light images; extract one or more prominent areas in the visible light images, and collect the one or more prominent areas in a data set; align the depth information in the disparity images with the multiple prominent areas to obtain the real three-dimensional coordinates of the prominent areas and substitute them into the data set; transform the coordinate system of the gaze vector and the coordinate system of the data set, and use the points of the two gaze vectors in the data set that are closest to the left and right human eyes as the gaze points of the human eyes.
[0121] 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: one or more infrared cameras 601, respectively pointing to the left and right human eyes; an infrared floodlight emitter 602, facing the human eyes; a display screen 603; one or more processors 604; a storage device 605, for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors 604 implement the following method:
[0122] Acquire an image of a human eye illuminated by infrared light and taken by an infrared camera; process the image of the human eye to extract the iris features of the human eye, wherein the iris features at least include the iris center, perform line of sight tracking calculation on the processed image of the human eye to obtain the current gaze direction of the human eye; display the contents of a vision chart in front of the human eye, wherein the contents of the vision chart include a plurality of vision icons in different directions representing a certain vision value, and interactively prompt the user to gaze at the vision icon in a certain direction; determine whether the direction of the vision icon gazed by the human eye is consistent with the direction of the vision icon prompted to gaze; if the directions are consistent, continue to display the vision icons of other directions of the same level of vision value, and if the directions of the plurality of vision icons gazed by the human eye calculated in sequence are consistent with the directions of the plurality of vision icons of the current level of vision value, display a vision icon of a smaller level; if the directions are inconsistent, display a vision icon of a larger level; repeat the above method until the smallest vision icon that the user can see is obtained, and the vision value represented by the smallest vision icon is used as the vision value of the user.
[0123] 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.
[0124] refer to Figure 7 As shown, a program product 700 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, and 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.
[0125] 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.
[0126] 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.
[0127] 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.
[0128] 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).
[0129] 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.
[0130] 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.
[0131] 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.
[0132] 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.
[0133] 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.
[0134] 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 method for vision detection based on VR, It is 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 graying, and based on the automatic multi-level threshold technology, homogenizing the grayed human eye image into a histogram, performing at least two automatic multi-level thresholding processes to automatically confirm the threshold, using a sigmoid function to redistribute the histogram to obtain a threshold area, performing an erosion operation on the threshold area to amplify the dark part in the threshold area, performing an expansion operation on the threshold area after the erosion operation to amplify the bright part in the threshold area, and obtaining a dark iris part in the human eye image; Performing Hough circle detection on the dark iris part in the preprocessed human eye image to obtain a circular area, and based on the least squares method, using the radius of the largest circle in the circular area as the search radius to find a heterochromatic edge, the heterochromatic edge being the boundary between black pixels and white pixels in the preprocessed human eye image, and obtaining an iris feature based on the heterochromatic edge, the iris feature at least including an iris center, an iris radius, a ratio of black and white pixels in the iris part, and a standard deviation of the radius corresponding to the heterochromatic edge, randomly distributing processed samples of the position of the iris center obtained based on the least squares method, comparing the processed samples with the iris features, calculating a weight value of each sample, weighting the samples with high weight values, and resampling and recalculating the weight values of the samples with high importance based on a particle filter, taking the processed sample with the highest weight value as the new iris center, and performing sight tracking calculation on the processed human eye image based on the iris center to obtain the current gaze direction of the human eye; Displaying 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 different directions representing a certain vision value, and interactively prompting the user to look at the vision icon in a certain direction; Determine whether the vision icon that the human eye is gazing at is in the same direction as the vision icon that prompts the eye to gaze; If the directions are consistent, continue to display the vision icons of other directions of the same level of vision value; if the directions of the multiple vision icons that the human eye is looking at calculated in sequence are consistent with the directions of the multiple vision icons of the current level of vision value, display the vision icon of a smaller level; If the directions are inconsistent, a larger vision icon is displayed; The above method is repeated until the smallest vision icon that the user can see is obtained, and the vision value represented by the smallest vision icon is used as the vision value of the user.
2. The VR-based vision detection method according to claim 1, It is characterized in that The performing gaze tracking calculation on the processed human eye image to obtain the current gaze direction of the human eye includes: Display multiple calibration points in front of the human eye; When the human eye gazes at each of the calibration points in sequence, calculating the iris center of the corresponding captured human eye image; Associatively mapping the coordinates of the iris center and the coordinates of the correction points to obtain a correction relationship between the coordinates of the iris center and the correction points; The gaze direction is obtained according to the correction relationship and the iris center.
3. The VR-based vision detection method according to claim 1, It is 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 vision detection device based on VR, It is 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; An image processing unit, configured to preprocess the human eye image, wherein the preprocessing at least includes graying, and based on the automatic multi-level thresholding technology, homogenizing the grayed human eye image into a histogram, performing at least two automatic multi-level thresholding processes to automatically confirm the threshold, using a sigmoid function to reallocate the histogram to obtain a threshold area, performing an erosion operation on the threshold area to amplify a dark portion within the threshold area, and performing an expansion operation on the threshold area after the erosion operation to amplify a bright portion within the threshold area to obtain a dark iris portion in the human eye image; Performing Hough circle detection on the dark iris part in the preprocessed human eye image to obtain a circular area, and based on the least squares method, using the radius of the largest circle in the circular area as the search radius to find a heterochromatic edge, the heterochromatic edge being the boundary between black pixels and white pixels in the preprocessed human eye image, and obtaining an iris feature based on the heterochromatic edge, the iris feature at least including an iris center, an iris radius, a ratio of black and white pixels in the iris part, and a standard deviation of the radius corresponding to the heterochromatic edge, randomly distributing processed samples of the position of the iris center obtained based on the least squares method, comparing the processed samples with the iris features, calculating a weight value of each sample, weighting the samples with high weight values, and resampling and recalculating the weight values of the samples with high importance based on a particle filter, taking the processed sample with the highest weight value as the new iris center, and performing sight tracking calculation on the processed human eye image based on the iris center to obtain the current gaze direction of the human eye; 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 prompts the user to look at the vision icon in a certain direction; A vision judgment unit, for judging whether the vision icon that the human eye is looking at is in the same direction as the vision icon that prompts the eye to look at; If the directions are consistent, continue to display the vision icons of other directions of the same level of vision value; if the directions of the multiple vision icons that the human eye is looking at calculated in sequence are consistent with the directions of the multiple vision icons of the current level of vision value, display the vision icon of a smaller level; If the directions are inconsistent, a larger vision icon is displayed; The above method is repeated until the smallest vision icon that the user can see is obtained, and the vision value represented by the smallest vision icon is used as the vision value of the user.
5. A kind of smart glasses, It is 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; 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 vision detection method as described in claim 1.
