Detection Method, Device, Computer Equipment and Storage Medium for Vision Parameters

By preprocessing the pupil image and generating feature vectors, combined with linear regression model, the problem of great environmental and shooting influence in visual acuity parameter detection is solved, and the detection accuracy is improved.

CN115482198BActive Publication Date: 2025-07-04WANLINGBANGQIAO MEDICAL EQUIP (GUANGZHOU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210982847.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-16
Publication Date
2025-07-04
Estimated Expiration
2042-08-16

AI Technical Summary

Technical Problem

The existing visual acuity parameter detection methods are greatly affected by the environment and shooting, and the calculation results are not accurate.

Method used

By acquiring the pupil image and preprocessing, rotation, boundary point processing and ROI area extraction, feature vectors are generated, and a dynamic relationship model between the pupil image and vision parameters is established for detection using a linear regression model.

Benefits of technology

Reduces the impact of environment and shooting on detection results and improves the accuracy of calculation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115482198B_ABST
    Figure CN115482198B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of vision detection. The present application provides a method, device, computer device and storage medium for detecting vision parameters, which light a light source according to a preset order, obtain N pupil images; preprocess the N pupil images to obtain N first images; obtain a feature vector based on the N first images; input the feature vector into a model to be trained to obtain a dynamic relationship model between pupil images and vision parameters; input the pupil image to be detected into the dynamic relationship model for detection to obtain vision parameters, thereby reducing the influence of the environment and shooting on the detection result and improving the accuracy of the calculation result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of vision detection, and particularly to a method, device, computer device, and storage medium for detecting vision parameters. Background Art

[0002] Infrared eccentric photorefraction technology is a method that uses infrared photography technology to capture the pupil image of the human eye to calculate the refractive parameters of the eye pupil (spherical lens, cylindrical lens, axis). Currently, the conventional method is to obtain the pixel gradient change information of the pupil area and deduce and calculate the refractive parameters of the eye pupil in combination with the calculation formula. The main problems existing in this method are: being greatly affected by the environment and shooting, and the accuracy of the calculation result is not high. Summary of the Invention

[0003] The main purpose of this application is to provide a method, device, computer device, and storage medium for detecting vision parameters, which can solve the technical problems that the vision parameter detection method in the prior art is greatly affected by the environment and shooting, and the accuracy of the calculation result is not high.

[0004] A method for detecting vision parameters provided by this application includes:

[0005] Light up the light source according to a preset order, and obtain N pupil images;

[0006] Preprocess the N pupil images to obtain N first images;

[0007] Rotate the N first images according to a preset rotation rule to obtain N rotated pictures;

[0008] Distinguish the N rotated pictures to obtain N / 2 second images and N / 2 third images conjugate to the second images;

[0009] Obtain all the boundary points of N / 2 second images and N / 2 third images respectively;

[0010] Perform connected region processing on all the boundary points, and determine the pupil center coordinates according to the largest connected region;

[0011] Intercept the rectangular ROI regions centered on the pupil on N / 2 second images and N / 2 third images respectively to obtain N / 2 first ROI images and N / 2 second ROI images;

[0012] Divide the pixel points of the first ROI images by the pixel points of the second ROI images to obtain N / 2 ratio images;

[0013] Calculate the average value of the pixels of each ratio image in the Y-axis direction;

[0014] Splice the averages of N / 2 of the ratio images according to a preset order to obtain a feature vector;

[0015] Input the feature vector into the model to be trained to obtain a dynamic relationship model between the pupil image and the vision parameter;

[0016] Input the pupil image to be detected into the dynamic relationship model for detection to obtain the vision parameter.

[0017] Further, the step of preprocessing the N pupil images to obtain N first images includes:

[0018] Perform cropping processing, grayscale conversion processing, filtering processing, binarization processing, boundary erosion and dilation processing, and boundary extraction processing on the N pupil images.

[0019] Further, the step of performing connected region processing on all boundary points and determining the pupil center coordinates according to the largest connected region includes:

[0020] Determine all connected regions according to all boundary points of the pupil image by using the eight-neighborhood method;

[0021] Compare the sizes of all connected regions to determine the largest connected region;

[0022] Determine the pupil center coordinates according to the largest connected region.

[0023] Further, the model to be trained is a linear regression model.

[0024] This application also provides a vision parameter detection device, including:

[0025] A pupil image acquisition module, configured to light a light source according to a preset order and acquire N pupil images;

[0026] A first image acquisition module, configured to preprocess the N pupil images to obtain N first images;

[0027] A rotated image acquisition module, configured to rotate the N first images according to a preset rotation rule to obtain N rotated images;

[0028] A second image and third image acquisition module, configured to distinguish the N rotated images to obtain N / 2 second images and N / 2 third images conjugate to the second images;

[0029] A boundary point acquisition module, configured to respectively obtain all boundary points of N / 2 of the second images and N / 2 of the third images;

[0030] A central coordinate determination module, configured to perform connected region processing on all boundary points, and determine the pupil center coordinates according to the largest connected region;

[0031] A first ROI image and a second ROI image acquisition module, configured to respectively intercept rectangular ROI regions centered on the pupil on N / 2 of the second images and N / 2 of the third images, to obtain N / 2 first ROI images and N / 2 second ROI images;

[0032] A ratio image acquisition module, configured to divide the pixel points of the first ROI image by the pixel points of the second ROI image, to obtain N / 2 ratio images;

[0033] An average value calculation module, configured to calculate the average value of the pixels of each ratio image in the Y-axis direction;

[0034] A feature vector acquisition module, configured to splice the average values of the N / 2 ratio images according to a preset order, to obtain a feature vector;

[0035] A dynamic relationship model acquisition module, configured to input the feature vector into a model to be trained, to obtain a dynamic relationship model between the pupil image and the vision parameter;

[0036] A vision parameter acquisition module, configured to input the pupil image to be detected into the dynamic relationship model for detection, to obtain the vision parameter.

[0037] Furthermore, the first image acquisition module includes:

[0038] A preprocessing sub-module, configured to perform grayscale conversion processing, filtering processing, binarization processing, boundary erosion and dilation processing, boundary extraction processing, and clipping processing on the N pupil images.

[0039] This application also provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the steps of any of the above methods are implemented.

[0040] This application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0041] Compared with the prior art, the present application provides a method, a device, a computer device and a storage medium for detecting vision parameters. The light source is lit according to a preset order to obtain N pupil images; the N pupil images are preprocessed to obtain N first images; based on the N first images, a feature vector is obtained; the feature vector is input into a model to be trained to obtain a dynamic relationship model between the pupil image and the vision parameter; the pupil image to be detected is input into the dynamic relationship model for detection to obtain the vision parameter, thereby reducing the influence of the environment and shooting on the detection result and improving the accuracy of the calculation result. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic diagram of the steps of the method for detecting vision parameters in an embodiment of the present application;

