A binocular vision function screening method and system based on stereovision image analysis
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING MING OPTOMETRY & EYE HOSPITAL MANAGEMENT CO LTD
- Filing Date
- 2026-05-13
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]为了解决现有技术中人工筛查主观性强、效率低,双目视觉视差精化易失真、抗干扰能力弱,导致眼位状态评估准确性不足的问题,本发明提供了一种基于立体视觉图像分析的双眼视功能筛查方法及系统
[0021] This invention utilizes a multi-scale gradient matching cost function to calculate the matching cost, improving the stability of disparity calculation for ocular surface features. In the sub-pixel level disparity refinement stage, an asymmetric unimodal function with independent left and right attenuation coefficients is used to fit the discrete matching cost curves, accommodating the non-uniformity of the cost distribution. This extracts high-precision sub-pixel level disparity values and asymmetry parameters, restoring the fine three-dimensional morphology of the ocular surface. A confidence-based spatial interpolation mechanism repairs low-quality pixels, ensuring the integrity of depth data. The mean and variance of the kurtosis, skewness, and asymmetry parameters of the disparity data in the central fixation region are extracted to construct a multi-dimensional feature vector, representing the asymmetric features of the three-dimensional surface morphology of the ocular ball. Comparison with a normal visual function model improves the objectivity and accuracy of the eye position status assessment results, achieving accurate screening of binocular vision function.
Smart Images

