Image processing based medical device optical system calibration method and system
By analyzing the optical calibration grid boundary structure, partitioning to compensate for nonlinear distortion, optimizing pixel connectivity, and correcting morphological errors, the problem of image distortion in the optical system of medical equipment was solved, thereby improving image quality and reliability.
Patent Information
- Application Number
- CN202411931528.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2044-12-26
AI Technical Summary
Existing technologies cannot effectively handle complex geometric deformations and optical system distortions in the calibration of medical device optical systems, resulting in significant distortion and loss of detail in image areas, which affects the accuracy and reliability of image analysis.
By capturing calibration images of medical devices, analyzing the boundary structure of the optical calibration grid, generating a geometric distortion distribution map, compensating for nonlinear distortion in different areas, optimizing pixel connectivity, correcting morphological errors region by region, repairing edge details, controlling amplitude distortion, and generating an optimized optical system calibration scheme.
It improves the consistency and uniformity of image quality, significantly enhances the reliability and performance of the optical system, and ensures image accuracy and integrity.
Smart Images

Figure CN119887935B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of medical image processing technology, and in particular to a medical device optical system calibration method and system based on image processing. BACKGROUND
[0002] The field of medical image processing technology involves using image processing techniques to improve the precision and efficiency of medical devices in imaging, measurement, analysis, etc. This technology uses computer vision, image enhancement, segmentation, matching, and three-dimensional reconstruction methods to optimize the acquisition, processing, and analysis of medical image data. Medical image processing technology is widely used in medical imaging devices such as X-ray machines, CT scanners, and ultrasound systems to improve image quality, reduce noise, extract key information, and automate data analysis. The core goal is to enhance the usability of image information and ensure that medical devices provide more accurate and clear data support during operation.
[0003] Among them, the medical device optical system calibration method is a technology based on image processing, aiming to ensure that the optical system in the medical device reaches the precise performance standard. This method ensures the imaging quality and measurement accuracy of image acquisition devices through precise adjustment and correction of medical device optical elements. The calibration of the optical system is to ensure that the device can provide stable and consistent image quality when imaging, which is crucial for further processing and analyzing image data. This method involves image calibration, geometric correction, and illumination uniformity adjustment to improve the overall reliability and performance of the device.
[0004] Although existing technologies can adjust the imaging quality of medical device optical systems through image calibration and geometric correction, the operation process is relatively general and single, relying on global adjustment methods and ignoring detailed correction of local distortions. This approach cannot effectively handle nonlinear distortions in image boundaries and detail areas when faced with complex geometric deformations and optical system distortions. For example, during image correction, it is difficult to accurately identify distortions in local areas, resulting in significant shape errors or distortions in some image areas, affecting the accuracy of subsequent analysis and diagnosis. Traditional distortion compensation methods lack fine-tuned adjustments for different areas, making it difficult to avoid loss of image edge details and discontinuity, ultimately affecting the reliability of medical imaging devices in actual operation. Existing technologies have not achieved comprehensive optimization of optical systems, especially when dealing with complex and detailed image distortions, lacking more accurate and localized correction methods. SUMMARY
[0005] The purpose of the present application is to solve the shortcomings in the prior art and to provide a medical device optical system calibration method and system based on image processing.
[0006] In order to achieve the above object, the present application adopts the following technical scheme: the medical equipment optical system calibration method based on image processing comprises the following steps:
[0007] S1: by capturing the calibration image in the medical equipment, analyzing the boundary structure of the optical calibration grid, screening the pixel distribution characteristics of the segmentation boundary, extracting the geometric description characteristics of the calibration image, and generating a geometric distortion distribution map;
[0008] S2: based on the geometric distortion distribution map, analyze the geometric variation relationship of the pixel offset range, adjust the position combined with the connection characteristics of the calibration target area, compensate for the nonlinear distortion in the partition, generate a distortion compensation image, analyze the pixel connection relationship of the distortion compensation image, check the continuity of the boundary connection structure, perform symmetry processing on the boundary contour, and generate a structure symmetry optimization result;
[0009] S3: based on the structure symmetry optimization result, analyze the image boundary contour feature, extract the curvature change area in the optical calibration grid, optimize the connection balance region by region, correct the shape error, obtain the region alignment result, perform global correction on the curvature change area in the region alignment result, and generate an image structure correction result;
[0010] S4: based on the image structure correction result, combined with the amplitude distortion characteristics of the optical calibration grid, analyze the nonlinear deformation distribution of the calibration target boundary, gradually repair the diffraction deviation of the region connection, perform morphological smoothing on the edge detail area, optimize the connection integrity of the region boundary, and generate an optimized optical system calibration scheme.
[0011] As a further scheme of the present application, the acquisition step of the geometric distortion distribution map is specifically:
[0012] S111: by capturing the calibration image in the medical equipment, extracting the boundary structure in the optical calibration grid, identifying the edge pixel density, calculating the gray value and gradient value, and performing Gaussian smoothing processing, filtering noise, obtaining the boundary feature of the optical calibration grid;
[0013] S112: based on the boundary feature of the optical calibration grid, screen the boundary pixel distribution characteristics, set the threshold range, analyze the region pixel distribution, determine the grid interval uniformity, and remove the abnormal pixel distribution to obtain a preliminary result of geometric distortion distribution;
[0014] S113: distortion optimization is performed on the preliminary result of geometric distortion distribution, the deviation of the grid area geometric error and the expected standard is calculated, and the formula is applied:
[0015]
[0016] Calculate the error correction amount of the grid area to generate a geometric distortion distribution map;
[0017] wherein, D opt error correction quantity representing a grid area, G i geometric characteristic value representing the i-th grid area, G ref characteristic value representing a standard geometric grid, w i is a weight coefficient for each area, and α, β, and γ are adjustment parameters, and n represents the total number of grid areas.
[0018] As a further scheme of the present application, the acquiring step of the distortion compensation image is specifically:
[0019] S211: Based on the geometric distortion distribution map, the coordinate offset of each pixel point is extracted, the original coordinates and offset coordinates of the pixels in the image are read, the offset characteristics of the pixels are counted and partitioned with the image space position, and a pixel offset mapping relationship is obtained;
[0020] S212: Based on the pixel offset mapping relationship, the calibration target area is divided into multiple small areas, the offset data of the area pixels is extracted, the offset amount within the area is adjusted, the connection characteristics are uniformly corrected according to the coordinate change of the area boundary, and an area position adjustment parameter is acquired;
[0021] S213: Based on the area position adjustment parameter, the image is compensated region by region, the pixel position of each partition is corrected through the pixel coordinate adjustment amount, the corrected pixel coordinates are remapped to the image space, the pixels are replaced with the original image coordinates, and a distortion compensation image is generated.
[0022] As a further scheme of the present application, the acquiring step of the structure symmetry optimization result is specifically:
[0023] S221: The pixel points of the distortion compensation image are scanned one by one, the coordinate relationship of the pixel points is identified and the gradient change between adjacent pixels is analyzed, the pixel gradient value is quantized, and a pixel gradient absolute value quantization result is generated;
[0024] S222: Based on the pixel gradient absolute value quantization result, a pixel gradient threshold is set for judgment, by cyclically traversing each boundary pixel, the pixel points not meeting the threshold are removed, the connection relationship of the continuous pixel points is preserved, and the formula:
[0025]
[0026] a boundary connection structure continuity result is generated;
[0027] wherein, C represents the boundary connection structure continuity value, A j and A j-1 are the gradient values of the current pixel point and the adjacent pixel point, respectively, x j , yj and x j-1 y j-1 These are the coordinates of the pixel points, and m is the number of boundary pixels;
[0028] S223: Based on the continuity result of the boundary connection structure, extract the center of symmetry of the boundary contour, calculate the gradient value difference of the boundary pixels on both sides of the center of symmetry, perform symmetry matching, set the matching error threshold to filter the optimal symmetric boundary contour, and generate the structural symmetry optimization result.
[0029] As a further aspect of the present invention, the step of obtaining the region alignment result specifically includes:
[0030] S311: Based on the structural symmetry optimization results, call the image data of the optical calibration grid, extract the grid boundary curvature distribution parameters, perform segmented processing of the boundary curvature values, analyze the curvature change rate of each segment, calculate the curvature deviation value of adjacent regions, and obtain the curvature change region parameters.
[0031] S312: Based on the parameters of the curvature variation region, analyze the deviation balance relationship between adjacent curvature regions using the formula:
[0032]
[0033] Obtain curvature balance calibration parameters;
[0034] Among them, B r w represents the curvature balance calibration parameter. u The weighting factor k represents region u. u Let k be the curvature value of region u. max Here, E is the smoothing adjustment coefficient, N represents the total number of regions, and k represents the curvature variation region parameter. u+1 This represents the curvature value of region u+1;
[0035] S313: Call the curvature balance calibration parameters to perform error correction on the curvature variation area in the optical calibration grid, analyze the difference between the corrected curvature parameters and the error threshold, determine whether the curvature error meets the threshold condition through iterative calculation, and obtain the area alignment result.
[0036] As a further aspect of the present invention, the step of obtaining the image structure correction result specifically includes:
[0037] S321: Based on the region alignment result, extract the pixel coordinates and curvature values within the curvature change region, scan the coordinate data line by line and read the curvature values, sort and count the curvature values according to the coordinate order, set the curvature change range threshold boundary, divide the curvature values into multiple intervals, and obtain curvature segmentation statistics.
[0038] S322: Based on the curvature segmentation statistics, perform difference calculation on the coordinate data in each curvature interval, calculate the curvature difference between each coordinate point and its neighboring points, filter out coordinate points whose curvature deviation exceeds the standard value, compare and correct the curvature deviation data with the standard curvature value, and obtain the corrected curvature distribution matrix.
[0039] S323: Based on the corrected curvature distribution matrix, traverse the coordinate points within the curvature change region, perform coordinate correction, remap the adjusted coordinates and curvature values back to the overall image structure data, merge the adjusted coordinate set and curvature change data, and generate the image structure correction result.
[0040] As a further aspect of the present invention, the steps for obtaining the optimized optical system calibration scheme are specifically as follows:
[0041] S411: Based on the image structure correction results, call the amplitude distortion characteristic parameters of the optical calibration grid and the calibration target boundary data, analyze the deviation amplitude of the nonlinear deformation distribution, locate the boundary region of the amplitude distortion distribution and mark the coordinates through differential operation, and obtain the nonlinear deformation distribution data.
[0042] S412: Call the aforementioned nonlinear deformation distribution data to perform morphological repair on the located amplitude distortion region. This is done by gradually correcting the distortion through amplitude distortion characteristics, nonlinear deviation, and boundary adjustment parameters, using the following formula:
[0043] R c =|d k ·p b +k a ·q b |
[0044] The amplitude distortion distribution and nonlinear deformation of the boundary region are repaired to obtain the morphological smoothing parameters after repair.
[0045] Where, d k p represents the magnitude of the nonlinear deviation. b For boundary adjustment weights, k a q is the amplitude distortion characteristic parameter. b To correct the adjustment factor, R c Indicates the smoothing parameters of the repaired boundary shape;
[0046] S413: Call the repaired morphological smoothing parameters, analyze the impact of edge region morphological changes on the integrity of the calibration target boundary coordinate data, perform curvature smoothing and coordinate matching, analyze the overall curvature consistency of the boundary, judge the repair effect by comparing the integrity threshold, and generate an optimized optical system calibration scheme.
[0047] A medical device optical system calibration system based on image processing, wherein the image processing-based medical device optical system calibration system is used to perform the above-described image processing-based medical device optical system calibration method, the system comprising:
[0048] The image calibration module captures calibration images from medical devices, extracts the boundary pixel coordinates of the optical calibration grid, filters pixel data that conforms to the boundary distribution characteristics, calculates the spatial offset of the boundary pixels, analyzes the curvature variation range, and obtains a geometric distortion distribution map.
[0049] Based on the geometric distortion distribution map, the distortion compensation module analyzes the pixel offset relationship of the target region boundary, filters nonlinear offset points in the region, performs partition compensation and re-matches the region boundary connection, optimizes the spatial distribution of boundary pixels, and obtains the distortion compensation image.
[0050] Based on the distortion compensation image, the structure optimization module extracts the boundary contour parameters of the calibration grid, filters curvature change regions, analyzes the boundary pixel connection offset values, corrects the boundary geometric error region by region, reconstructs the regional balanced boundary connection relationship, verifies the continuity of curvature change, and obtains the contour structure optimization results.
[0051] Based on the contour structure optimization results, the contour correction module extracts the distribution parameters of the curvature of the calibration grid boundary, analyzes the geometric characteristics of the curvature offset region, filters the boundary regions where the curvature offset value exceeds the threshold, calculates and corrects the global curvature offset relationship, matches the boundary contour continuous smoothing parameters, and obtains the image boundary correction results.
[0052] Based on the image boundary correction results, the edge optimization module extracts the boundary parameters of the optical calibration grid amplitude distortion, analyzes the diffraction offset characteristics of the nonlinear deformation region, filters the edge pixel curvature offset values, repairs the edge diffraction deformation characteristics region by region, smooths the boundary curvature of the region connection, optimizes the edge spatial connection characteristics, and obtains the optimized optical system calibration scheme.
[0053] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0054] In this invention, by accurately capturing calibration images and analyzing the boundary structure of the optical calibration grid, geometric distortion regions in the calibration images are effectively identified and screened, thereby extracting more detailed geometric descriptive features. This not only improves the accuracy of distortion-compensated image generation but also optimizes the image quality of each region by compensating for nonlinear distortion in a partitioned manner. Through local adjustments combined with the analysis of pixel connectivity, the coherence of the image boundary structure is enhanced, solving the morphological error problem caused by optical system distortion. By optimizing the structural symmetry and curvature variation regions, distortion in detailed areas of the image is repaired, and edge details are further smoothed, improving the overall image quality and usability. The amplitude distortion characteristics of the optical calibration grid are also effectively controlled, further reducing morphological distortion of edge details and ensuring the integrity and consistency of the image. While ensuring the imaging accuracy of medical equipment, this invention effectively solves the influence of nonlinear distortion and morphological errors, significantly improving the reliability and performance of the optical system. Attached Figure Description
[0055] Figure 1 This is a schematic diagram of the workflow of the present invention;
[0056] Figure 2 This is a flowchart of the geometric distortion distribution diagram in this invention;
[0057] Figure 3 This is a flowchart of the distortion compensation image in this invention;
[0058] Figure 4 This is a flowchart of the structural symmetry optimization results in this invention;
[0059] Figure 5 This is a flowchart of the region alignment results in this invention;
[0060] Figure 6 This is a flowchart of the image structure correction results in this invention;
[0061] Figure 7 This is a flowchart of the calibration scheme for the optimized optical system in this invention. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0063] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0064] Example 1
[0065] Please see Figure 1 This invention provides a technical solution: a calibration method for an optical system of a medical device based on image processing, comprising the following steps:
[0066] S1: By capturing calibration images from medical devices, analyze the boundary structure of the optical calibration grid, filter the pixel distribution characteristics of the segmentation boundary, extract the geometric description features of the calibration image, and generate a geometric distortion distribution map;
[0067] S2: Based on the geometric distortion distribution map, analyze the geometric variation relationship of pixel offset range, adjust the position in combination with the connection characteristics of the calibration target area, compensate for nonlinear distortion in the partition, generate distortion compensation image, analyze the pixel connection relationship of the distortion compensation image, check the continuity of the boundary connection structure, perform symmetry processing on the boundary contour, and generate structural symmetry optimization results.
[0068] S3: Based on the structural symmetry optimization results, analyze the image boundary contour features, extract the curvature change region in the optical calibration grid, optimize the connection balance region by region, correct the morphological error, obtain the region alignment result, perform global correction on the curvature change region in the region alignment result, and generate the image structure correction result.
[0069] S4: Based on the image structure correction results and combined with the amplitude distortion characteristics of the optical calibration grid, analyze the nonlinear deformation distribution of the calibration target boundary, gradually repair the diffraction deviation of the region connection, smooth the shape of the edge detail region, optimize the connection integrity of the region boundary, and generate the optimized optical system calibration scheme.
[0070] The geometric distortion distribution map includes boundary curvature characteristics, pixel offset parameters, and region morphology description values. The distortion compensation image includes position adjustment image, nonlinear compensation distribution, and pixel connection partition values. The structural symmetry optimization results include boundary contour adjustment characteristics, pixel symmetry distribution values, and connection continuity check map. The region alignment results include contour optimization values, curvature balance region, and morphological matching features. The image structure correction results include global curvature correction values, boundary smoothing distribution, and morphological connection correction values. The optimized optical system calibration scheme includes amplitude distortion repair parameters, region connection integrity map, and edge smoothing optimization map.
[0071] Please see Figure 2 The specific steps for obtaining the geometric distortion distribution map are as follows:
[0072] S111: By capturing calibration images from medical devices, the boundary structure in the optical calibration grid is extracted, the edge pixel density is identified, gray values and gradient values are calculated, and Gaussian smoothing is performed to filter noise and obtain the boundary features of the optical calibration grid.
[0073] To extract the region of the optical calibration grid from the image, the captured image is first preprocessed, including image denoising and contrast enhancement, to highlight the grid boundary structure. Then, an edge detection algorithm is used to extract the grid boundary contour. Statistical analysis is performed on the pixels of the boundary to extract the gray value, gradient value, and pixel density distribution characteristics of each boundary pixel. Subsequently, by calculating the gray-level gradient change rate and local density distribution, abnormal pixels in the edge region are screened out. Pixels with abnormal gray-level gradient changes are removed from the overall boundary structure to ensure the accuracy and continuity of the boundary. Gaussian smoothing is performed on the screened edge pixels to reduce local abrupt changes caused by noise. Finally, the boundary features of the optical calibration grid are formed, which will provide basic data support for subsequent geometric feature extraction.
[0074] S112: Based on the boundary features of the optical calibration grid, filter the boundary pixel distribution characteristics, set the threshold range, analyze the regional pixel distribution, determine the grid interval uniformity, remove abnormal pixel distribution, and obtain preliminary results of geometric distortion distribution.
[0075] First, grayscale distribution statistics are performed on each pixel region of the calibration grid. The mean and variance of grayscale values in each local region are calculated to measure the uniformity of pixels in the local region. The pixel uniformity index is compared with a preset threshold by setting a threshold standard. Pixel regions that do not meet the threshold standard are marked as abnormal regions. Then, the threshold of the marked abnormal regions is gradually reduced and re-detected to screen out mis-marked regions and correct them. During the process, the pixel distribution in the local region is optimized one by one. The overall uniformity of pixel distribution in the entire grid region is evaluated by a local uniformity measurement function. Abnormal pixel distribution regions are further eliminated. The quality of pixel distribution in the calibration grid is gradually optimized through a cyclic iterative process. Finally, the filtered pixel distribution characteristics are formed. The filtering results are used as the preliminary results of geometric distortion distribution to provide input data for subsequent optimization steps.
[0076] S113: Perform distortion optimization on the preliminary results of the geometric distortion distribution, calculate the deviation between the geometric error of the grid region and the expected standard, and apply the formula:
[0077]
[0078] Calculate the error correction amount for the grid region and generate a geometric distortion distribution map;
[0079] Among them, D opt G represents the error correction amount for the grid region. i G represents the geometric feature value of the i-th grid region. ref The eigenvalues representing the standard geometric mesh, w i The weight coefficients for each region are α, β, and γ, which are adjustment parameters, and n represents the total number of grid regions.
[0080] The advantage of the formula lies in the introduction of a weighting parameter w. i Adjusting parameters α, β, and γ can balance local and global errors during geometric error correction, reduce oversensitivity to local anomalies, and improve the smoothness and accuracy of geometric distortion distribution.
[0081] Parameter G i G is obtained through actual measurements of the grid area, such as measuring the grid spacing deviation. i =1.02;
[0082] Parameter G ref : By setting an ideal model using a standard calibration mesh, take G ref =1.00;
[0083] Parameter w i : Assign different weights based on the size of each grid region, such as w i =0.8;
[0084] Parameters α = 2, β = 0.5, γ = 1.5: obtained through parameter optimization experiments, reflecting the smoothing index of error correction and the degree of error influence;
[0085] Input parameter: D opt =0.8·|1.02-1.00| 2 ·(1+0.5·|1.02-1.00|) 1.5 ;
[0086] Step-by-step calculation:
[0087] Absolute value of error: |1.02 - 1.00| = 0.02;
[0088] Squared error: 0.02 2 =0.0004;
[0089] Adjustment item: 1 + 0.5 * 0.02 = 1.01;
[0090] Index: 1.01 1.5 ≈1.015;
[0091] Combined calculation: D opt = 0.8·0.0004·1.015;
[0092] Final result: D opt ≈0.0003248;
[0093] This result indicates that the calculated D opt This represents the error correction amount for each grid region. By optimizing the smoothing weights and adjustment coefficients, the error fluctuation of geometric distortion is reduced, making the generated geometric distortion distribution map more accurate and providing optimized results for the medical equipment calibration process.
[0094] Please see Figure 3 The specific steps for obtaining the distortion-compensated image are as follows:
[0095] S211: Based on the geometric distortion distribution map, extract the coordinate offset of each pixel, read the original coordinates and offset coordinates of the pixels in the image, and perform statistical and partitioning processing on the pixel offset features and image spatial positions to obtain the pixel offset mapping relationship.
[0096] First, the original coordinate information of the image is read using an image acquisition device, and the coordinates of each pixel are compared with those after offset to calculate the coordinate offset. This offset indicates the difference between the actual coordinates and theoretical coordinates of each pixel in the image after distortion. To ensure the accuracy of distortion correction, multiple regions in the image are selected for detailed analysis. The pixels in each region are statistically analyzed based on their offset and spatial position in the image (e.g., relative position from the center point). Through the aggregation analysis of coordinate data, the offset pattern of each pixel is obtained. Using this pattern, the differences in offset characteristics at different spatial positions (e.g., image center, edge, etc.) can be identified. The statistical results of offset characteristics in different regions of the image can help define a partitioning scheme. The image space is divided into multiple small blocks, each with relatively consistent distortion characteristics. Therefore, regional correction can improve the overall compensation accuracy and obtain the pixel offset mapping relationship, which can reflect the distortion correction requirements of each pixel.
[0097] S212: Based on the pixel offset mapping relationship, the calibration target area is divided into multiple small areas, the offset data of the pixels in the area is extracted, the offset within the area is adjusted, the connection characteristics are uniformly corrected according to the coordinate changes of the area boundary, and the area position adjustment parameters are obtained.
[0098] After obtaining the pixel offset mapping relationship, the calibration target area in the image is further divided into multiple small regions. Each small region is analyzed based on the coordinate offset information provided by the pixel offset mapping relationship. The pixel offset of each small region is extracted and further adjusted. Within the region, the adjustment of the offset is mainly based on the relative positional relationship between local pixels. For example, by processing the difference in coordinates of adjacent pixels within a local region, its offset trend is calculated and reasonably adjusted to ensure that the distortion within the region can be accurately corrected at the pixel level. By analyzing the boundary coordinate changes between each small region and adjacent regions, and considering the differences in connectivity characteristics at the boundary, a unified correction is made. The pixel position adjustment of the boundary region needs to be combined with the coordinate changes of the adjacent region for a smooth transition to avoid obvious image distortion or aberration in the transition region. After completing the correction of each region, the region position adjustment parameters are obtained to describe the calibration requirements of each region and are saved for use in the subsequent compensation process. The adjustment parameters can provide regional correction according to the actual distortion situation, reduce the error when transitioning across regions, and improve the accuracy of the final image restoration.
[0099] S213: Based on the regional position adjustment parameters, the image is non-linearly compensated region by region. The pixel position of each partition is corrected by adjusting the pixel coordinates. The corrected pixel coordinates are remapped to the image space. The pixels replace the original image coordinates to generate a distortion-compensated image.
[0100] Nonlinear compensation is performed on the entire image region by region. Pixels within each region have their pixel coordinates corrected based on their position and corresponding adjustment parameters. By nonlinearly adjusting the pixel coordinates within each region, considering the spatial position of the pixels and the coordinate relationship with adjacent regions, accurate correction of distortion is ensured during the compensation process. This correction process is based on the distortion mapping relationship within the aforementioned regions. Specific adjustment parameters are applied to each region, and the correction amount for each pixel is calculated one by one, thereby adjusting its coordinates. Through this adjustment, the originally distorted pixels are moved to a new position, thus repairing the image distortion. The compensation process is not limited to local region adjustments but also involves the remapping of the entire image space, ensuring that there are no obvious discontinuities or image breaks at the boundaries between each region. After compensation, all corrected pixel coordinates are remapped back to the image space, and the original pixel coordinates are replaced by the corrected coordinates, forming a distortion-compensated image, which is the result of the original image after geometric distortion compensation. This effectively corrects spatial errors in the image, ensuring the image's realism and accuracy, and is suitable for the calibration and diagnosis of optical systems in medical equipment.
[0101] Please see Figure 4 The specific steps for obtaining the structural symmetry optimization results are as follows:
[0102] S221: Scan each pixel of the distortion-compensated image, identify the coordinate relationship of the pixels and analyze the gradient change between adjacent pixels, quantize the pixel gradient value, and generate the pixel gradient absolute value quantization result.
[0103] The algorithm iterates through the coordinates of each row of pixels in the image, extracting the grayscale value of each pixel sequentially. The extracted grayscale value is compared with the grayscale values of adjacent pixels, and the grayscale gradient change between adjacent pixels is calculated using a first-order difference method. Absolute value operations are used in the gradient calculation to ensure the difference is positive. The gradient values of each row of pixels are gradually accumulated and stored in a temporary array. The array data is sorted, and invalid or noisy data, such as single abnormal gradients or values exceeding a reasonable range, are removed. Finally, the valid pixel gradient values are re-integrated and summarized into a boundary gradient set. The gradient value is verified by the pixel coordinate association value to ensure a one-to-one mapping between each pixel gradient value and its corresponding coordinate point. The boundary position judgment function is called to verify the correctness of the image boundary pixel set, obtaining the gradient data and coordinate information associated with each boundary pixel, thus forming the pixel gradient absolute value quantization result.
[0104] S222: Based on the absolute value quantization result of pixel gradient, a pixel gradient threshold is set for judgment. By iterating through each boundary pixel, pixels that do not meet the threshold are removed, and the connection relationship of consecutive pixels is retained, using the formula:
[0105]
[0106] Generate the continuity results of the boundary connection structure;
[0107] Where C represents the continuity value of the boundary connection structure, A j and A j-1 These are the gradient values of the current pixel and its neighboring pixels, x and x', respectively. j y j and x j-1 y j-1 These are the coordinates of the pixel points, and m is the number of boundary pixels;
[0108] The advantage of the formula is that by using the ratio of the gradient value to the Euclidean distance of the coordinates, it can effectively identify the continuity of the boundary and eliminate boundary pixels with discontinuous structures, thereby further improving the accuracy of boundary structure extraction.
[0109] Given a boundary pixel m = 5, its gradient values A1 = 20, A2 = 30, A3 = 15, A4 = 25, A5 = 35, and coordinates (1, 1), (2, 1), (3, 1), (4, 2), (5, 2) respectively;
[0110] calculate:
[0111]
[0112]
[0113] Total: C = C1 + C2 + C3 + C4 = 10 + 15 + 7.07 + 10 ≈ 42.07;
[0114] The result shows that the boundary connectivity continuity value C = 42.07, which represents the overall continuity of the gradient of the boundary pixels. The higher the continuity value, the higher the integrity of the boundary structure. The calculation result can be used for subsequent contour processing optimization.
[0115] S223: Based on the continuity results of the boundary connection structure, extract the center of symmetry of the boundary contour, calculate the gradient value difference of the boundary pixels on both sides of the center of symmetry, perform symmetry matching, set the matching error threshold to filter the optimal symmetric boundary contour, and generate the structural symmetry optimization result.
[0116] First, a set of boundary pixel coordinates is selected. By calculating the maximum and minimum coordinate values in the boundary pixel set, the initial center of symmetry of the boundary contour is determined. The coordinates of the pixels on the left and right sides are matched using a coordinate symmetry algorithm. The symmetry matching error value is calculated point by point. The error value is quantified by the ratio of the gradient difference between two points to the coordinate offset. The error values of all matching points are calculated iteratively and an error matrix is established. The error values are compared with a preset threshold item by item. Asymmetric pixels with errors exceeding the threshold are eliminated. The center of symmetry of the boundary contour is refitted. The coordinates of the center of symmetry are iteratively optimized by the minimum error value. At the same time, the gradient values of the pixels in the boundary structure continuity result are used to assist in filtering the symmetry matching results. Finally, the boundary contour with the smallest error value and the most symmetrical structure is selected as the result, generating the structural symmetry optimization result.
[0117] Please see Figure 5 The specific steps for obtaining the region alignment result are as follows:
[0118] S311: Based on the structural symmetry optimization results, the image data of the optical calibration grid is called to extract the grid boundary curvature distribution parameters, perform segmented processing of the boundary curvature values, analyze the curvature change rate of each segment, calculate the curvature deviation value of adjacent regions, and obtain the curvature change region parameters.
[0119] First, image edge extraction is performed. The distribution of coordinate points of the edge contour is detected by gray-level gradient calculation to obtain an initial boundary dataset. The boundary curvature distribution parameters are called, and the coordinate values of all boundary points are interpolated to eliminate noise and subdivided into multiple grid segments. Then, the local curvature value of each grid segment is calculated using the second derivative formula to determine the continuity of the curvature value distribution. The piecewise curvature change rate of each boundary curvature value is calculated. By comparing the absolute values of the curvature change rates, the grid segment with the largest change rate is extracted, and the corresponding boundary coordinate points are marked as curvature change regions. The maximum curvature value and the index of the boundary region are recorded. At the same time, it is verified whether the data in this region meets the constraints of the image calibration boundary curvature distribution. Finally, the effective curvature change region parameters are extracted.
[0120] S312: Based on the parameters of the curvature variation region, analyze the deviation balance relationship between adjacent curvature regions using the following formula:
[0121]
[0122] Obtain curvature balance calibration parameters;
[0123] Among them, B r w represents the curvature balance calibration parameter. u The weighting factor k represents region u. u Let k be the curvature value of region u. maxHere, E is the smoothing adjustment coefficient, N represents the total number of regions, and k represents the curvature variation region parameter. u+1 This represents the curvature value of region u+1;
[0124] The advantage of the formula lies in introducing the parameter k, which represents the maximum curvature of the region. max and the balancing weight factor w u It can integrate the deviation relationship between regions and the local extreme value effect, effectively optimize the smoothness of the boundary, and ensure the balanced calibration of the curvature of the region;
[0125] Let the weighting factor w u =0.5, the curvature values of the regions are k1=3.5, k2=4.2, k3=5.1 respectively, and the maximum curvature value is k max =5.1, smoothing adjustment coefficient E=0.4, substitute the parameters into the formula:
[0126]
[0127] This result indicates that the curvature balance calibration parameter B r The curvature deviation between adjacent regions is effectively quantified. A lower curvature deviation indicates a better balance optimization result. This parameter is used for subsequent error correction and regional balance processing.
[0128] S313: Call the curvature balance calibration parameters to perform error correction on the curvature variation area in the optical calibration grid, analyze the difference between the corrected curvature parameters and the error threshold, determine whether the curvature error meets the threshold condition through iterative calculation, and obtain the area alignment result;
[0129] Based on the boundary coordinates and extracted curvature variation region parameters, the boundary of each region in the optical calibration grid is corrected point by point. First, the point set of the curvature variation region is locally reconstructed, and curvature smoothing is performed. By comparing the curvature distribution deviation of the point set before and after correction, the current curvature correction effect is judged. A threshold is used to evaluate the curvature error, and regions with curvature errors less than the threshold are selected as effective regions after correction. The regions are marked and adjacent regions are iteratively corrected. Through multiple loop calculations, the curvature error of the region is reduced, and finally the corrected boundary point set is obtained. The curvature distribution consistency is verified, and it is determined whether all curvature regions meet the error threshold. The overall balance calibration of the region is completed, and the region alignment result is output as the optical calibration data of the image boundary contour.
[0130] Please see Figure 6 The specific steps for obtaining the image structure correction results are as follows:
[0131] S321: Based on the region alignment results, extract the pixel coordinates and curvature values within the curvature change region, scan the coordinate data line by line and read the curvature values, sort and count the curvature values according to the coordinate order, set the curvature change range threshold boundary, divide the curvature values into multiple intervals, and obtain curvature segment statistics.
[0132] First, it's necessary to extract the pixel coordinates and corresponding curvature values of regions with curvature changes in the image. These regions are the distorted or warped parts of the image, and their curvature values vary significantly, affecting image accuracy and clarity. This is done by scanning each pixel line by line, sequentially reading the coordinates and curvature value of each pixel. The curvature value can be calculated by considering the spatial variations of the area surrounding the pixel, reflecting its curvature characteristics within a local region. To facilitate subsequent analysis, the curvature values are sorted according to their coordinates to ensure a clear display of curvature change trends. A threshold boundary for the curvature change range is set, and an appropriate range of curvature values is determined based on the degree of change in different regions of the image. This range distinguishes between relatively flat areas and areas with significant curvature variations. Dividing the curvature values into multiple intervals effectively identifies regions with significant curvature changes. Based on this interval information, curvature segmentation statistics are obtained, providing a basis for subsequent curvature deviation correction and coordinate adjustment.
[0133] S322: Based on curvature segmentation statistics, perform difference calculation on the coordinate data in each curvature interval, calculate the curvature difference between each coordinate point and its neighboring points, filter coordinate points whose curvature deviation exceeds the standard value, compare and correct the curvature deviation data with the standard curvature value, and obtain the corrected curvature distribution matrix.
[0134] For the coordinate data within each curvature interval, a difference operation is performed to calculate the curvature difference between each pixel and its neighboring pixels, thereby identifying areas with abnormal curvature changes. The key to the difference operation is to determine whether there is a significant curvature change at a point by comparing the curvature values of adjacent pixels. If the curvature values of adjacent pixels differ too much, it indicates that there is a large distortion or error at that point. The curvature difference between each pixel and its neighboring points is calculated and analyzed. By setting a standard curvature deviation value, coordinate points with differences exceeding the standard value are filtered out. Points exceeding the standard value are considered to have abnormal curvature changes and need to be corrected. The curvature deviation data is compared with the standard curvature value, and the corrected curvature value is obtained through compensation calculation. The correction process is based on an existing image correction model, adjusting curvature values with excessive deviations to ensure that the curvature changes of all coordinate points tend to be consistent. The corrected curvature data will generate a corrected curvature distribution matrix, reflecting the curvature change of each pixel in the image after correction. This matrix provides the basic data for image structure correction, ensuring that image distortion and curvature problems are effectively resolved.
[0135] S323: Based on the corrected curvature distribution matrix, traverse the coordinate points within the curvature change region, perform coordinate correction, remap the adjusted coordinates and curvature values back to the overall image structure data, merge the adjusted coordinate set and curvature change data, and generate the image structure correction result.
[0136] The process iterates through every coordinate point within the curvature variation region, performing coordinate correction. This correction relies on the previously calculated curvature values, aiming to adjust the coordinate position of each pixel based on its curvature variation characteristics. For each coordinate requiring correction, the corrected curvature information is used to calibrate its position, ensuring that its position in the image conforms to the geometric relationships of actual physical space. The adjusted coordinate values take into account the curvature changes of adjacent pixels, and local adjustments or smoothing are used to avoid unnatural transitions caused by over-correction. After all coordinate points are corrected, the adjusted coordinates and corresponding curvature values are remapped back to the overall image structure data, ensuring that all corrected points correctly reflect their spatial position and geometric relationships in the image, and that the geometric characteristics of each pixel are corrected to their optimal state, thereby repairing distortions in the image. All adjusted coordinate sets and curvature variation data are merged to form the image structure correction result. This correction result can serve as the basis for calibrating the optical system of medical equipment, ensuring the accuracy and high precision of the image, and providing clear and distortion-free image data in medical imaging, diagnosis, and other applications.
[0137] Please see Figure 7 The specific steps for obtaining the calibration scheme of the optimized optical system are as follows:
[0138] S411: Based on the image structure correction results, the amplitude distortion characteristic parameters of the optical calibration grid and the calibration target boundary data are called to analyze the deviation amplitude of the nonlinear deformation distribution. Through differential operation, the boundary region of the amplitude distortion distribution is located and the coordinates are marked to obtain the nonlinear deformation distribution data.
[0139] First, the boundary coordinate points are preprocessed by dividing the boundary point set into segments and groups according to the coordinate axes. Accumulated analysis is performed using the amplitude distortion characteristic parameters of each group of points. The amplitude distortion difference between adjacent coordinate points is then calculated and used as the initial criterion for nonlinear deviation. Subsequently, continuity judgment is performed on the coordinate points within each group to identify continuous point sets where amplitude distortion changes exceed a certain threshold. The boundary coordinates of these point sets are extracted, and the marked areas are identified as areas with significant nonlinear deformation distribution. Simultaneously, the coordinate points are correlated with the amplitude distortion characteristics to obtain nonlinear deformation distribution data, which is then validated a second time. By calculating the maximum and minimum values of the nonlinear deviation amplitude distribution, the accuracy of the amplitude deviation area is screened, ultimately determining the validity of the nonlinear deformation distribution data. The data results are then used in subsequent steps.
[0140] S412: Calls nonlinear deformation distribution data to perform morphological restoration on the located amplitude distortion areas. This is done through gradual correction based on amplitude distortion characteristics, nonlinear deviation, and boundary adjustment parameters, using the following formula:
[0141] R c =|d k ·p b +k a ·q b |
[0142] The amplitude distortion distribution and nonlinear deformation of the boundary region are repaired to obtain the morphological smoothing parameters after repair.
[0143] Where, d k p represents the magnitude of the nonlinear deviation. b For boundary adjustment weights, k a q is the amplitude distortion characteristic parameter. b To correct the adjustment factor, R c Indicates the smoothing parameters of the repaired boundary shape;
[0144] The advantage of the formula lies in its ability to utilize the nonlinear deviation d k Amplitude distortion characteristic parameter k a and boundary adjustment weight p b The joint operation effectively realizes the morphological restoration of the boundary region, and then quantifies the amplitude distortion and deformation of the edge region;
[0145] Let the nonlinear deviation amplitude d k =2.5, boundary adjustment weight p b =0.6, amplitude distortion characteristic parameter k a =3.8, adjustment factor q b =0.4, substitute the parameter into the formula to calculate:
[0146] R c =|2.5·0.6+3.8·0.4|
[0147] R c =|1.5+1.52|
[0148] R c =3.02
[0149] The results indicate that the morphological smoothing parameter R after repair is... c Indicates the boundary-adjusted weight p b and the correction adjustment factor q b The adjusted amplitude distortion repair result is used for subsequent edge region integrity verification and adjustment. The accuracy of edge repair is ensured by quantifying the morphological smoothing parameter.
[0150] S413: Call the repaired morphological smoothing parameters, analyze the impact of edge region morphological changes on the integrity of the calibration target boundary coordinate data, perform curvature smoothing and coordinate matching, analyze the overall curvature consistency of the boundary, judge the repair effect by comparing the integrity threshold, and generate the optimized optical system calibration scheme.
[0151] Edge curvature repair is performed based on the coordinate data of the calibration target boundary. By analyzing the deviation between the repaired edge coordinates and the original coordinate point set of the calibration target point by point, the curvature change between each point is calculated and compared with the curvature value of the original coordinate point point by point. The deviation curvature is filtered out, and the coordinate points of the region with large deviation are marked. Then, curvature smoothing is performed on the region, and the average curvature value of the adjacent coordinate points is calculated. By the inverse difference between the average curvature value and the deviation curvature, the curvature of the region is gradually adjusted to gradually converge to a smooth state. After iterative smoothing, the repaired curvature value is matched with the set smoothing threshold. By comparing the deviation between the repaired curvature value and the threshold, the boundary points that do not meet the smoothing conditions are further eliminated. Finally, the coordinate data of the boundary curvature after smoothing is obtained, the integrity analysis of the connection of the boundary coordinate points is completed, and the optimized optical system calibration scheme is generated.
[0152] The image processing-based medical device optical system calibration system is used to perform the above-described image processing-based medical device optical system calibration method. The system includes:
[0153] The image calibration module captures calibration images from medical devices, extracts the boundary pixel coordinates of the optical calibration grid, filters pixel data that conforms to the boundary distribution characteristics, calculates the spatial offset of the boundary pixels, analyzes the curvature variation range, and obtains a geometric distortion distribution map.
[0154] The distortion compensation module analyzes the pixel offset relationship of the calibration target region boundary based on the geometric distortion distribution map, filters nonlinear offset points in the region, performs partition compensation and rematches the region boundary connection, optimizes the spatial distribution of boundary pixels, and obtains the distortion compensation image.
[0155] The structure optimization module extracts the boundary contour parameters of the calibration grid based on the distortion compensation image, filters the curvature change region, analyzes the boundary pixel connection offset value, corrects the boundary geometric error region by region, reconstructs the region balance boundary connection relationship, verifies the continuity of curvature change, and obtains the contour structure optimization result.
[0156] Based on the contour structure optimization results, the contour correction module extracts the distribution parameters of the curvature of the calibration grid boundary, analyzes the geometric characteristics of the curvature offset region, filters the boundary regions whose curvature offset values exceed the threshold, calculates and corrects the global curvature offset relationship, matches the boundary contour continuous smoothing parameters, and obtains the image boundary correction results.
[0157] Based on the image boundary correction results, the edge optimization module extracts the boundary parameters of the optical calibration grid amplitude distortion, analyzes the diffraction offset characteristics of the nonlinear deformation region, filters the edge pixel curvature offset values, repairs the edge diffraction deformation characteristics region by region, smooths the boundary curvature of the region connection, optimizes the edge spatial connection characteristics, and obtains the optimized optical system calibration scheme.
[0158] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A calibration method for optical systems of medical devices based on image processing, characterized in that, Includes the following steps: By capturing calibration images from medical devices, analyzing the boundary structure of optical calibration grids, filtering the pixel distribution characteristics of segmentation boundaries, extracting geometric description features of calibration images, and generating a geometric distortion distribution map; Based on the geometric distortion distribution map, the geometric variation relationship of the pixel offset range is analyzed, the position is adjusted in combination with the connection characteristics of the calibration target area, nonlinear distortion is compensated in sections, a distortion compensation image is generated, the pixel connection relationship of the distortion compensation image is analyzed, the continuity of the boundary connection structure is checked, symmetry processing is performed on the boundary contour, and a structural symmetry optimization result is generated. Based on the structural symmetry optimization results, the image boundary contour features are analyzed, the curvature change region in the optical calibration grid is extracted, the connection balance is optimized region by region, the morphological error is corrected, the region alignment results are obtained, and the curvature change region in the region alignment results is globally corrected to generate the image structure correction results. Based on the image structure correction results, combined with the amplitude distortion characteristics of the optical calibration grid, the nonlinear deformation distribution of the calibration target boundary is analyzed, the diffraction deviation of the region connection is gradually repaired, the edge detail region is smoothed, the connection integrity of the region boundary is optimized, and the optimized optical system calibration scheme is generated. The specific steps for obtaining the region alignment result are as follows: Based on the structural symmetry optimization results, the image data of the optical calibration grid is called to extract the grid boundary curvature distribution parameters, perform segmented processing of the boundary curvature values, analyze the curvature change rate of each segment, calculate the curvature deviation value of adjacent regions, and obtain the curvature change region parameters. Based on the parameters of the curvature variation region, the deviation balance relationship between adjacent curvature regions is analyzed using the following formula: ; Obtain curvature balance calibration parameters; in, Indicates the curvature balance calibration parameters. Representative area Weighting factors For the region The curvature value, For parameters in the curvature variation region, It is a smoothing adjustment coefficient. Indicates the total number of regions. Indicates the region The curvature value; The curvature balance calibration parameters are called to correct the curvature variation region in the optical calibration grid. The difference between the corrected curvature parameters and the error threshold is analyzed. The curvature error is determined by iterative calculation to determine whether it meets the threshold condition, and the region alignment result is obtained.
2. The calibration method for medical device optical systems based on image processing according to claim 1, characterized in that, The specific steps for obtaining the geometric distortion distribution map are as follows: By capturing calibration images from medical devices, the boundary structure of the optical calibration grid is extracted, the edge pixel density is identified, gray values and gradient values are calculated, and Gaussian smoothing is performed to filter noise, thereby obtaining the boundary features of the optical calibration grid. Based on the boundary features of the optical calibration grid, the distribution characteristics of boundary pixels are screened, a threshold range is set, the pixel distribution in the region is analyzed, the uniformity of the grid interval is determined, abnormal pixel distributions are eliminated, and preliminary results of geometric distortion distribution are obtained. The preliminary results of the geometric distortion distribution are used for distortion optimization. The deviation between the geometric error of the grid region and the expected standard is calculated by applying the formula: ; Calculate the error correction amount for the grid region and generate a geometric distortion distribution map; in, The amount of error correction representing the grid area. Representing the Geometric feature values of each grid region Eigenvalues representing standard geometric meshes, Weighting coefficients for each region, To adjust the parameters, This indicates the total number of grid regions.
3. The calibration method for medical device optical systems based on image processing according to claim 2, characterized in that, The specific steps for obtaining the distortion-compensated image are as follows: Based on the geometric distortion distribution map, the coordinate offset of each pixel is extracted, the original coordinates and offset coordinates of the pixels in the image are read, and the offset features of the pixels are statistically and partitioned with the spatial position of the image to obtain the pixel offset mapping relationship. Based on the pixel offset mapping relationship, the calibration target area is divided into multiple small areas, the offset data of the pixels in the area is extracted, the offset within the area is adjusted, the connection characteristics are uniformly corrected according to the coordinate changes of the area boundary, and the area position adjustment parameters are obtained. Based on the region position adjustment parameters, the image is nonlinearly compensated region by region. The pixel position of each partition is corrected by adjusting the pixel coordinates. The corrected pixel coordinates are remapped to the image space. The pixels replace the original image coordinates to generate a distortion-compensated image.
4. The calibration method for medical device optical systems based on image processing according to claim 3, characterized in that, The specific steps for obtaining the structural symmetry optimization results are as follows: The pixels of the distortion-compensated image are scanned one by one to identify the coordinate relationship of the pixels and analyze the gradient change between adjacent pixels. The pixel gradient values are quantized to generate the pixel gradient absolute value quantization result. Based on the absolute value quantization result of the pixel gradient, a pixel gradient threshold is set for judgment. By iterating through each boundary pixel, pixels that do not meet the threshold are removed, while the connection relationship of consecutive pixels is retained, using the formula: ; Generate the continuity results of the boundary connection structure; in, This represents the continuity value of the boundary connection structure. and These are the gradient values of the current pixel and its neighboring pixels, respectively. and These are the coordinates of the pixel points. The number of boundary pixels; Based on the continuity result of the boundary connection structure, the center of symmetry of the boundary contour is extracted, the gradient value difference of the boundary pixels on both sides of the center of symmetry is calculated, and symmetry matching is performed. The optimal symmetric boundary contour is selected by setting the matching error threshold, and the structural symmetry optimization result is generated.
5. The calibration method for medical device optical systems based on image processing according to claim 1, characterized in that, The specific steps for obtaining the image structure correction results are as follows: Based on the region alignment results, the pixel coordinates and curvature values within the curvature change region are extracted, the coordinate data is scanned line by line and the curvature values are read, the curvature values are sorted and statistically analyzed according to the coordinate order, the curvature change range threshold boundary is set, the curvature values are divided into multiple intervals, and curvature segmentation statistics are obtained. Based on the curvature segmentation statistics, a difference operation is performed on the coordinate data within each curvature interval to calculate the curvature difference between each coordinate point and its neighboring points. Coordinate points whose curvature deviation exceeds the standard value are filtered out, and the curvature deviation data is compared and corrected with the standard curvature value to obtain the corrected curvature distribution matrix. Based on the corrected curvature distribution matrix, coordinate points within the curvature change region are traversed, coordinate correction is performed, and the adjusted coordinates and curvature values are remapped back to the overall image structure data. The adjusted coordinate set and curvature change data are merged to generate the image structure correction result.
6. The calibration method for an optical system of a medical device based on image processing according to claim 5, characterized in that, The specific steps for obtaining the optimized optical system calibration scheme are as follows: Based on the image structure correction results, the amplitude distortion characteristic parameters of the optical calibration grid and the calibration target boundary data are called to analyze the deviation amplitude of the nonlinear deformation distribution. Through differential operation, the boundary region of the amplitude distortion distribution is located and the coordinates are marked to obtain the nonlinear deformation distribution data. The nonlinear deformation distribution data is used to perform morphological restoration on the located amplitude distortion region. This is achieved through gradual correction based on amplitude distortion characteristics, nonlinear deviation, and boundary adjustment parameters, using the following formula: ; The amplitude distortion distribution and nonlinear deformation of the boundary region are repaired to obtain the morphological smoothing parameters after repair. in, Indicates the magnitude of nonlinear deviation. Adjust the weights for the boundary. These are the amplitude distortion characteristic parameters. To correct the adjustment factor, Indicates the smoothing parameters of the repaired boundary shape; The repaired morphological smoothing parameters are called to analyze the impact of edge region morphological changes on the integrity of the calibration target boundary coordinate data. Curvature smoothing and coordinate matching are performed to analyze the overall curvature consistency of the boundary. The repair effect is judged by comparing the integrity threshold, and an optimized optical system calibration scheme is generated.
7. A calibration system for medical device optical systems based on image processing, characterized in that, The calibration method for an image-processing-based optical system of a medical device according to any one of claims 1-6, wherein the system comprises: The image calibration module captures calibration images from medical devices, extracts the boundary pixel coordinates of the optical calibration grid, filters pixel data that conforms to the boundary distribution characteristics, calculates the spatial offset of the boundary pixels, analyzes the curvature variation range, and obtains a geometric distortion distribution map. Based on the geometric distortion distribution map, the distortion compensation module analyzes the pixel offset relationship of the target region boundary, filters nonlinear offset points in the region, performs partition compensation and re-matches the region boundary connection, optimizes the spatial distribution of boundary pixels, and obtains the distortion compensation image. Based on the distortion compensation image, the structure optimization module extracts the boundary contour parameters of the calibration grid, filters curvature change regions, analyzes the boundary pixel connection offset values, corrects the boundary geometric error region by region, reconstructs the regional balanced boundary connection relationship, verifies the continuity of curvature change, and obtains the contour structure optimization results. Based on the contour structure optimization results, the contour correction module extracts the distribution parameters of the curvature of the calibration grid boundary, analyzes the geometric characteristics of the curvature offset region, filters the boundary regions where the curvature offset value exceeds the threshold, calculates and corrects the global curvature offset relationship, matches the boundary contour continuous smoothing parameters, and obtains the image boundary correction results. Based on the image boundary correction results, the edge optimization module extracts the boundary parameters of optical calibration grid amplitude distortion, analyzes the diffraction offset characteristics of nonlinear deformation regions, filters edge pixel curvature offset values, repairs edge diffraction deformation characteristics region by region, smooths the curvature of region connection boundaries, optimizes edge spatial connection characteristics, and obtains the optimized optical system calibration scheme. The specific steps for obtaining the region alignment result are as follows: Based on the structural symmetry optimization results, the image data of the optical calibration grid is called to extract the grid boundary curvature distribution parameters, perform segmented processing of the boundary curvature values, analyze the curvature change rate of each segment, calculate the curvature deviation value of adjacent regions, and obtain the curvature change region parameters. Based on the parameters of the curvature variation region, the deviation balance relationship between adjacent curvature regions is analyzed using the following formula: ; Obtain curvature balance calibration parameters; in, Indicates the curvature balance calibration parameters. Representative area Weighting factors For the region The curvature value, For parameters in the curvature variation region, It is a smoothing adjustment coefficient. Indicates the total number of regions. Indicates the region The curvature value; The curvature balance calibration parameters are called to correct the curvature variation region in the optical calibration grid. The difference between the corrected curvature parameters and the error threshold is analyzed. The curvature error is determined by iterative calculation to determine whether it meets the threshold condition, and the region alignment result is obtained.
Citation Information
Patent Citations
Apparatus and method for the detection of the focused position of an optical system, and ophthalmological treatment apparatus
CN101389296A
Image processing method for straightening tubular object based on gravitational field model
CN101615299A