VR / AR spot detection method and device
By using the method of determining the region of interest in line of sight estimation and performing spot detection and sorting, the problem of spot detection in the prior art is solved, and more accurate and efficient spot detection and sorting is achieved.
Patent Information
- Application Number
- CN202411366965.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-09-29
AI Technical Summary
The prior art methods used for spot detection and sorting in line of sight estimation are susceptible to external interference, resulting in missed detection or sorting errors, and deep learning methods require a large amount of data annotation and high-performance computing resources.
The region of interest is determined by the center of the pupil, threshold processing and communication domain detection are performed, and the initial spot is obtained by filtering, and distributed in the first and second areas by horizontal projection, filtering is performed to obtain a selected spot, and finally the spot slope is calculated to determine the spot sequence number.
It improves the accuracy of spot detection, reduces the impact of external interference, reduces the demand for computing resources, and ensures the accuracy and real-time nature of line of sight estimation.
Smart Images

Figure CN118887723B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application belong to the field of light spot detection technology, and in particular, relate to a VR / AR light spot detection method and device. Background Art
[0002] Eyes are one of the important organs of the body. 80% of the information obtained by the brain in daily life comes from the eyes. Therefore, the research on line of sight estimation has become a hot field. The commonly used method for line of sight estimation is to place two or more light sources in front of the eyes. When the light emitted from the light source passes through the eyes, it will form a reflection at the outer surface boundary of the cornea. The human eye is photographed with a camera. When estimating the line of sight, the light spot on the cornea needs to be accurately detected and matched with the actual light source one by one. The detection and matching results directly affect the accuracy and stability of line of sight estimation. The existing technology detects and sorts the distance and angle between the pupil center and the light spot. This method is subject to external interference and is prone to missed detection or sorting errors. Many scholars have also proposed using deep learning methods for light spot detection and sorting. This method requires collecting and annotating data, which requires a lot of manpower and material resources, a long development cycle, and high requirements for the deployed computers. An acceleration module for deep learning acceleration is required. Summary of the invention
[0003] In order to solve or alleviate the problems in the prior art, the embodiments of the present application provide a VR / AR spot detection method and device.
[0004] In a first aspect, an embodiment of the present application provides a VR / AR spot detection method, including:
[0005] Collecting original eye images, and determining the pupil center of each of the original eye images;
[0006] Taking the pupil center of the original eye image as the center, intercepting a region of interest on the original eye image, and performing threshold processing on the region of interest to obtain a first image;
[0007] Performing connected domain detection on the first image, filtering to obtain an initial light spot and a second image where the initial light spot is located, and restoring the position of the initial light spot in the second image to the original eye image to obtain a third image;
[0008] Projecting the connected domain of the restored initial light spot onto a horizontal plane, and distributing the restored initial light spot in the first area and the second area according to a preset rule;
[0009] Filtering the initial light spots in the first area and the second area to obtain selected light spots;
[0010] The slope between two adjacent selected light spots is calculated, and the light spot sequence number is determined according to the slope.
[0011] As a preferred embodiment of the present application, the connected domain detection is performed on the first image to filter and obtain the initial light spot and the second image where the initial light spot is located, including:
[0012] Perform threshold processing on the region of interest using a first function in an opencv library to obtain a first image;
[0013] Use the second function in the opencv library to perform connected domain detection on the first image, filter and remove connected domains with an area smaller than the first threshold and larger than the second threshold, and filter and remove connected domains with an aspect ratio smaller than the third threshold and larger than the fourth threshold, and filter to obtain an initial light spot and a second image where the initial light spot is located.
[0014] As a preferred embodiment of the present application, the step of restoring the position of the initial light spot in the second image to the original eye image to obtain the third image includes:
[0015] The second image is pasted onto a fourth image, the pixel value of the fourth image is 0 and the resolution is the same as the original eye image, and the light spot position coordinates in the fourth image are added to the initial point position coordinates and restored to the original eye image to obtain a third image.
[0016] As a preferred embodiment of the present application, projecting the connected domain of the restored initial light spot onto a horizontal plane and distributing the restored initial light spot in the first area and the second area includes:
[0017] Projecting the restored connected domain of the initial light spot onto a horizontal plane, detecting the midpoint of the maximum distance position in the projected connected domain, and taking the straight line where the midpoint of the maximum position is located as the light spot segmentation line;
[0018] The restored initial light spot is divided into a first area and a second area according to the light spot dividing line.
[0019] As a preferred embodiment of the present application, filtering the initial light spots in the first area and the second area to obtain the selected light spots includes:
[0020] Taking the spot center of the initial light spot in the first area or the second area as the center of the circle, intercepting a rectangular area, counting the total number of pixels in the rectangular area whose pixel values are greater than a preset pixel value, calculating the ratio of the pixel values in the rectangular area whose pixel values are greater than the total number of pixels to the pixel values in the rectangular area, when the ratio is greater than a set threshold, the initial light spot is a first false light spot, and the first false light spot is removed from the first area or the second area;
[0021] Calculate the first distance between two adjacent initial light spots in the first area and the second area where the first false light spot is removed, the average distance, and the second distance between each initial light spot and its nearest initial light spot; if the second distance is greater than the sum of the average distance and the preset distance, the initial light spot is the second false light spot, and the second false light spot is removed from the first area or the second area;
[0022] Determine the number of initial light spots contained in the first area or the second area. If the number of initial light spots contained in the first area exceeds the preset number of light spots, determine the initial light spot with the smallest x value at the center of the light spot, then the initial light spot with the smallest x value at the center of the light spot is the third pseudo light spot, and the third pseudo light spot is removed from the first area. If the number of initial light spots contained in the second area exceeds the preset number of light spots, determine the initial light spot with the smallest x value at the center of the light spot, then the initial light spot with the largest x value at the center of the light spot is the fourth pseudo light spot, and the fourth pseudo light spot is removed from the second area.
[0023] As a preferred embodiment of the present application, the step of calculating the slope between two adjacent selected light spots and determining the light spot sequence number according to the slope includes:
[0024] The selected light spots in the first area and the second area are sorted according to the size of the y value to obtain a first light spot set and a second light spot set, the slopes of adjacent light spots in the first light spot set and the second light spot set are calculated, and the light spot sequence number is determined according to the slope.
[0025] Compared with the prior art, the embodiment of the present application provides a VR / AR light spot detection method. The present application roughly selects possible initial light spots through the center of the pupil, and then distributes the roughly detected initial light spots in the first area and the second area through horizontal projection. By performing a series of processing on the initial light spots in the first area and the second area, a selected light spot is obtained, and finally the light spot slope is calculated. The light spot sequence number is determined by the light spot slope, and then the light spot detection and sorting are completed. The present application filters the light spots on the skin that are not on the cornea and the external stray light interference at the corner of the eye, thereby ensuring the accuracy of light spot detection, and the detection algorithm has a fast calculation speed, which ensures the accuracy and real-time performance of line of sight estimation.
[0026] In a second aspect, an embodiment of the present application provides a VR / AR spot detection device, including:
[0027] An acquisition module, used for acquiring original eye images and determining the pupil center of each original eye image;
[0028] A processing module, configured to intercept a region of interest on the original eye image with the pupil center of the original eye image as the center, and perform threshold processing on the region of interest to obtain a first image;
[0029] A first filtering module is used to perform connected domain detection on the first image, filter to obtain an initial light spot and a second image where the initial light spot is located, and restore the position of the initial light spot in the second image to the original eye image to obtain a third image;
[0030] A distribution module, used for projecting the connected domain of the restored initial light spot onto a horizontal plane, and distributing the restored initial light spot into a first area and a second area according to a preset rule;
[0031] A second filtering module, used for filtering the initial light spots in the first area and the second area to obtain selected light spots;
[0032] The calculation module is used to calculate the slope between two adjacent selected light spots and determine the light spot sequence number according to the slope.
[0033] Compared with the prior art, the beneficial effects of a VR / AR spot detection device provided in an embodiment of the present application are the same as those of the first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. Some specific embodiments of the present application will be described in detail in an illustrative and non-restrictive manner with reference to the drawings. The same reference numerals in the drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the drawings:
[0035] Figure 1 It is a flowchart of a VR / AR spot detection method provided in an embodiment of the present application;
[0036] Figure 2 This is a diagram of the process of obtaining the initial light spot change provided by an embodiment of the present application;
[0037] Figure 3 is a diagram of a change process of distributing the initial light spot in the first area and the second area provided by an embodiment of the present application;
[0038] Figure 4 is a schematic diagram of the calculation slope provided in the embodiment of the present application;
[0039] Figure 5 It is a structural schematic diagram of a VR / AR spot detection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application.
[0041] First, as Figure 1 As shown, the embodiment of the present application provides a VR / AR spot detection method, including:
[0042] Step S01, collecting original eye images and determining the pupil center of each original eye image;
[0043] It should be noted that the original eye image is collected by an image acquisition device, and the pupil center is located by a deep learning model (pupil center detection is not the focus of this application and will not be explained in detail).
[0044] Step S02, taking the pupil center of the original eye image as the center, intercepting a region of interest on the original eye image, and performing threshold processing on the region of interest to obtain a first image;
[0045] Specifically, the pupil center of the original eye image located by the deep learning model in step S01 is taken as the center, and the region of interest (abbreviated as: ROI region) is intercepted with a width and height of 2*Thr1 as the interception range, wherein Thr1 is a set threshold that can be set based on experience. It should be noted that the region of interest is actually the area where the eye is located.
[0046] Step S03, performing connected domain detection on the first image, filtering to obtain an initial light spot and a second image where the initial light spot is located;
[0047] Step S03 specifically includes:
[0048] Perform threshold processing on the region of interest using a first function in an opencv library to obtain a first image;
[0049] Use the second function in the opencv library to perform connected domain detection on the first image, filter and remove connected domains with an area smaller than the first threshold and larger than the second threshold, and filter and remove connected domains with an aspect ratio smaller than the third threshold and larger than the fourth threshold, and filter to obtain an initial light spot and a second image where the initial light spot is located.
[0050] Specifically, the opencv library is a powerful tool library for image processing. Its imgproc module provides a wealth of image processing operations, such as image filtering, geometric transformation, color space conversion, and histogram. These basic operations are often used in computer vision algorithms. In addition, OpenCV also provides the ximgproc module, which contains advanced image processing algorithms such as edge detection and domain transformation filters for structured forests.
[0051] First, use the cv::threshold function in the opencv library to perform threshold processing on the ROI area to obtain the first image. In fact, the first image is a binary image. It should be noted that a binary image refers to an image in which each pixel has only two possible values or grayscale levels. Black and white, B&W, and monochrome images are often used to represent binary images. A binary image means that there are only two grayscale levels in the image, that is, the grayscale value of any pixel in the image is 0 or 255, representing black and white respectively.
[0052] Use the cv::connectedComponentsWithStats function in the opencv library to detect the connected domains of the first image, filter out the connected domains with an area smaller than minArea and larger than maxArea, and filter out the connected domains with an aspect ratio smaller than minRatio and larger than maxRatio, and roughly screen out the possible center position of the light spot fcPtsRoi And the second image dstRoi after filtering.
[0053] in, represents the image coordinates of the light spot in the second image dstRoi, and i represents the i-th light spot.
[0054] Step S04, restoring the position of the initial light spot in the second image to the original eye image to obtain a third image;
[0055] Step S04 specifically includes:
[0056] The second image is pasted onto a fourth image, the pixel value of the fourth image is 0 and the resolution is the same as the original eye image, and the light spot position coordinates in the fourth image are added to the initial point position coordinates and restored to the original eye image to obtain a third image.
[0057] Specifically, Figure 2As shown, the second image dstRoi is pasted onto the fourth image dst, wherein the spot position fcPtsRoi in the fourth image is restored to the spot position in the original eye image by adding the initial point position coordinates to obtain the third image. The initial point is the position of the upper left corner of the eye.
[0058] Among them: minArea, maxArea, minRatio, maxRatio are filtering parameters set according to experience, and i represents the i-th initial light spot.
[0059] Step S05, projecting the restored connected domain of the initial light spot onto a horizontal plane, and distributing the restored initial light spot in the first area and the second area according to a preset rule;
[0060] Step S05 specifically includes:
[0061] Projecting the restored connected domain of the initial light spot onto a horizontal plane, detecting the midpoint of the maximum distance position in the projected connected domain, and taking the straight line where the midpoint of the maximum position is located as the light spot segmentation line;
[0062] The restored initial light spot is divided into a first area and a second area according to the light spot dividing line.
[0063] Specifically, the connected domain area of the third image obtained in step S04 is projected onto a horizontal plane, and the midpoint x = segx at the position with the largest distance in the projected connected domain is detected as a spot segmentation line, such as the white line in the figure.
[0064] According to the segx value, the spot is divided into two different first regions vecL and second regions vecR. If std::vector <cv::point2f>vecL, the spot is placed in the first region vecL. If std::vector <cv::point2f>vecR area, the light spot is placed in the second area vecR.
[0065] Step S06, filtering the initial light spots in the first area and the second area to obtain selected light spots;
[0066] Step S06 specifically includes:
[0067] Taking the spot center of the initial light spot in the first area or the second area as the center of the circle, intercepting a rectangular area, counting the total number of pixels in the rectangular area whose pixel values are greater than a preset pixel value, calculating the ratio of the pixel values in the rectangular area whose pixel values are greater than the total number of pixels to the pixel values in the rectangular area, when the ratio is greater than a set threshold, the initial light spot is a first false light spot, and the first false light spot is removed from the first area or the second area;
[0068] Calculate the first distance between two adjacent initial light spots in the first area and the second area where the first false light spot is removed, the average distance, and the second distance between each initial light spot and its nearest initial light spot; if the second distance is greater than the sum of the average distance and the preset distance, the initial light spot is the second false light spot, and the second false light spot is removed from the first area or the second area;
[0069] Determine the number of initial light spots contained in the first area or the second area. If the number of initial light spots contained in the first area exceeds the preset number of light spots, determine the initial light spot with the smallest x value at the center of the light spot, then the initial light spot with the smallest x value at the center of the light spot is the third pseudo light spot, and the third pseudo light spot is removed from the first area. If the number of initial light spots contained in the second area exceeds the preset number of light spots, determine the initial light spot with the smallest x value at the center of the light spot, then the initial light spot with the largest x value at the center of the light spot is the fourth pseudo light spot, and the fourth pseudo light spot is removed from the second area.
[0070] Specifically, the coarsely selected initial light spot is finely selected to filter out false light spots on the skin and outliers. During light spot detection, due to light interference, some bright spot areas on the skin will be detected, which are false light spots and need to be filtered. The center of the initial light spot in the first area or the second area is taken as the center of the circle, and a rectangular area with a width and height of rectW*rectH is intercepted. The total number of pixels pixsum in the rectangular area with pixel values greater than pixThr(210) is counted, and the proportion of pixel values greater than pixThr is calculated pixratio = pixsum / (rectW*rectH). When the total number of pixels pixratio is greater than the set threshold (0.72), the light spot is a false light spot and is removed from the first area vecL or the second area vecR.
[0071] Filter outliers, calculate the distances between adjacent light spots in the first region vecL and the second region vecR, and calculate the average distance averageDist of the light spots. Calculate the distance singleDist between each light spot and the nearest light spot. If singleDist>averageDist+thrD, then this light spot is a false light spot and is removed from the first region vecL or the second region vecR, where thrD is a set value based on experience.
[0072] Based on the above-mentioned filter spot, Figure 3 As shown, continue to check the number of light spots contained in the first area vecL or the second area vecR. If the number of light spots in the first area vecL exceeds the preset number of light spots, screen out the light spot with the smallest x value at the center of the light spot and remove the false light spot. Similarly, if the number of light spots in the second area vecR exceeds the preset number of light spots, screen out the light spot with the largest x value at the center of the light spot and remove the false light spot.
[0073] Step S07, calculating the slope between two adjacent selected light spots, and determining the light spot sequence number according to the slope.
[0074] Step S07 specifically includes:
[0075] The selected light spots in the first area and the second area are sorted according to the size of the y value to obtain a first light spot set and a second light spot set, the slopes of adjacent light spots in the first light spot set and the second light spot set are calculated, and the light spot sequence number is determined according to the slope.
[0076] Specifically, the slopes PresetKL and PresetKR between adjacent light spots in the first region vecL and the second region vecR are preset (PresetKL = {-2.5, 0.0, 2.5, 10000.0, 0.0, 2.5}, PresetKR = {2.5, 0.0,2.5, 10000.0, 0.0, -2.5}).
[0077] The light spots in the first area vecL and the second area vecR are sorted by the size of the y value to obtain the ordered vecLN and vecRN, such as Figure 4 As shown, the slope KL of each adjacent light spot is calculated, and the light spot number is determined according to the slope KL. The light spot with smaller y has smaller number. Similarly, the vecR light spots are sorted:
[0078] PresetKL(0)<KL≤PresetKL(1) The spot number is 0,1;
[0079] PresetKL(2)<KL≤PresetKL(3) The spot numbers are 1, 2;
[0080] PresetKL(4)<KL≤PresetKL(5) The spot numbers are 2,3;
[0081] After the light spot detection and sorting are completed, the obtained light spot position and serial number are input into the 3D line of sight estimation algorithm for line of sight estimation calculation to obtain the final gaze point position.
[0082] Compared with the prior art, this application uses the pupil as the screening area, uses area and aspect ratio as parameters to roughly screen out the possible initial spot positions, divides the spots into left and right areas (first area and second area) through horizontal projection, and then accurately screens out the required spots through vertical projection, outlier spot filtering, and spot filtering on the skin. In the rough screening, the eyeball ROI area of the image is intercepted for spot screening, which effectively reduces the filtering time of the connected domain and ensures the efficiency of the algorithm. By calculating the slope between adjacent points and determining the spot number according to the slope value range, the algorithm is accurate and stable, ensuring the accuracy of the subsequent 3D algorithm.
[0083] Second, as Figure 5 As shown, the embodiment of the present application provides a VR / AR spot detection device, including:
[0084] An acquisition module 1 is used to acquire original eye images and determine the pupil center of each original eye image;
[0085] Processing module 2, used for intercepting a region of interest on the original eye image with the pupil center of the original eye image as the center, and performing threshold processing on the region of interest to obtain a first image;
[0086] A first filtering module 3 is used to perform connected domain detection on the first image, filter to obtain an initial light spot and a second image where the initial light spot is located, and restore the position of the initial light spot in the second image to the original eye image to obtain a third image;
[0087] A distribution module 4, used for projecting the connected domain of the restored initial light spot onto a horizontal plane, and distributing the restored initial light spot into the first area and the second area according to a preset rule;
[0088] A second filtering module 5, used for filtering the initial light spots in the first area and the second area to obtain selected light spots;
[0089] The calculation module 6 is used to calculate the slope between two adjacent selected light spots, and determine the light spot sequence number according to the slope.
[0090] Compared with the prior art, the beneficial effects of a VR / AR spot detection device provided in an embodiment of the present application are the same as those of the first aspect and will not be repeated here.
[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A VR / AR spot detection method, characterized in that: include: Collecting original eye images, and determining the pupil center of each of the original eye images; Taking the pupil center of the original eye image as the center, intercepting a region of interest on the original eye image, and performing threshold processing on the region of interest to obtain a first image; Performing connected domain detection on the first image, filtering to obtain an initial light spot and a second image where the initial light spot is located; Restoring the position of the initial light spot in the second image to the original eye image to obtain a third image; Projecting the connected domain of the restored initial light spot onto a horizontal plane, and distributing the restored initial light spot in the first area and the second area according to a preset rule; Filtering the initial light spots in the first area and the second area to obtain selected light spots; Calculating the slope between two adjacent selected light spots, and determining the light spot sequence number according to the slope; The filtering process of the initial light spots in the first area and the second area to obtain the selected light spots includes: Taking the spot center of the initial light spot in the first area or the second area as the center of a circle, intercepting a rectangular area, counting the total number of pixels in the rectangular area whose pixel values are greater than a preset pixel value, calculating the ratio of the pixel values in the rectangular area whose pixel values are greater than the total number of pixels to the pixel values in the rectangular area, when the ratio is greater than a set threshold, the initial light spot is a first false light spot, and the first false light spot is removed from the first area or the second area; The first distance between two adjacent initial light spots in the first area and the second area where the first false light spot is eliminated, the average distance, and the second distance between each initial light spot and its nearest initial light spot are calculated; if the second distance is greater than the sum of the average distance and the preset distance, the initial light spot is a second false light spot, and the second false light spot is eliminated from the first area or the second area.
2. A VR / AR spot detection method as claimed in claim 1, characterized in that: The performing connected domain detection on the first image to filter and obtain an initial light spot and a second image where the initial light spot is located includes: Perform threshold processing on the region of interest using a first function in an opencv library to obtain a first image; Use the second function in the opencv library to perform connected domain detection on the first image, filter and remove connected domains with an area smaller than the first threshold and larger than the second threshold, and filter and remove connected domains with an aspect ratio smaller than the third threshold and larger than the fourth threshold, to obtain an initial light spot and a second image where the initial light spot is located.
3. A VR / AR spot detection method as claimed in claim 1, characterized in that: The step of restoring the position of the initial light spot in the second image to the original eye image to obtain a third image comprises: The second image is pasted onto a fourth image, the pixel value of the fourth image is 0 and the resolution is the same as the original eye image, and the light spot position coordinates in the fourth image are added to the initial point position coordinates and restored to the original eye image to obtain a third image.
4. A VR / AR spot detection method as claimed in claim 1, characterized in that: The method of projecting the connected domain of the restored initial light spot onto a horizontal plane and distributing the restored initial light spot in the first area and the second area comprises: Projecting the restored connected domain of the initial light spot onto a horizontal plane, detecting the midpoint of the maximum distance position in the projected connected domain, and taking the straight line where the midpoint of the maximum position is located as the light spot segmentation line; The restored initial light spot is divided into a first area and a second area according to the light spot dividing line.
5. A VR / AR spot detection method as claimed in claim 1, characterized in that: Determine the number of initial light spots contained in the first area or the second area. If the number of initial light spots contained in the first area exceeds the preset number of light spots, determine the initial light spot with the smallest x value at the center of the light spot, then the initial light spot with the smallest x value at the center of the light spot is the third pseudo light spot, and the third pseudo light spot is removed from the first area. If the number of initial light spots contained in the second area exceeds the preset number of light spots, determine the initial light spot with the smallest x value at the center of the light spot, then the initial light spot with the largest x value at the center of the light spot is the fourth pseudo light spot, and the fourth pseudo light spot is removed from the second area.
6. A VR / AR spot detection method as claimed in claim 5, characterized in that: The step of calculating the slope between two adjacent selected light spots and determining the light spot sequence number according to the slope comprises: The selected light spots in the first area and the second area are sorted according to the size of the y value to obtain a first light spot set and a second light spot set, the slopes of adjacent light spots in the first light spot set and the second light spot set are calculated, and the light spot sequence number is determined according to the slope.
7. A VR / AR spot detection device, characterized in that: include: An acquisition module, used for acquiring original eye images and determining the pupil center of each original eye image; A processing module, configured to intercept a region of interest on the original eye image with the pupil center of the original eye image as the center, and perform threshold processing on the region of interest to obtain a first image; A first filtering module is used to perform connected domain detection on the first image, filter to obtain an initial light spot and a second image where the initial light spot is located, and restore the position of the initial light spot in the second image to the original eye image to obtain a third image; A distribution module, used for projecting the connected domain of the restored initial light spot onto a horizontal plane, and distributing the restored initial light spot into a first area and a second area according to a preset rule; A second filtering module, used for filtering the initial light spots in the first area and the second area to obtain selected light spots; A calculation module, used for calculating the slope between two adjacent selected light spots, and determining the light spot sequence number according to the slope; The filtering process of the initial light spots in the first area and the second area to obtain the selected light spots includes: Taking the spot center of the initial light spot in the first area or the second area as the center of a circle, intercepting a rectangular area, counting the total number of pixels in the rectangular area whose pixel values are greater than a preset pixel value, calculating the ratio of the pixel values in the rectangular area whose pixel values are greater than the total number of pixels to the pixel values in the rectangular area, when the ratio is greater than a set threshold, the initial light spot is a first false light spot, and the first false light spot is removed from the first area or the second area; The first distance between two adjacent initial light spots in the first area and the second area where the first false light spot is eliminated, the average distance, and the second distance between each initial light spot and its nearest initial light spot are calculated; if the second distance is greater than the sum of the average distance and the preset distance, the initial light spot is a second false light spot, and the second false light spot is eliminated from the first area or the second area.
Citation Information
Patent Citations
Pupil detection method and device, equipment and storage medium
CN116486466A
Eyeball tracking light spot detection method and device based on deep learning
CN117496584A