Figure CN122515682A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of analysis, and in particular relates to a method and system for screening binocular vision function based on stereoscopic vision image analysis. Background Technology
[0002] Binocular vision dysfunction is a common visual health problem in ophthalmology and optometry, affecting patients' depth perception, stereoscopic vision, and daily eye comfort. This is especially true during childhood visual development; failure to detect and intervene early can impair visual function development. Current screening methods primarily rely on manual methods such as cover-and-uncover tests, Maddox rod tests, or synoptophore examinations. These methods are susceptible to influences from operator experience, patient cooperation, and the testing environment, and are time-consuming and require highly skilled personnel, making them unsuitable for large-scale screening and early detection at the grassroots level. Therefore, there is an urgent need for an objective, contactless, and readily automated binocular vision screening method.
[0003] Applying binocular machine vision to ophthalmic examination allows for the simultaneous acquisition of left and right eye images of a subject while they gaze at a visual target using binocular cameras. This data is then used to calculate disparity using stereo matching algorithms, reconstruct the three-dimensional geometry of the eye surface, and analyze changes in eye shape and posture to assess eye position. However, eye imaging is susceptible to effects from corneal reflection, illumination variations, local weak textures, and changes in surface curvature. The matching cost curve near the true disparity often exhibits an asymmetric distribution. Existing sub-pixel refinement methods are mostly based on symmetric function fitting, which struggles to characterize the difference in attenuation between the left and right sides of the curve, easily leading to disparity estimation drift. Furthermore, existing assessment methods often rely on average depth or simple geometric contours, failing to fully utilize the statistical characteristics of disparity distribution and the fitting of asymmetric information. They also lack spatial restoration mechanisms for low-confidence noise, resulting in insufficient accuracy and stability in eye position assessment. Summary of the Invention
[0004] To address the problems of insufficient accuracy in eye position assessment caused by subjective and inefficient manual screening, easy distortion and weak anti-interference ability in binocular visual disparity refinement in existing technologies, this invention provides a binocular vision function screening method and system based on stereoscopic vision image analysis.
[0005] In a first aspect, the present invention provides a binocular vision function screening method based on stereoscopic vision image analysis, comprising: Acquire the left and right eye images of the subject when they gaze at a visual target using a binocular camera, and calculate the initial integer-pixel disparity map representing the three-dimensional geometric depth of the subject's eye surface. Subpixel-level disparity refinement is performed on the pixels in the initial integer-level disparity map. A candidate subpixel disparity value set is constructed in the neighborhood of the integer-level disparity value. The matching cost is calculated using a multi-scale gradient matching cost function to obtain a discrete matching cost curve. An asymmetric unimodal function is used to fit the discrete matching cost curve. The asymmetric unimodal function sets independent left and right attenuation coefficients. The subpixel-level disparity value, asymmetry parameter, and confidence level are determined from the fitting function. Pixels with confidence levels lower than a preset threshold are updated by weighted spatial interpolation of the subpixel-level disparity values of high-confidence pixels in the neighborhood. Within a preset central fixation area, a histogram is constructed for the subpixel-level disparity values of the high-confidence pixels, and kurtosis and skewness are calculated. The mean and variance of all asymmetry parameters are calculated, and the kurtosis, skewness, mean and variance of the asymmetry parameters are used to construct a multidimensional feature vector representing the asymmetry of the three-dimensional surface morphology of the eyeball. This vector is then compared with the standard feature space of a normal visual function model to output the eye position status assessment result.
[0006] Optionally, the calculation of the initial integer-pixel disparity map representing the three-dimensional geometric depth of the subject's eye surface includes: The left and right eye images are converted into left and right grayscale images, respectively. A local window of size 5×5 pixels is constructed with the pixel to be determined as the center. The gray values of the 24 surrounding pixels in the local window are compared with the gray value of the center pixel. If the gray value of the surrounding pixels is greater than the gray value of the center pixel, it is recorded as 1; otherwise, it is recorded as 0. The Census feature bit string of the pixel is generated by arranging them in sequence. Within a preset disparity search range of 0 to 70 pixels, the disparity values are moved one by one, and the Hamming distance between the Census feature bit strings of corresponding pixels in the left grayscale image and the right grayscale image is calculated as the matching cost. The disparity value with the smallest Hamming distance is selected as the initial integer-pixel disparity value of the pixel to be determined, and the initial integer-pixel disparity map is generated by traversing all pixels.
[0007] Optionally, the step of calculating the matching cost using a multi-scale gradient matching cost function includes: The left and right eye images are downsampled to construct an image pyramid with three scales: original resolution, one-third resolution, and one-fifth resolution. Within each scale layer, the gradient components in the horizontal and vertical directions of each pixel within the corresponding matching window are calculated, and the gradient feature matrix is extracted. For each candidate subpixel disparity value, the candidate subpixel disparity value is scaled proportionally according to the downsampling ratio of each scale layer. Then, the sum of the absolute differences of the gradient feature matrices of the corresponding matching windows of the left eye image and the right eye image in the three scale layers is calculated to obtain the single-layer matching cost. According to the preset weight coefficients, the single-layer matching costs of the three scale layers are weighted and summed to obtain the matching cost corresponding to the candidate sub-pixel disparity value.
[0008] Optionally, the step of fitting the discrete matching cost curve using an asymmetric unimodal function, wherein the asymmetric unimodal function sets independent left-side and right-side attenuation coefficients, includes: In the discrete matching cost curve, the candidate sub-pixel disparity value corresponding to the minimum cost value is retrieved, and the matching cost value corresponding to the minimum point and at least two adjacent candidate sub-pixel disparity values on the left and right sides is extracted to form a sample point set. An asymmetric unimodal function model is constructed by splicing a decreasing function in the left half and an increasing function in the right half. The asymmetric unimodal function model contains independent left-side decay coefficients and right-side decay coefficients, respectively. Substitute the sample point set into the asymmetric unimodal function model, and use the nonlinear least squares method to optimize the parameters within the set maximum of 52 iterations. Obtain the left and right decay coefficients after convergence to obtain the fully fitted asymmetric unimodal function.
[0009] Optionally, determining the sub-pixel disparity value, asymmetric parameter, and confidence level from the fitted function includes: Find the minimum point of the fitted asymmetric unimodal function, and use the continuous abscissa values corresponding to the minimum point as the subpixel disparity value of the pixel. Calculate the absolute value of the difference between the right-side attenuation coefficient and the left-side attenuation coefficient, and divide the absolute value by the sum of the right-side attenuation coefficient and the left-side attenuation coefficient to obtain the normalized asymmetric parameter. The ordinate of the function corresponding to the minimum point is extracted as the minimum arithmetic value. The confidence level is calculated by combining the mean of the left-side decay coefficient and the right-side decay coefficient with a preset confidence level evaluation formula. The confidence level is positively correlated with the mean of the decay coefficient and negatively correlated with the minimum arithmetic value.
[0010] Optionally, updating pixels with confidence levels below a preset threshold using sub-pixel-level disparity value weighted spatial interpolation of high-confidence pixels in the neighborhood includes: A spatial neighborhood of 11×11 pixels is established centered on the target pixel with a confidence level lower than a preset threshold. Within the spatial neighborhood, all high-confidence pixels with a confidence level higher than the preset threshold are selected, and the Euclidean distance from each high-confidence pixel to the target pixel is calculated. Using the reciprocal of the Euclidean distance as the initial spatial weight, the initial spatial weights of all extracted high-confidence pixels are normalized to obtain the interpolation weights of each high-confidence pixel. The subpixel disparity values of each high-confidence pixel are multiplied by their corresponding interpolation weights and then summed to obtain the redefined subpixel disparity values of the target pixel, which are then used for replacement.
[0011] Optionally, the step of constructing a histogram of sub-pixel disparity values for the high-confidence pixels within a preset central fixation area and calculating kurtosis and skewness includes: Within the preset central gaze area, extract the maximum and minimum values of subpixel-level disparity values for all high-confidence pixels, and calculate the disparity range; The disparity range is evenly divided into 60 disparity intervals of equal length. The frequency of subpixel-level disparity values of each high-confidence pixel falling within each disparity interval is counted, and a disparity histogram is constructed. Calculate the arithmetic mean and standard deviation of the subpixel disparity values of all high-confidence pixels within the region; Calculate the cube and fourth power of the difference between each subpixel level disparity value and the arithmetic mean, respectively. Combined with the standard deviation, calculate the skewness representing the asymmetry of the disparity distribution according to the standard skewness formula, and calculate the kurtosis representing the steepness of the disparity distribution according to the standard kurtosis formula.
[0012] Optionally, the step of constructing a multidimensional feature vector representing the asymmetry of the three-dimensional surface morphology of the eyeball by using the mean and variance of the kurtosis, skewness, and asymmetry parameters, and comparing it with the standard feature space of a normal visual function model to output the eye position status assessment result includes: The mean of the kurtosis, the skewness, and the asymmetry parameter are concatenated with the variance of the asymmetry parameter to form a four-dimensional feature vector representing the asymmetry of the three-dimensional surface morphology of the eyeball. Call the standard feature space model pre-established based on the eye position and visual data of normal people, and obtain the normal standard feature mean vector and the inverse matrix of the feature covariance matrix corresponding to the model; Based on the mean vector of the normal standard features and the inverse matrix of the feature covariance matrix, calculate the Mahalanobis distance between the multidimensional feature vector and the normal standard feature space; The calculated Mahalanobis distance is compared with a preset anomaly detection distance threshold. If the Mahalanobis distance is greater than the preset anomaly detection distance threshold, the eye position is determined to be abnormal; otherwise, the eye position is determined to be normal.
[0013] In a second aspect, the present invention also provides a binocular vision function screening system based on stereoscopic vision image analysis, comprising: The calculation module is used to acquire the left and right eye images of the subject when the subject gazes at the visual target simultaneously by the binocular camera, and calculate the initial integer-pixel disparity map representing the three-dimensional geometric depth of the subject's eye surface. The update module is used to perform sub-pixel disparity refinement on the pixels in the initial integer-pixel disparity map, construct a candidate sub-pixel disparity value set in the neighborhood of the integer-pixel disparity value, calculate the matching cost value using a multi-scale gradient matching cost function to obtain a discrete matching cost curve, and fit the discrete matching cost curve using an asymmetric unimodal function. The asymmetric unimodal function sets independent left and right attenuation coefficients. The sub-pixel disparity value, asymmetry parameter and confidence level are determined from the fitting function. Pixels with confidence levels lower than a preset threshold are updated by weighted spatial interpolation of the sub-pixel disparity values of high-confidence pixels in the neighborhood. The output module is used to construct a histogram of the subpixel-level disparity values of the high-confidence pixels within a preset central fixation area and calculate the kurtosis and skewness. It also calculates the mean and variance of all asymmetry parameters, constructs a multidimensional feature vector representing the asymmetry of the three-dimensional surface morphology of the eyeball using the kurtosis, skewness, and asymmetry parameters, compares it with the standard feature space of a normal visual function model, and outputs the eye position status assessment result.
[0014] Further, the calculation of the initial integer-pixel disparity map representing the three-dimensional geometric depth of the subject's eye surface includes: The left and right eye images are converted into left and right grayscale images, respectively. A local window of size 5×5 pixels is constructed with the pixel to be determined as the center. The gray values of the 24 surrounding pixels in the local window are compared with the gray value of the center pixel. If the gray value of the surrounding pixels is greater than the gray value of the center pixel, it is recorded as 1; otherwise, it is recorded as 0. The Census feature bit string of the pixel is generated by arranging them in sequence. Within a preset disparity search range of 0 to 70 pixels, the disparity values are moved one by one, and the Hamming distance between the Census feature bit strings of corresponding pixels in the left grayscale image and the right grayscale image is calculated as the matching cost. The disparity value with the smallest Hamming distance is selected as the initial integer-pixel disparity value of the pixel to be determined, and the initial integer-pixel disparity map is generated by traversing all pixels.
[0015] Furthermore, the calculation of the matching cost value using the multi-scale gradient matching cost function includes: The left and right eye images are downsampled to construct an image pyramid with three scales: original resolution, one-third resolution, and one-fifth resolution. Within each scale layer, the gradient components in the horizontal and vertical directions of each pixel within the corresponding matching window are calculated, and the gradient feature matrix is extracted. For each candidate subpixel disparity value, the candidate subpixel disparity value is scaled proportionally according to the downsampling ratio of each scale layer. Then, the sum of the absolute differences of the gradient feature matrices of the corresponding matching windows of the left eye image and the right eye image in the three scale layers is calculated to obtain the single-layer matching cost. According to the preset weight coefficients, the single-layer matching costs of the three scale layers are weighted and summed to obtain the matching cost corresponding to the candidate sub-pixel disparity value.
[0016] Furthermore, the method of fitting the discrete matching cost curve using an asymmetric unimodal function, wherein the asymmetric unimodal function sets independent left-side and right-side attenuation coefficients, includes: In the discrete matching cost curve, the candidate sub-pixel disparity value corresponding to the minimum cost value is retrieved, and the matching cost value corresponding to the minimum point and at least two adjacent candidate sub-pixel disparity values on the left and right sides is extracted to form a sample point set. An asymmetric unimodal function model is constructed by splicing a decreasing function in the left half and an increasing function in the right half. The asymmetric unimodal function model contains independent left-side decay coefficients and right-side decay coefficients, respectively. Substitute the sample point set into the asymmetric unimodal function model, and use the nonlinear least squares method to optimize the parameters within the set maximum of 52 iterations. Obtain the left and right decay coefficients after convergence to obtain the fully fitted asymmetric unimodal function.
[0017] Further, determining the sub-pixel disparity value, asymmetry parameter, and confidence level from the fitted function includes: Find the minimum point of the fitted asymmetric unimodal function, and use the continuous abscissa values corresponding to the minimum point as the subpixel disparity value of the pixel. Calculate the absolute value of the difference between the right-side attenuation coefficient and the left-side attenuation coefficient, and divide the absolute value by the sum of the right-side attenuation coefficient and the left-side attenuation coefficient to obtain the normalized asymmetric parameter. The ordinate of the function corresponding to the minimum point is extracted as the minimum arithmetic value. The confidence level is calculated by combining the mean of the left-side decay coefficient and the right-side decay coefficient with a preset confidence level evaluation formula. The confidence level is positively correlated with the mean of the decay coefficient and negatively correlated with the minimum arithmetic value.
[0018] Furthermore, the step of updating pixels with confidence levels below a preset threshold using sub-pixel-level disparity value weighted spatial interpolation of high-confidence pixels in the neighborhood includes: A spatial neighborhood of 11×11 pixels is established centered on the target pixel with a confidence level lower than a preset threshold. Within the spatial neighborhood, all high-confidence pixels with a confidence level higher than the preset threshold are selected, and the Euclidean distance from each high-confidence pixel to the target pixel is calculated. Using the reciprocal of the Euclidean distance as the initial spatial weight, the initial spatial weights of all extracted high-confidence pixels are normalized to obtain the interpolation weights of each high-confidence pixel. The subpixel disparity values of each high-confidence pixel are multiplied by their corresponding interpolation weights and then summed to obtain the redefined subpixel disparity values of the target pixel, which are then used for replacement.
[0019] Further, the step of constructing a histogram of sub-pixel disparity values for the high-confidence pixels within a preset central fixation area and calculating kurtosis and skewness includes: Within the preset central gaze area, extract the maximum and minimum values of subpixel-level disparity values for all high-confidence pixels, and calculate the disparity range; The disparity range is evenly divided into 60 disparity intervals of equal length. The frequency of subpixel-level disparity values of each high-confidence pixel falling within each disparity interval is counted, and a disparity histogram is constructed. Calculate the arithmetic mean and standard deviation of the subpixel disparity values of all high-confidence pixels within the region; Calculate the cube and fourth power of the difference between each subpixel level disparity value and the arithmetic mean, respectively. Combined with the standard deviation, calculate the skewness representing the asymmetry of the disparity distribution according to the standard skewness formula, and calculate the kurtosis representing the steepness of the disparity distribution according to the standard kurtosis formula.
[0020] Further, the process of constructing a multidimensional feature vector representing the asymmetry of the three-dimensional surface morphology of the eyeball using the mean and variance of the kurtosis, skewness, and asymmetry parameters, and comparing it with the standard feature space of a normal visual function model to output the eye position state assessment result includes: The mean of the kurtosis, the skewness, and the asymmetry parameter are concatenated with the variance of the asymmetry parameter to form a four-dimensional feature vector representing the asymmetry of the three-dimensional surface morphology of the eyeball. Call the standard feature space model pre-established based on the eye position and visual data of normal people, and obtain the normal standard feature mean vector and the inverse matrix of the feature covariance matrix corresponding to the model; Based on the mean vector of the normal standard features and the inverse matrix of the feature covariance matrix, calculate the Mahalanobis distance between the multidimensional feature vector and the normal standard feature space; The calculated Mahalanobis distance is compared with a preset anomaly detection distance threshold. If the Mahalanobis distance is greater than the preset anomaly detection distance threshold, the eye position is determined to be abnormal; otherwise, the eye position is determined to be normal.
[0021] This invention utilizes a multi-scale gradient matching cost function to calculate the matching cost, improving the stability of disparity calculation for ocular surface features. In the sub-pixel level disparity refinement stage, an asymmetric unimodal function with independent left and right attenuation coefficients is used to fit the discrete matching cost curves, accommodating the non-uniformity of the cost distribution. This extracts high-precision sub-pixel level disparity values and asymmetry parameters, restoring the fine three-dimensional morphology of the ocular surface. A confidence-based spatial interpolation mechanism repairs low-quality pixels, ensuring the integrity of depth data. The mean and variance of the kurtosis, skewness, and asymmetry parameters of the disparity data in the central fixation region are extracted to construct a multi-dimensional feature vector, representing the asymmetric features of the three-dimensional surface morphology of the ocular ball. Comparison with a normal visual function model improves the objectivity and accuracy of the eye position status assessment results, achieving accurate screening of binocular vision function. Attached Figure Description
[0022] Figure 1 This is a flowchart of a binocular vision function screening method based on stereo vision image analysis; Figure 2 A schematic diagram of fitting the discrete matching cost curve to an asymmetric unimodal function; Figure 3 This is a schematic diagram of the subpixel disparity value distribution in the central gaze region; Figure 4 This is a diagram comparing the evaluation indicators of various ablation models. Detailed Implementation
[0023] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0024] This disclosure provides a binocular vision function screening method based on stereoscopic vision image analysis, such as... Figure 1 As shown, it includes: S1. Acquire the left and right eye images of the subject when they gaze at the visual target using a binocular camera, and calculate the initial integer-pixel disparity map representing the three-dimensional geometric depth of the subject's eye surface.
[0025] A hardware trigger controller sends a synchronization square wave signal to the external trigger pins of the left and right camera image sensors to ensure that the exposure start time difference between the two frames of left and right eye images is within 1μs, thus completing synchronous image acquisition. Zhang Zhengyou's checkerboard calibration method is used to obtain the camera intrinsic parameter matrix and distortion coefficients, as well as the rotation matrix and translation vector of the stereo camera. Based on the above calibration parameters, the `stereoRectify` function is called to generate an epipolar correction mapping matrix, and then the `remap` function is used to remap the left and right images to eliminate vertical parallax and achieve horizontal epipolar alignment. The StereoSGBM semi-global block matching algorithm class from the OpenCV library is called, setting the minimum parallax, maximum parallax, matching window size, and smoothing penalty parameters. and The aligned image is subjected to pixel-by-pixel matching calculations. By aggregating multi-directional path costs and finding the minimum cost using a winner-takes-all strategy, an initial disparity map containing depth information is generated. The initial disparity map is then subjected to integer-pixel quantization to obtain an initial integer-pixel level disparity map. Finally, the filterSpeckles function is used to remove mismatch noise points with excessively small connected components.
[0026] In one possible embodiment, the calculation of an initial integer-pixel disparity map representing the three-dimensional geometric depth of the subject's eye surface includes: The left and right eye images are converted into left and right grayscale images, respectively. A local window of size 5×5 pixels is constructed with the pixel to be determined as the center. The gray values of the 24 surrounding pixels in the local window are compared with the gray value of the center pixel. If the gray value of the surrounding pixels is greater than the gray value of the center pixel, it is recorded as 1; otherwise, it is recorded as 0. The Census feature bit string of the pixel is generated by arranging them in sequence. Within a preset disparity search range of 0 to 70 pixels, the disparity values are moved one by one, and the Hamming distance between the Census feature bit strings of corresponding pixels in the left grayscale image and the right grayscale image is calculated as the matching cost. The disparity value with the smallest Hamming distance is selected as the initial integer-pixel disparity value of the pixel to be determined, and the initial integer-pixel disparity map is generated by traversing all pixels.
[0027] The acquired RGB color left and right eye images were converted into 8-bit single-channel left and right grayscale images using the formula Gray = 0.299 × R + 0.587 × G + 0.114 × B. The grayscale values were mapped to the range of 0 to 255, where Gray represents the converted grayscale value, i.e., the brightness value of the corresponding pixel in the single-channel grayscale image; R represents the red channel value of that pixel in the RGB color image; G represents the green channel value; and B represents the blue channel value. This yielded 8-bit single-channel left and right grayscale images. Census transform was performed for feature extraction to resist illumination interference. A 5×5 pixel local square window was constructed on each of the left and right grayscale images for the pixel to be analyzed. The grayscale value of the center pixel was set to be... The grayscale values of the surrounding 24 pixels are arranged in spatial order from left to right and from top to bottom as follows: Where i is from 1 to 24. Iterate through the above 24 pixels, when... When the corresponding binary bit position is 1, when The time bit position is 0, thus generating a 24-bit binary sequence Census feature bit string, such as 011010011100010110110010. Then, proceed to the disparity matching calculation stage, setting the starting value for the disparity search on the epipolar line to... The maximum value is The search step size is 1 integer pixel. The matching point is fixed in the right grayscale image. In the left grayscale image, the line slides from coordinate offset 0 to 70 along the same horizontal epipolar line. Using the underlying hardware's XOR instruction in conjunction with the Popcount bit counting operation, the number of different bits between the 24-bit Census bit string of the candidate point in the left grayscale image and the matching point in the right grayscale image is calculated, and this is used as the Hamming distance matching cost. A winner-takes-all strategy is used to optimize the 71 Hamming distance candidate values to find the specific disparity value that minimizes the Hamming distance. For example, a minimum distance of 4 corresponds to a 25-pixel shift, so the initial integer-pixel disparity value is set to 25. Following the sliding calculation window logic described above, all regions of the entire image are traversed to complete the construction of the initial integer-pixel disparity map array.
[0028] S2, perform sub-pixel disparity refinement on the pixels in the initial integer-pixel disparity map, construct a candidate sub-pixel disparity value set in the neighborhood of the integer-pixel disparity value, calculate the matching cost using a multi-scale gradient matching cost function to obtain a discrete matching cost curve, and fit the discrete matching cost curve using an asymmetric unimodal function. The asymmetric unimodal function sets independent left and right attenuation coefficients. Determine the sub-pixel disparity value, asymmetry parameter, and confidence level from the fitting function. For pixels with a confidence level lower than a preset threshold, update them by weighted spatial interpolation of the sub-pixel disparity value of high-confidence pixels in the neighborhood.
[0029] For each pixel in the initial integer-pixel disparity map, a set of candidate sub-pixel disparity values is established by uniformly sampling within a range of positive and negative pixels, with a step size of 0.1 pixels, centered on the integer-pixel disparity value of that pixel. For the epipolar-corrected left and right images, a three-layer Gaussian image pyramid is constructed, and the Sobel operator is called in each layer to calculate the image gradient values in the horizontal and vertical directions, respectively, to construct pixel gradient vectors. The set of candidate sub-pixel disparity values is traversed, and bilinear interpolation is used to obtain the gradient vector of the sub-pixel position in the right image. For each candidate disparity value, the normalized inner product of the corresponding pixel gradient vectors in the left and right images is calculated within the matching window as a directional consistency measure. A non-negative matching cost is constructed based on the directional consistency measure, so that the more consistent the gradient direction, the smaller the time value, thus generating a cost value for each candidate disparity and constructing a discrete matching cost curve.
[0030] An asymmetric unimodal function model is constructed, determined by the minimum abscissa, the minimum cost, the left curvature coefficient, and the right curvature coefficient, as the asymmetric unimodal function. Figure 2 As shown. The CeresSolver open-source optimization library is used, employing the Levenberg-Marquardt nonlinear least squares algorithm to iteratively fit the discrete matching cost curve to the asymmetric unimodal function, minimizing the sum of squared residuals. From the converged function model, continuous minimum x-coordinates are extracted as refined sub-pixel disparity values. Asymmetry parameters are calculated based on the left and right curvature coefficients, and confidence levels are calculated based on the minimum cost value and curvature coefficients. Pixels with confidence levels below a preset constant threshold are identified as low-confidence pixels. The KDTree nearest neighbor search algorithm from the FLANN library is then used to search for all pixels with confidence levels above the threshold within a preset pixel radius around the low-confidence pixels. Using the inverse distance weighted IDW spatial interpolation algorithm, the reciprocal of the Euclidean distance between high-confidence pixels and low-confidence pixels is used as the weight coefficient to calculate the sub-pixel disparity value of the found high-confidence pixels by weighted averaging. The result of the weighted averaging calculation is then assigned to the low-confidence pixel to complete the disparity map densification update.
[0031] In one possible embodiment, calculating the matching cost using a multi-scale gradient matching cost function includes: The left and right eye images are downsampled to construct an image pyramid with three scales: original resolution, one-third resolution, and one-fifth resolution. Within each scale layer, the gradient components in the horizontal and vertical directions of each pixel within the corresponding matching window are calculated, and the gradient feature matrix is extracted. For each candidate subpixel disparity value, the candidate subpixel disparity value is scaled proportionally according to the downsampling ratio of each scale layer. Then, the sum of the absolute differences of the gradient feature matrices of the corresponding matching windows of the left eye image and the right eye image in the three scale layers is calculated to obtain the single-layer matching cost. According to the preset weight coefficients, the single-layer matching costs of the three scale layers are weighted and summed to obtain the matching cost corresponding to the candidate sub-pixel disparity value.
[0032] A bicubic interpolation algorithm was used to perform dimensionality reduction compression on the original 1920×1080 grayscale images of the left and right eyes at different ratios, with downsampling coefficients of one-third and one-fifth, respectively, to construct a three-layer image pyramid with resolutions of 1920×1080, 640×360, and 384×216. In each specific layer, a 3×3 Sobel convolution operator was invoked to perform horizontal and vertical edge detection on each pixel within a matching window of 7×7 pixels, thereby calculating the horizontal gradient component of each point. and vertical gradient components The above two are combined to form a two-dimensional gradient vector for each pixel, and the combined output is the gradient feature matrix of the window. A candidate sub-pixel disparity set is generated with a step size of 0.1 pixels near the integer pixel disparity. Assuming the integer pixel disparity is 25, the sub-pixel candidate pool consists of 21 consecutive values from 24.0 to 26.0. During multi-scale verification, the candidate sub-pixel disparities need to be scaled proportionally; for example, in the one-third scale layer, the disparity value of 24.1 must be divided by 3 to obtain a positional offset of 8.033 for matching sampling, and bilinear interpolation is used to obtain the sub-pixel level coordinates to simulate gradient data. For the sub-pixel resampling layers calculated at each scale, the absolute difference between the gradient feature vectors of the left eye image window and the right eye offset window is calculated by subtracting the corresponding pixels and summed to obtain the single-layer absolute error matching cost for the three scales. , and To achieve a balance between detailed contours and global structure, the original resolution layer weights are set. One-third layer weight One-fifth of the layer weight =0.15. Through algebraic equations The summation yields the multi-scale matching cost corresponding to each candidate sub-pixel disparity value. This process can suppress gradient judder caused by high-frequency noise due to corneal reflection.
[0033] In one possible embodiment, the fitting of the discrete matching cost curve using an asymmetric unimodal function, wherein the asymmetric unimodal function sets independent left-side and right-side attenuation coefficients, including: In the discrete matching cost curve, the candidate sub-pixel disparity value corresponding to the minimum cost value is retrieved, and the matching cost value corresponding to the minimum point and at least two adjacent candidate sub-pixel disparity values on the left and right sides is extracted to form a sample point set. An asymmetric unimodal function model is constructed by splicing a decreasing function in the left half and an increasing function in the right half. The asymmetric unimodal function model contains independent left-side decay coefficients and right-side decay coefficients, respectively. Substitute the sample point set into the asymmetric unimodal function model, and use the nonlinear least squares method to optimize the parameters within the set maximum of 52 iterations. Obtain the left and right decay coefficients after convergence to obtain the fully fitted asymmetric unimodal function.
[0034] In this embodiment, the left attenuation coefficient and the right attenuation coefficient are represented as the left curvature coefficient and the right curvature coefficient, respectively. The discrete sub-pixel matching cost curve, composed of 21 points calculated previously, is processed, where the horizontal axis x represents sub-pixel disparity and the vertical axis y represents multi-scale cost value. The discrete sub-pixel matching cost curve is traversed to locate the coordinate pair with the minimum cost value. and Using this minimum value as the axis, we extract discrete data from the neighborhood; for example, we select the leftmost value. , and to the right , Together, they obtained a set of 5 discrete matching nodes. and to and The set of sample points. Construct a piecewise analytical model representing the asymmetric trend of the matching cost curve when the input coordinates are given. When using the left half-branch equation When input coordinates When using the right-hand branch equation In this continuous mathematical model, It is the x-coordinate of the theoretical minimum value in the continuous domain. It is a continuous minimum value. and Both are positive curvature coefficients, controlling the rate of change on the left and right sides of the matching cost curve, respectively. When When, the function value is This ensures This corresponds to the minimum position of the matching cost curve.
[0035] Substituting the above sample points into the nonlinear equation system, the Levenberg-Marquardt least squares algorithm with a trust region damping factor is used to determine the unknown parameter vector. , , , The optimal approximation calculation is performed. During the solution process, the target accuracy threshold is set to a change in the loss residual of less than 1e-6, and the hardware iteration protection limit is set to a maximum of 52 iterations. The loop ends when the model meets the accuracy requirement or reaches the hard boundary of 52 iterations, and the optimized optimal approximation value is successfully output. It is assumed that convergence is achieved on the 18th iteration. as well as This generates a continuous asymmetric unimodal function to characterize the asymmetric variation of local matching costs.
[0036] In one possible embodiment, determining the subpixel disparity value, asymmetric parameter, and confidence level from the fitted function includes: Find the minimum point of the fitted asymmetric unimodal function, and use the continuous abscissa values corresponding to the minimum point as the subpixel disparity value of the pixel. Calculate the absolute value of the difference between the right-side attenuation coefficient and the left-side attenuation coefficient, and divide the absolute value by the sum of the right-side attenuation coefficient and the left-side attenuation coefficient to obtain the normalized asymmetric parameter. The ordinate of the function corresponding to the minimum point is extracted as the minimum arithmetic value. The confidence level is calculated by combining the mean of the left-side decay coefficient and the right-side decay coefficient with a preset confidence level evaluation formula. The confidence level is positively correlated with the mean of the decay coefficient and negatively correlated with the minimum arithmetic value.
[0037] When the algorithm successfully outputs the parameter vector of the optimized asymmetric function model... , , , Then, extract the continuous theoretical horizontal floating-point position of the function's minimum value. For example, if calculated to be 24.935 pixels, this value, which deviates from the discrete interval constraint, will be recorded as the sub-pixel disparity result for that test point. The separated left and right morphological variables are extracted, and the structural difference evaluation equation is applied. To map geometric tilt; for example, using the acquired parameters and Substituting this into the equation yields a result approximately equal to 0.293. This bias is normalized to the range of 0 to 1 and is used to determine the imbalance of the disparity matching distribution at that point. Simultaneously, the minimum height is extracted. As a minimal value, and according to Calculate the mean curvature. Before calculating the confidence score, normalize both the mean curvature and the minimum cost value to obtain the normalized mean curvature. and normalized minimum value Retrieve the evaluation equation with exponential characteristics. ,in, This is a preset dimensionless adjustment coefficient. The formula indicates that a larger normalized mean curvature value means a sharper cost trough and a more precise matching location; a smaller normalized minimum cost value means smaller differences in the corresponding window and higher matching quality. This yields a disparity quality level within the range of 0 to 1, providing a basis for subsequent screening or repair of low-confidence pixels.
[0038] In one possible embodiment, updating pixels with confidence levels below a preset threshold using sub-pixel-level disparity value weighted spatial interpolation of high-confidence pixels in the neighborhood includes: A spatial neighborhood of 11×11 pixels is established centered on the target pixel with a confidence level lower than a preset threshold. Within the spatial neighborhood, all high-confidence pixels with a confidence level higher than the preset threshold are selected, and the Euclidean distance from each high-confidence pixel to the target pixel is calculated. Using the reciprocal of the Euclidean distance as the initial spatial weight, the initial spatial weights of all extracted high-confidence pixels are normalized to obtain the interpolation weights of each high-confidence pixel. The subpixel disparity values of each high-confidence pixel are multiplied by their corresponding interpolation weights and then summed to obtain the redefined subpixel disparity values of the target pixel, which are then used for replacement.
[0039] Preset confidence threshold Perform a row-by-row, column-by-column scan of the parallax result map. If the coordinates are found to be... and If the confidence level of a target pixel is 0.40, which is lower than the preset confidence threshold of 0.75, then the target pixel is determined to be a low-confidence pixel. This low-confidence pixel... and A spatial neighborhood of 11×11 pixels is established centered on the target pixel. Pixels in the same low-confidence state are removed from this neighborhood, and high-confidence pixels with a confidence value greater than 0.75 are selected as the interpolation basis; assuming a total of N=8 high-confidence pixels meeting the conditions are obtained. And record the coordinates and Using the classic two-point distance law, the spatial distance parameter from each high-confidence pixel to the target pixel is calculated. Furthermore, set The reciprocal of is the initial spatial weight of the corresponding high-confidence pixel. This indicates that neighboring pixels closer to the target pixel contribute more to the interpolation. To normalize the interpolation weights, the formula is used... The interpolation weights for each sample are distributed between 0 and 1, with the sum of the weights being 1. In the final stage, the corresponding N sub-pixel disparity values are... Each with its corresponding interpolation weight Multiply and then sum. If the sum is calculated to be... The disparity value of the original low-confidence pixel is replaced with the continuous disparity compensation result of 24.78 to reduce the impact of local invalid disparity on subsequent statistical features and improve the continuity and stability of the disparity map.
[0040] S3. Within the preset central fixation area, construct a histogram of the sub-pixel disparity values of the high-confidence pixels and calculate kurtosis and skewness. Calculate the mean and variance of all asymmetry parameters. Construct a multi-dimensional feature vector representing the asymmetry of the three-dimensional surface morphology of the eyeball using the kurtosis, skewness, and the mean and variance of the asymmetry parameters. Compare this vector with the standard feature space of the normal visual function model and output the eye position status assessment result.
[0041] The Hough Circles algorithm is used to locate the pupil center coordinates in an eye image. Using these coordinates as the geometric center, a rectangular region of interest with fixed pixel dimensions is cropped as the preset central fixation region. Subpixel-level disparity values of high-confidence pixels within the central fixation region are extracted, and frequency statistics are performed with a set data group interval to construct a disparity value distribution histogram. Figure 3 As shown, this figure is a histogram of the distribution of high-confidence disparity values within the central fixation region. The data exhibits a certain degree of skewness, with a mean of 28.32 pixels. Skewness features are obtained by calculating the third standard moment of the histogram data using statistical formulas, and kurtosis features are obtained by calculating the fourth standard moment. The asymmetric parameter values of all high-confidence pixels within the central fixation region are extracted, summed, and divided by the total number of pixels to obtain the mean of the asymmetric parameters. The average of the squares of the differences between each asymmetric parameter and this mean is then calculated to obtain the variance of the asymmetric parameters. The calculated kurtosis, skewness, mean of the asymmetric parameters, and variance of the asymmetric parameters are concatenated sequentially and converted into a floating-point array to form a four-dimensional feature vector representing the asymmetry of eyeball morphology.
[0042] It can load the OneClassSVM algorithm from the Scikit-Learn machine learning library and train it using four-dimensional features of healthy individuals' eyes to generate a normal visual function model. The generated four-dimensional feature vector is mapped to a standard feature space, and the directed distance from the current feature vector to the separating hyperplane is calculated. If the directed distance is greater than zero, the input features are determined to be within the normal class boundary, and an assessment result indicating normal eye position is output to the terminal. If the directed distance is less than or equal to zero, the asymmetry of the three-dimensional surface morphology of the eyeball is determined to exceed the normal boundary, and a screening prompt indicating suspected eye position abnormality or binocular visual function asymmetry is output to the terminal.
[0043] In one possible embodiment, the step of constructing a histogram of sub-pixel disparity values for the high-confidence pixels within a preset central fixation region and calculating kurtosis and skewness includes: Within the preset central gaze area, extract the maximum and minimum values of subpixel-level disparity values for all high-confidence pixels, and calculate the disparity range; The disparity range is evenly divided into 60 disparity intervals of equal length. The frequency of subpixel-level disparity values of each high-confidence pixel falling within each disparity interval is counted, and a disparity histogram is constructed. Calculate the arithmetic mean and standard deviation of the subpixel disparity values of all high-confidence pixels within the region; Calculate the cube and fourth power of the difference between each subpixel level disparity value and the arithmetic mean, respectively. Combined with the standard deviation, calculate the skewness representing the asymmetry of the disparity distribution according to the standard skewness formula, and calculate the kurtosis representing the steepness of the disparity distribution according to the standard kurtosis formula.
[0044] A fixed point of interest is extracted from the visual field using an iris localization module. A ring-shaped focus area (central fixation region) with a preset diameter of 160 pixels is generated based on this center. High-confidence disparity data, filtered by a 0.75 confidence threshold, is extracted from this region, resulting in, for example, 3000 high-confidence disparity values. The maximum value among these disparity values is then determined. For example, 32.50 pixels and minimum value For example, with an accurate calibration of 26.50 pixels, the total length of the interval range is obtained as Range = 6.00 by the difference between the two values. The disparity range is then evenly divided into 60 disparity intervals, each with a width of 0.10 pixels. The frequency of each disparity value falling into its corresponding interval is counted, and a disparity histogram is constructed. Subsequently, the arithmetic mean of the disparity values within that region is calculated. 28.32 pixels and standard deviation The standard skewness is 1.15. Based on the standard skewness formula, the third standard moment of each disparity value relative to the mean is calculated to obtain the skewness. If the skewness is 0.12, it indicates a slight right skewness in the disparity distribution. Based on the standard kurtosis formula, the fourth standard moment of each disparity value relative to the mean is calculated to obtain the standard kurtosis index, which is used to identify the degree of kurtosis or flatness of the distribution.
[0045] In one possible embodiment, the step of constructing a multidimensional feature vector representing the asymmetry of the three-dimensional surface morphology of the eyeball by using the mean and variance of the kurtosis, skewness, and asymmetry parameters, and comparing it with the standard feature space of a normal visual function model to output an eye position status assessment result includes: The mean of the kurtosis, the skewness, and the asymmetry parameter are concatenated with the variance of the asymmetry parameter to form a four-dimensional feature vector representing the asymmetry of the three-dimensional surface morphology of the eyeball. Call the standard feature space model pre-established based on the eye position and visual data of normal people, and obtain the normal standard feature mean vector and the inverse matrix of the feature covariance matrix corresponding to the model; Based on the mean vector of the normal standard features and the inverse matrix of the feature covariance matrix, calculate the Mahalanobis distance between the multidimensional feature vector and the normal standard feature space; The calculated Mahalanobis distance is compared with a preset anomaly detection distance threshold. If the Mahalanobis distance is greater than the preset anomaly detection distance threshold, the eye position is determined to be abnormal; otherwise, the eye position is determined to be normal.
[0046] The front-end module receives and calculates various variables representing the target's morphological characteristics, including the kurtosis (Kurtosis = 2.85), the parallax skewness (Skewness = 0.12), and the mean of the asymmetry parameter. Asymmetric parameter variance According to a fixed arrangement order The features are cascaded sequentially to construct a 1×4 four-dimensional feature vector X=[2.85,0.12,0.18,0.012] for the subject. A standard feature space model pre-established based on eye position, posture, and visual data of a normal population is read to obtain the normal standard feature mean vector. ,For example Given the expression [3.00, 0.05, 0.15, 0.010], obtain the corresponding 4×4 feature covariance matrix. Then, calculate the high-dimensional inverse matrix of the current covariance matrix. Apply the inverse matrix to the formula This calculation method can reduce the impact of differences in the dimensions and correlations of different features on the judgment results, thereby calculating the offset value of the subject's four-dimensional feature vector relative to the normal standard feature space, for example, obtaining a Mahalanobis distance of 4.25. According to a preset abnormal judgment distance threshold, for example, setting the threshold to 3.50, the calculated Mahalanobis distance is compared with the abnormal judgment distance threshold: if the actual vector offset of 4.25 is greater than the threshold of 3.50, then the eye position is judged to be abnormal; a screening prompt for abnormal eye position is output, indicating that there may be asymmetry in binocular vision function, for reference in subsequent clinical examinations; if the actual distance is 2.10, which is less than the abnormal judgment distance threshold, then an assessment result of normal eye position is output.
[0047] This ablation experiment was conducted on a computing platform equipped with an Intel Core i9 processor and an NVIDIA RTX 3080 graphics card. The test dataset consisted of one thousand sets of 1920×1080 resolution binocular stereoscopic eye images, covering an equal amount of normal eye positions and abnormal eye position data including corneal reflection interference. The experiment set three core indicators: root mean square error of disparity, subpixel matching error rate, and accuracy of eye position anomaly detection. The baseline model, the model with input multi-scale gradient matching cost function, the model with superimposed asymmetric unimodal function fitting, and the complete technical solution including spatial interpolation update were compared and evaluated.
[0048] The baseline model using only single-scale basic cost calculation and symmetric curve fitting yielded a root mean square error (RMSE) of 1.45 pixels for disparity, a subpixel matching error rate of 12.3%, and an eye position anomaly detection accuracy of 81.5%. When the model was only fed a multi-scale gradient matching cost function, the RMSE decreased to 1.12 pixels, the error rate decreased to 8.7%, and the accuracy improved to 85.2%. Further layering an asymmetric unimodal function fitting mechanism reduced the RMSE to 0.83 pixels, the error rate to 5.4%, and the accuracy to 91.6%. Using a complete scheme including confidence space-weighted interpolation updates, the RMSE was only 0.51 pixels, the subpixel matching error rate decreased to 2.1%, and the eye position anomaly detection accuracy reached 98.4% on this test dataset. Figure 4 As shown.
[0049] Utilizing a multi-scale gradient matching cost function can suppress interference from local corneal highlights and high-frequency noise, resulting in a steady improvement in disparity accuracy. Replacing the traditional symmetric model with an asymmetric unimodal function fitting better reflects the inconsistent rates of change on the left and right sides of the matching cost curve, reducing the impact of micro-jitter on sub-pixel disparity estimation. A high-confidence spatial neighborhood interpolation update strategy repairs pixel-level disparity holes in low-reflectivity areas. The gradual superposition of these three techniques leads to more continuous and stable 3D spatial topography reconstruction results, and on this test dataset, improves the accuracy of eye position anomaly detection by approximately 16.9 percentage points compared to the baseline model.
[0050] This disclosure also provides a binocular vision function screening system based on stereoscopic vision image analysis, including: The calculation module is used to acquire the left and right eye images of the subject when the subject gazes at the visual target simultaneously by the binocular camera, and calculate the initial integer-pixel disparity map representing the three-dimensional geometric depth of the subject's eye surface. The update module is used to perform sub-pixel disparity refinement on the pixels in the initial integer-pixel disparity map, construct a candidate sub-pixel disparity value set in the neighborhood of the integer-pixel disparity value, calculate the matching cost value using a multi-scale gradient matching cost function to obtain a discrete matching cost curve, and fit the discrete matching cost curve using an asymmetric unimodal function. The asymmetric unimodal function sets independent left and right attenuation coefficients. The sub-pixel disparity value, asymmetry parameter and confidence level are determined from the fitting function. Pixels with confidence levels lower than a preset threshold are updated by weighted spatial interpolation of the sub-pixel disparity values of high-confidence pixels in the neighborhood. The output module is used to construct a histogram of the subpixel-level disparity values of the high-confidence pixels within a preset central fixation area and calculate the kurtosis and skewness. It also calculates the mean and variance of all asymmetry parameters, constructs a multidimensional feature vector representing the asymmetry of the three-dimensional surface morphology of the eyeball using the kurtosis, skewness, and asymmetry parameters, compares it with the standard feature space of a normal visual function model, and outputs the eye position status assessment result.
[0051] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0052] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for screening binocular vision function based on stereoscopic vision image analysis, characterized in that, include: Acquire the left and right eye images of the subject when they gaze at a visual target using a binocular camera, and calculate the initial integer-pixel disparity map representing the three-dimensional geometric depth of the subject's eye surface. Subpixel-level disparity refinement is performed on the pixels in the initial integer-level disparity map. A candidate subpixel disparity value set is constructed in the neighborhood of the integer-level disparity value. The matching cost is calculated using a multi-scale gradient matching cost function to obtain a discrete matching cost curve. An asymmetric unimodal function is used to fit the discrete matching cost curve. The asymmetric unimodal function sets independent left and right attenuation coefficients. The subpixel-level disparity value, asymmetry parameter, and confidence level are determined from the fitting function. Pixels with confidence levels lower than a preset threshold are updated by weighted spatial interpolation of the subpixel-level disparity values of high-confidence pixels in the neighborhood. Within a preset central fixation area, a histogram is constructed for the subpixel-level disparity values of the high-confidence pixels, and kurtosis and skewness are calculated. The mean and variance of all asymmetry parameters are calculated, and the kurtosis, skewness, mean and variance of the asymmetry parameters are used to construct a multidimensional feature vector representing the asymmetry of the three-dimensional surface morphology of the eyeball. This vector is then compared with the standard feature space of a normal visual function model to output the eye position status assessment result.
2. The method according to claim 1, characterized in that, The calculation yields an initial integer-pixel disparity map representing the three-dimensional geometric depth of the subject's eye surface, including: The left and right eye images are converted into left and right grayscale images, respectively. A local window of size 5×5 pixels is constructed with the pixel to be determined as the center. The gray values of the 24 surrounding pixels in the local window are compared with the gray value of the center pixel. If the gray value of the surrounding pixels is greater than the gray value of the center pixel, it is recorded as 1; otherwise, it is recorded as 0. The Census feature bit string of the pixel is generated by arranging them in sequence. Within a preset disparity search range of 0 to 70 pixels, the disparity values are moved one by one, and the Hamming distance between the Census feature bit strings of corresponding pixels in the left grayscale image and the right grayscale image is calculated as the matching cost. The disparity value with the smallest Hamming distance is selected as the initial integer-pixel disparity value of the pixel to be determined, and the initial integer-pixel disparity map is generated by traversing all pixels.
3. The method according to claim 1, characterized in that, The calculation of the matching cost value using the multi-scale gradient matching cost function includes: The left and right eye images are downsampled to construct an image pyramid with three scales: original resolution, one-third resolution, and one-fifth resolution. Within each scale layer, the gradient components in the horizontal and vertical directions of each pixel within the corresponding matching window are calculated, and the gradient feature matrix is extracted. For each candidate subpixel disparity value, the candidate subpixel disparity value is scaled proportionally according to the downsampling ratio of each scale layer. Then, the sum of the absolute differences of the gradient feature matrices of the corresponding matching windows of the left eye image and the right eye image in the three scale layers is calculated to obtain the single-layer matching cost. According to the preset weight coefficients, the single-layer matching costs of the three scale layers are weighted and summed to obtain the matching cost corresponding to the candidate sub-pixel disparity value.
4. The method according to claim 1, characterized in that, The method of fitting the discrete matching cost curve using an asymmetric unimodal function, wherein the asymmetric unimodal function sets independent left-side and right-side attenuation coefficients, including: In the discrete matching cost curve, the candidate sub-pixel disparity value corresponding to the minimum cost value is retrieved, and the matching cost value corresponding to the minimum point and at least two adjacent candidate sub-pixel disparity values on the left and right sides is extracted to form a sample point set. An asymmetric unimodal function model is constructed by splicing a decreasing function in the left half and an increasing function in the right half. The asymmetric unimodal function model contains independent left-side decay coefficients and right-side decay coefficients, respectively. Substitute the sample point set into the asymmetric unimodal function model, and use the nonlinear least squares method to optimize the parameters within the set maximum of 52 iterations. Obtain the left and right decay coefficients after convergence to obtain the fully fitted asymmetric unimodal function.
5. The method according to claim 1, characterized in that, The process of determining sub-pixel disparity values, asymmetric parameters, and confidence levels from the fitted function includes: Find the minimum point of the fitted asymmetric unimodal function, and use the continuous abscissa values corresponding to the minimum point as the subpixel disparity value of the pixel. Calculate the absolute value of the difference between the right-side attenuation coefficient and the left-side attenuation coefficient, and divide the absolute value by the sum of the right-side attenuation coefficient and the left-side attenuation coefficient to obtain the normalized asymmetric parameter. The ordinate of the function corresponding to the minimum point is extracted as the minimum arithmetic value. The confidence level is calculated by combining the mean of the left-side decay coefficient and the right-side decay coefficient with a preset confidence level evaluation formula. The confidence level is positively correlated with the mean of the decay coefficient and negatively correlated with the minimum arithmetic value.
6. The method according to claim 1, characterized in that, The step of updating pixels with confidence levels below a preset threshold using sub-pixel-level disparity value weighted spatial interpolation of high-confidence pixels in the neighborhood includes: A spatial neighborhood of 11×11 pixels is established centered on the target pixel with a confidence level lower than a preset threshold. Within the spatial neighborhood, all high-confidence pixels with a confidence level higher than the preset threshold are selected, and the Euclidean distance from each high-confidence pixel to the target pixel is calculated. Using the reciprocal of the Euclidean distance as the initial spatial weight, the initial spatial weights of all extracted high-confidence pixels are normalized to obtain the interpolation weights of each high-confidence pixel. The subpixel disparity values of each high-confidence pixel are multiplied by their corresponding interpolation weights and then summed to obtain the redefined subpixel disparity values of the target pixel, which are then used for replacement.
7. The method according to claim 1, characterized in that, The step of constructing a histogram of sub-pixel disparity values for the high-confidence pixels within a preset central fixation area and calculating kurtosis and skewness includes: Within the preset central gaze area, extract the maximum and minimum values of subpixel-level disparity values for all high-confidence pixels, and calculate the disparity range; The disparity range is evenly divided into 60 disparity intervals of equal length. The frequency of subpixel-level disparity values of each high-confidence pixel falling within each disparity interval is counted, and a disparity histogram is constructed. Calculate the arithmetic mean and standard deviation of the subpixel disparity values of all high-confidence pixels within the region; Calculate the cube and fourth power of the difference between each subpixel level disparity value and the arithmetic mean, respectively. Combined with the standard deviation, calculate the skewness representing the asymmetry of the disparity distribution according to the standard skewness formula, and calculate the kurtosis representing the steepness of the disparity distribution according to the standard kurtosis formula.
8. The method according to claim 1, characterized in that, The process involves constructing a multidimensional feature vector representing the asymmetry of the three-dimensional surface morphology of the eyeball using the mean and variance of the kurtosis, skewness, and asymmetry parameters. This vector is then compared with the standard feature space of a normal visual function model to output an eye position status assessment result, including: The mean of the kurtosis, the skewness, and the asymmetry parameter are concatenated with the variance of the asymmetry parameter to form a four-dimensional feature vector representing the asymmetry of the three-dimensional surface morphology of the eyeball. Call the standard feature space model pre-established based on the eye position and visual data of normal people, and obtain the normal standard feature mean vector and the inverse matrix of the feature covariance matrix corresponding to the model; Based on the mean vector of the normal standard features and the inverse matrix of the feature covariance matrix, calculate the Mahalanobis distance between the multidimensional feature vector and the normal standard feature space; The calculated Mahalanobis distance is compared with a preset anomaly detection distance threshold. If the Mahalanobis distance is greater than the preset anomaly detection distance threshold, the eye position is determined to be abnormal; otherwise, the eye position is determined to be normal.
9. A binocular vision function screening system based on stereoscopic vision image analysis, characterized in that, include: The calculation module is used to acquire the left and right eye images of the subject when the subject gazes at the visual target simultaneously by the binocular camera, and calculate the initial integer-pixel disparity map representing the three-dimensional geometric depth of the subject's eye surface. The update module is used to perform sub-pixel disparity refinement on the pixels in the initial integer-pixel disparity map, construct a candidate sub-pixel disparity value set in the neighborhood of the integer-pixel disparity value, calculate the matching cost value using a multi-scale gradient matching cost function to obtain a discrete matching cost curve, and fit the discrete matching cost curve using an asymmetric unimodal function. The asymmetric unimodal function sets independent left and right attenuation coefficients. The sub-pixel disparity value, asymmetry parameter and confidence level are determined from the fitting function. Pixels with confidence levels lower than a preset threshold are updated by weighted spatial interpolation of the sub-pixel disparity values of high-confidence pixels in the neighborhood. The output module is used to construct a histogram of the subpixel-level disparity values of the high-confidence pixels within a preset central fixation area and calculate the kurtosis and skewness. It also calculates the mean and variance of all asymmetry parameters, constructs a multidimensional feature vector representing the asymmetry of the three-dimensional surface morphology of the eyeball using the kurtosis, skewness, and asymmetry parameters, compares it with the standard feature space of a normal visual function model, and outputs the eye position status assessment result.
10. The system according to claim 9, characterized in that, The calculation yields an initial integer-pixel disparity map representing the three-dimensional geometric depth of the subject's eye surface, including: The left and right eye images are converted into left and right grayscale images, respectively. A local window of size 5×5 pixels is constructed with the pixel to be determined as the center. The gray values of the 24 surrounding pixels in the local window are compared with the gray value of the center pixel. If the gray value of the surrounding pixels is greater than the gray value of the center pixel, it is recorded as 1; otherwise, it is recorded as 0. The Census feature bit string of the pixel is generated by arranging them in sequence. Within a preset disparity search range of 0 to 70 pixels, the disparity values are moved one by one, and the Hamming distance between the Census feature bit strings of corresponding pixels in the left grayscale image and the right grayscale image is calculated as the matching cost. The disparity value with the smallest Hamming distance is selected as the initial integer-pixel disparity value of the pixel to be determined, and the initial integer-pixel disparity map is generated by traversing all pixels.