[0043] Figure 2 It is a structural block diagram of the device for detecting vision parameters in an embodiment of the present application;

[0044] Figure 3 It is a schematic diagram of the arrangement mode of the LED infrared light source;

[0045] Figure 4 It is a schematic structural block diagram of an embodiment of the computer device of the present application.

[0046] The realization, functional features and advantages of the purpose of the present application will be further described in conjunction with the embodiments with reference to the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0047] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0049] Referring to Figure 1 , a method for detecting vision parameters in an embodiment of the present application includes:

[0050] S1. Light the light source according to a preset order to obtain N pupil images;

[0051] S2. Preprocess the N pupil images to obtain N first images;

[0052] S3. Rotate the N first images according to a preset rotation rule to obtain N rotated pictures;

[0053] S4. Distinguish N rotated images to obtain N / 2 second images and N / 2 third images conjugate to the second images;

[0054] S5. Obtain all boundary points of N / 2 second images and N / 2 third images respectively;

[0055] S6. Perform connected region processing on all boundary points, and determine the pupil center coordinates according to the largest connected region;

[0056] S7. Respectively intercept rectangular ROI regions centered on the pupil on N / 2 second images and N / 2 third images to obtain N / 2 first ROI images and N / 2 second ROI images;

[0057] S8. Divide the pixel points of the first ROI images by the pixel points of the second ROI images to obtain N / 2 ratio images;

[0058] S9. Calculate the average value of the pixels of each ratio image in the Y-axis direction;

[0059] S10. Stitch the average values of N / 2 ratio images according to a preset order to obtain a feature vector;

[0060] S11. Input the feature vector into the model to be trained to obtain a dynamic relationship model between pupil images and visual acuity parameters;

[0061] S12. Input the pupil image to be detected into the dynamic relationship model for detection to obtain visual acuity parameters.

[0062] In the above step S1, the light source specifically refers to multiple groups of LED infrared light sources designed at a certain angle. The specific preset order refers to Figure 3, as shown in the figure, multiple groups of LED infrared light sources are respectively distributed on the inner circle, the middle circle, and the outer circle. Among them, the LED infrared light sources numbered 1-6 are distributed in the direction with an angle of 0 degrees to the horizontal line, where 1 and 2 are located on the outer circle, 3 and 4 are located on the middle circle, and 5 and 6 are located on the inner circle; the LED infrared light sources numbered 7-8 are distributed in the direction with an angle of 60 degrees to the horizontal line, where 7 and 8 are located on the outer circle, 9 and 10 are located on the middle circle, and 11 and 12 are located on the inner circle; the LED infrared light sources numbered 13-18 are distributed in the direction with an angle of 120 degrees to the horizontal line, where 13 and 14 are located on the outer circle, 15 and 16 are located on the middle circle, and 17 and 18 are located on the inner circle; 19 and 20 are located in the direction with an angle of 120 degrees to the horizontal line, and the line connecting 19 and 20 passes through the center of the inner circle, 21 and 22 are located in the direction with an angle of 60 degrees to the horizontal line, and the line connecting 21 and 22 passes through the center of the inner circle. Specifically, N in this embodiment is 22. The infrared light sources are lit according to the digital serial numbers marked in red font, and the middle lights are lit synchronously. At the same time, an image of the patient's eyes is taken. After continuously lighting 22 lights, 22 pupil images are obtained.

[0063] In the above step S2, the specific steps of preprocessing are as follows:

[0064] Perform clipping processing, grayscale conversion processing, filtering processing, binarization processing, boundary erosion and dilation processing, and boundary extraction processing on the N pupil images.

[0065] Before performing grayscale conversion on the pupil image, a cropping process is carried out. Through the cropping process, parts such as eyelashes, eyelid folds, and eyelids in the eye image are cropped off, and useful parts such as the white of the eye, the black of the eye, and the pupil are intercepted to reduce the data volume of the base image. In actual implementation, it can be achieved by adopting a streaming processing method for the transmitted data stream. To minimize the data volume and improve the processing speed to the greatest extent, first, the pupil image is subjected to grayscale conversion, converting the RGB image data into 8-bit grayscale image data. Subsequently, the grayscale image data is filtered to remove the noise in the image. In the embodiments of the present invention, well-known algorithms in the art can be used for grayscale conversion and filtering. For example, Gaussian filtering can be used for filtering to remove Gaussian noise in the image. Gaussian filtering is a linear smoothing filter and is a process of weighted averaging of the image. The grayscale value of each pixel point is obtained by weighted averaging of itself and the grayscale values of other pixels in its neighborhood. After grayscale conversion processing and filtering processing, the processed data is subjected to binarization processing. The essence of binarization processing is to process the image with 256 gray levels of 8 bits into an image with only two gray levels of 0 or 255, that is, to convert the grayscale image into a black-and-white image. Specifically, the binarization processing includes: traversing each pixel of the row data, comparing the grayscale value of each pixel with a pre-set grayscale threshold. If the grayscale value of the pixel is greater than or equal to the grayscale threshold, the grayscale value of the pixel is set to 0. If the grayscale value of the pixel is less than the grayscale threshold, the grayscale value of the pixel is set to 1, obtaining a binarized image. Binarization processing can not only simplify the image and highlight the contour of the pupil, but also reduce the data volume, which is beneficial to the subsequent processing of the image. By setting the grayscale threshold, all pixels with grayscale values less than the grayscale threshold can be determined as the pupil area, and their grayscale values are set to 1 and then output to the cache. Other pixels are determined as the area outside the pupil, and their grayscale values are set to 0 and then output to the cache. Therefore, after binarization processing, it becomes two rows of 1-bit data, and the cache volume is extremely small. In actual implementation, well-known binarization processing algorithms in the art can be used, and the grayscale threshold can be preset according to the overall and local characteristics of the image. After binarization processing, boundary erosion and dilation processing are performed on the binarized data to clear the boundary and obtain binarized data with a clear boundary. The erosion and dilation of the binarized image are also called opening operations, which can eliminate small objects, separate objects at thin places, and smooth the boundaries of larger objects. The specific processing is to move a small image point by point on a large image and make corresponding processing according to the comparison results. During erosion processing, if all the black points in the structural element are exactly the same as its corresponding large image pixel points, this point is black, otherwise it is white. During dilation processing, if there is one or more black points in the structural element that are the same as its corresponding large image pixel points, this point is black, otherwise it is white. That is to say, if none of the black points in the structural element are the same as its corresponding large image pixel points, this point is white, otherwise it is black.None of the black dots in the structural element is the same as its corresponding large image pixel point, indicating that these pixel points in the large image are all white. If the skeleton of the binary image is a white point, the dilation process of this binary image with a black skeleton is exactly the erosion process of a binary image with a white skeleton. During actual implementation, well-known boundary erosion and dilation algorithms in the art can be used, which will not be elaborated here.

[0066] In the above step S3, each first image is rotated by a corresponding angle according to the direction of the LED lighting during shooting until it is in the horizontal direction. For example, for a photo taken by an LED infrared light source at an angle of 120 degrees with the horizontal line, the first image will be rotated counterclockwise by 120 degrees and placed in the horizontal position.

[0067] In the above step S4, the meaning of conjugate is: a pair that matches according to a certain rule; generally speaking, it is a twin. For example, Figure 3 the photos taken by the LED infrared light sources with serial numbers 11 and 12 in are conjugate images. Since N in this embodiment is 22, there are 11 second images and 11 third images respectively.

[0068] In the above steps S5 to S8, specifically, the first ROI image and the second ROI image of 23*11 are intercepted. The first ROI image ÷ the second ROI image = the ratio image, that is, each point of the ratio image is the result of dividing the corresponding two ROIs. There are 22 images for one pupil, and a total of 11 ratio images are obtained.

[0069] In the above step S9, specifically, the average of the 11 pixel values in the Y-axis direction is calculated, and a total of 23 pixel values are obtained as a vector value.

[0070] In the above step S10, the preset order is that the vector values of all ratio images are arranged in angular order, from 0 to 120 degrees, in the order from the inner circle to the outer circle, and spliced into a vector x with 11*23 = 253 features.

[0071] The model to be trained in the above step S11 uses a linear regression model. Specifically, in this embodiment, the training set X = {x1, x2... x m}, and the labels are Y = {y1, y2... y m}.

[0072] Each y is composed of refractive parameters {spherical lens sph, cylindrical lens cyl, axis position ax}.

[0073] The training set has at least 1000 pupil samples, which can be continuously increased. Each sample contains the above 11*23 = 253 feature values, represented by x1 to x 253 .

[0074] Taking the spherical lens sph as an example, a linear regression model is adopted:

[0075]

[0076] f(x (i) ) Here represents the fitting equation of sph, w0 to w 253 are the weight coefficients to be trained (to be solved), (i) is the i-th sample in the training set, is the eigenvalue of the i-th sample. The loss function we set is:

[0077]

[0078] The loss function J(w) represents the sum of the variances between the fitting values and the labeled values of all samples. Among them, m in both the training set and the loss function is the total number of samples, x (i) is the fitting value of the i-th sample, y (i) is the labeled value of the i-th sample. The smaller this variance is, the closer the fitting result is to the labeled value. Using the gradient descent method, input the training set to train and obtain the weight coefficients w0 to w 253 .

[0079] Similarly, for the cylindrical lens cyl and the axis position ax, the corresponding weight coefficients are also obtained using the same linear regression algorithm.

[0080] In the above step S12, after obtaining the weight coefficients w0 to w 253 , substituting them into the linear regression model, the eigenvectors of the 22 eye pupil images re-acquired through steps S1 - S10 can be input into the linear regression model to calculate refractive parameters such as spherical lens, cylindrical lens, and axis position.

[0081] Furthermore, before the step S7 of respectively intercepting N / 2 rectangular ROI regions centered on the pupil on the N / 2 second images and the N / 2 third images to obtain N / 2 first ROI images and N / 2 second ROI images, it includes:

[0082] S5. Respectively obtain all the boundary points of the N / 2 second images and the N / 2 third images;

[0083] S6. Perform connected region processing on all the boundary points, and determine the pupil center coordinates according to the largest connected region.

[0084] An embodiment of the present invention provides a method for pupil center positioning. By preprocessing the pupil image during data transmission, not only is frame buffering avoided, saving storage resources, but all boundary points of the eye image are obtained in one step while data is being transmitted. Subsequently, based on all the boundary points, the pupil center coordinates are determined using a hardware-based connected region processing method, avoiding large-data-volume operations that cause delays, improving the processing speed, shortening the processing time, saving logic resources, and solving the technical problems of high equipment cost and slow processing speed in existing pupil positioning technologies.

[0085] Further, the step S6 of performing connected region processing on all boundary points and determining the pupil center coordinates according to the largest connected region includes:

[0086] S61. According to all the boundary points of the pupil image, use the eight-neighborhood method to determine all connected regions;

[0087] S62. Compare the sizes of all connected regions to determine the largest connected region;

[0088] S63. Determine the pupil center coordinates according to the largest connected region.

[0089] The eight-neighborhood method in the above steps is a contour tracking method. By sequentially finding boundary points to track the boundary, in fact, all boundary points are classified, and all connected regions can be found.

[0090] Refer to Figure 2 , this application also provides a detection device for vision parameters, including:

[0091] A pupil image acquisition module 100, configured to light a light source according to a preset order and acquire N pupil images;

[0092] A first image acquisition module 200, configured to preprocess the N pupil images to obtain N first images;

[0093] A rotated image acquisition module 300, configured to rotate the N first images according to a preset rotation rule to obtain N rotated images;

[0094] A second and third image acquisition module 400, configured to distinguish the N rotated images to obtain N / 2 second images and N / 2 third images conjugate to the second images;

[0095] A boundary point acquisition module 500, configured to respectively obtain all boundary points of the N / 2 second images and the N / 2 third images;

[0096] A center coordinate determination module 600, configured to perform connected region processing on all boundary points and determine the pupil center coordinates according to the largest connected region;

[0097] The first ROI image and second ROI image acquisition module 700 is configured to respectively intercept rectangular ROI regions centered on the pupil on N / 2 of the second images and N / 2 of the third images, to obtain N / 2 first ROI images and N / 2 second ROI images;

[0098] The ratio image acquisition module 800 is configured to divide the pixel points of the first ROI image by the pixel points of the second ROI image, to obtain N / 2 ratio images;

[0099] The average value calculation module 900 is configured to calculate the average value of the pixels of each of the ratio images in the Y-axis direction;

[0100] The feature vector acquisition module 1000 is configured to splice the average values of the N / 2 ratio images according to a preset order, to obtain a feature vector;

[0101] The dynamic relationship model acquisition module 1100 is configured to input the feature vector into a model to be trained, to obtain a dynamic relationship model between the pupil image and the vision parameter;

[0102] The vision parameter acquisition module 1200 is configured to input a pupil image to be detected into the dynamic relationship model for detection, to obtain a vision parameter.

[0103] Further, the first image acquisition module includes:

[0104] A preprocessing sub-module, configured to perform grayscale conversion processing, filtering processing, binarization processing, boundary erosion and dilation processing, boundary extraction processing, and clipping processing on the N pupil images.

[0105] Refer to Figure 4 , in an embodiment of the present application, a computer device is further provided. The internal structure of the computer device may be as shown in Figure 4 . The computer device includes a processor, a memory, a network interface, a display device, and an input device connected through a system bus. Among them, the network interface of the computer device is used to communicate with an external terminal through a network connection. The display device of the computer device is used to display an interaction page. The input device of the computer device is used to receive user input. The processor designed by the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium. The non-volatile storage medium stores an operating system, a computer program, and a database. The database of the computer device is used to store raw data. When the computer program is executed by the processor, a method for detecting a vision parameter is implemented.

[0106] The above-mentioned processor executes the above-mentioned method for detecting vision parameters, lights up the light source according to a preset order, and obtains N pupil images; preprocesses the N pupil images to obtain N first images; obtains feature vectors based on the N first images; inputs the feature vectors into a model to be trained to obtain a dynamic relationship model between pupil images and vision parameters; inputs the pupil image to be detected into the dynamic relationship model for detection to obtain vision parameters, thereby reducing the influence of the environment and shooting on the detection result and improving the accuracy of the calculation result.

[0107] This application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor, it implements a method for detecting vision parameters, lights up the light source according to a preset order, and obtains N pupil images; preprocesses the N pupil images to obtain N first images; obtains feature vectors based on the N first images; inputs the feature vectors into a model to be trained to obtain a dynamic relationship model between pupil images and vision parameters; inputs the pupil image to be detected into the dynamic relationship model for detection to obtain vision parameters, thereby reducing the influence of the environment and shooting on the detection result and improving the accuracy of the calculation result.

[0108] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, storage, database, or other medium provided in this application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SyNchliNk) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0109] It should be noted that in this text, the term "comprise", "include" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, apparatus, article or method comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, apparatus, article or method. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the presence of additional identical elements in the process, apparatus, article or method comprising such element.

[0110] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present application.

Claims

1. A method for detecting vision parameters, characterized in that, Including: Light up the light source according to a preset order to obtain N pupil images; Preprocess the N pupil images to obtain N first images; Rotate the N first images according to a preset rotation rule to obtain N rotated pictures, where the rotation rule is that each first image rotates by a corresponding angle according to the direction of the light source when shooting and rotates to the horizontal direction; Distinguish the N rotated pictures to obtain N / 2 second images and N / 2 third images conjugate to the second images; Obtain all boundary points of N / 2 second images and N / 2 third images respectively; Perform connected region processing on all boundary points and determine the pupil center coordinates according to the largest connected region; Intercept rectangular ROI regions centered on the pupil on N / 2 second images and N / 2 third images respectively to obtain N / 2 first ROI images and N / 2 second ROI images; Divide the pixel points of the first ROI images by the pixel points of the second ROI images to obtain N / 2 ratio images; Calculate the average value of the pixels of each ratio image in the width direction; Stitch the average values of the N / 2 ratio images according to a preset order to obtain a feature vector; Input the feature vector into the model to be trained to obtain a dynamic relationship model between pupil images and vision parameters; Input the pupil image to be detected into the dynamic relationship model for detection to obtain vision parameters.

2. The detection method of the vision parameter according to claim 1, wherein, The step of preprocessing the N pupil images to obtain N first images includes: Performing cropping processing, grayscale conversion processing, filtering processing, binarization processing, boundary erosion and dilation processing, and boundary extraction processing on the N pupil images.

3. The detection method of the vision parameter according to claim 1, wherein The step of performing connected region processing on all boundary points and determining the pupil center coordinates according to the largest connected region includes: Determine all connected regions by using the eight-neighborhood method according to all boundary points of the pupil image; Compare the sizes of all connected regions to determine the largest connected region; Determine the pupil center coordinates according to the largest connected region.

4. The detection method of visual parameters according to claim 1, wherein The model to be trained is a linear regression model.

5. A detection device for vision parameters, characterized in that, Including: A pupil image acquisition module for lighting up the light source according to a preset order to obtain N pupil images; A first image acquisition module for preprocessing the N pupil images to obtain N first images; A rotated picture acquisition module for rotating the N first images according to a preset rotation rule to obtain N rotated pictures, where the rotation rule is that each first image rotates by a corresponding angle according to the direction of the light source when shooting and rotates to the horizontal direction; A second image and third image acquisition module for distinguishing the N rotated pictures to obtain N / 2 second images and N / 2 third images conjugate to the second images; A boundary point acquisition module for respectively obtaining all boundary points of N / 2 second images and N / 2 third images; A center coordinate determination module for performing connected region processing on all boundary points and determining the pupil center coordinates according to the largest connected region; The first ROI image and second ROI image acquisition module is configured to respectively intercept rectangular ROI regions centered on the pupil on N / 2 of the second images and N / 2 of the third images, to obtain N / 2 first ROI images and N / 2 second ROI images; The ratio image acquisition module is configured to divide the pixel points of the first ROI images by the pixel points of the second ROI images, to obtain N / 2 ratio images; The average value calculation module is configured to calculate the average value of the pixels of each of the ratio images in the width direction; The feature vector acquisition module is configured to splice the average values of the N / 2 ratio images according to a preset order, to obtain a feature vector; The dynamic relationship model acquisition module is configured to input the feature vector into a model to be trained, to obtain a dynamic relationship model between the pupil image and the vision parameter; The vision parameter acquisition module is configured to input the pupil image to be detected into the dynamic relationship model for detection, to obtain a vision parameter.

6. The detection device for visual parameters according to claim 5, characterized in that, The first image acquisition module includes: A preprocessing sub-module, configured to perform grayscale conversion processing, filtering processing, binarization processing, boundary erosion and dilation processing, boundary extraction processing, and clipping processing on the N pupil images.

7. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Lie detection data processing method and device, computer equipment and storage medium

    CN111222374A

  • Pupil positioning device and method and display driver of virtual reality device

    US20190147216A1