Medical equipment optical system calibration method and system based on image processing
By analyzing the geometric distortion distribution of the calibration image in the optical system calibration of medical equipment, partitioning compensates for nonlinear distortion and optimizing the image boundary structure, the problem of ignoring local distortion in the prior art is solved, and the image quality and reliability of medical equipment are significantly improved.
Patent Information
- Application Number
- CN202411931528.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-26
AI Technical Summary
The prior art ignores local distortion fine correction in the calibration of optical systems of medical equipment, resulting in nonlinear distortions in image boundaries and detail areas that cannot be effectively processed, affecting the accuracy of image analysis and diagnosis.
By capturing the calibration images of medical equipment, analyzing the boundary structure of the optical calibration grid, filtering the pixel distribution characteristics of the segmented boundary, extracting geometric description features, and generating geometric distortion distribution maps. Then, based on this distribution map, partition compensates for nonlinear distortion, optimizes the continuity of the image boundary structure, corrects the morphological errors region by region, and generates a tuned optical system calibration scheme.
Improve image quality, repair distortion in image detail areas, smooth edge details, enhance overall usability and consistency of images, and ensure the accuracy and reliability of medical equipment images.
Smart Images

Figure CN119887935A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image processing, and in particular to a method and system for calibrating an optical system of medical equipment based on image processing. Background Art
[0002] The field of medical image processing technology involves the use of image processing technology to improve the accuracy and efficiency of medical equipment 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 equipment, such as X-ray machines, CT scanners, ultrasound systems, etc., to improve image quality, reduce noise, extract key information and automate data analysis. Its core goal is to enhance the availability of image information and ensure that medical equipment can provide more accurate and clear data support during operation.
[0003] Among them, the medical equipment optical system calibration method is a technology based on image processing, which aims to ensure that the optical system in the medical device meets precise performance standards. This method ensures the imaging quality and measurement accuracy of the image acquisition device by precisely adjusting and correcting the optical components of the medical device. 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 analysis of image data. This method involves image calibration, geometric correction, illumination uniformity adjustment and other technologies, thereby improving the overall reliability and performance of the equipment.
[0004] Although the existing technology can adjust the imaging quality of the optical system of medical equipment through image calibration and geometric correction, its operation process is relatively general and single, relying on a global adjustment method and ignoring the detailed correction of local distortion. This approach cannot effectively deal with the nonlinear distortion of image boundaries and detail areas when facing complex geometric deformation and optical system distortion. For example, when performing image correction, it is impossible to accurately identify the distortion of local areas, resulting in obvious morphological errors or distortions in some image areas, affecting the accuracy of subsequent analysis and diagnosis. Traditional distortion compensation methods lack fine-tuning of different areas, making it difficult to avoid the loss and discontinuity of edge details in the image, ultimately affecting the reliability of medical imaging equipment in actual operation. The existing technology has failed to achieve comprehensive optimization of the optical system in actual applications, especially when dealing with complex and detailed image distortions, and lacks more accurate and localized correction methods. Summary of the invention
[0005] The purpose of the present invention is to solve the shortcomings existing in the prior art and to propose a medical equipment optical system calibration method and system based on image processing.
[0006] In order to achieve the above object, the present invention adopts the following technical solution: a medical equipment optical system calibration method based on image processing, comprising the following steps:
[0007] S1: By capturing the calibration image in the medical device, analyzing the boundary structure of the optical calibration grid, screening the pixel distribution characteristics of the segmentation boundary, extracting the geometric description features of the calibration image, and generating a geometric distortion distribution map;
[0008] S2: Based on the geometric distortion distribution map, the geometric change relationship of the pixel offset range is analyzed, the position is adjusted in combination with the connection characteristics of the calibration target area, the nonlinear distortion is compensated by partition, and 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, and the boundary contour is symmetric processed to generate a structural symmetry optimization result;
[0009] S3: Based on the structural symmetry optimization result, analyze the image boundary contour features, extract the curvature change area in the optical calibration grid, optimize the connection balance area by area, correct the morphological error, obtain the regional alignment result, perform global correction on the curvature change area in the regional alignment result, and generate the image structure correction result;
[0010] S4: Based on the image structure correction result and in combination 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 regional connection is gradually repaired, the edge detail area is morphologically smoothed, the connection integrity of the regional boundary is optimized, and the calibration scheme of the optical system after tuning is generated.
[0011] As a further solution of the present invention, the step of obtaining the geometric distortion distribution map is specifically:
[0012] S111: By capturing the calibration image in the medical device, extracting the boundary structure in the optical calibration grid, identifying the edge pixel density, calculating the grayscale value and the gradient value, and performing Gaussian smoothing to filter the noise, the boundary features of the optical calibration grid are obtained;
[0013] S112: Based on the boundary characteristics of the optical calibration grid, screening boundary pixel distribution characteristics, setting a threshold range, analyzing regional pixel distribution, determining grid interval uniformity, eliminating abnormal pixel distribution, and obtaining preliminary results of geometric distortion distribution;
[0014] S113: Optimize the geometric distortion distribution preliminary result, calculate the deviation of the geometric error of the grid area from the expected standard, and apply the formula:
[0015]
[0016] Calculate the error correction amount of the grid area and generate a geometric distortion distribution map;
[0017] Among them, D opt Represents the error correction amount of the grid area, G i represents the geometric eigenvalue of the i-th grid area, G ref represents the eigenvalue of the standard geometric mesh, w i is the weight coefficient of each area, α, β, γ are adjustment parameters, and n represents the total number of grid areas.
[0018] As a further solution of the present invention, the step of acquiring the distortion compensated image is specifically as follows:
[0019] S211: extracting the coordinate offset of each pixel point based on the geometric distortion distribution map, reading the original coordinates and offset coordinates of the pixel in the image, performing statistics and partitioning processing on the pixel offset features and the image space position, and obtaining a pixel offset mapping relationship;
[0020] S212: Based on the pixel offset mapping relationship, the calibration target area is divided into multiple small areas, the offset data of the regional pixels are extracted, the offset amount inside the area is adjusted, the connection characteristics are uniformly corrected according to the coordinate change of the regional boundary, and the regional position adjustment parameters are obtained;
[0021] S213: Based on the regional position adjustment parameters, nonlinear compensation is performed on the image region by region, the pixel position of each partition is corrected by the pixel coordinate adjustment amount, the corrected pixel coordinates are remapped to the image space, the pixels replace the original image coordinates, and a distortion compensated image is generated.
[0022] As a further solution of the present invention, the steps for obtaining the structural symmetry optimization result are specifically as follows:
[0023] S221: Scanning the pixels of the distortion-compensated image one by one, identifying the coordinate relationship of the pixels and analyzing the gradient changes between adjacent pixels, quantizing the pixel gradient values, and generating a pixel gradient absolute value quantization result;
[0024] S222: Based on the pixel gradient absolute value quantization result, a pixel gradient threshold is set for judgment, and each boundary pixel is traversed in a loop to remove pixels that do not meet the threshold, and the connection relationship between continuous pixels is retained, using the formula:
[0025]
[0026] Generate boundary connection structural continuity results;
[0027] Among them, C represents the continuity value of the boundary connection structure, A j and A j-1 are the gradient values of the current pixel and the adjacent pixel, x j ,yj and x j-1 ,y j-1 are the coordinate values of the pixel coordinate points, and m is the number of boundary pixels;
[0028] S223: Based on the continuity result of the boundary connection structure, the symmetry center of the boundary contour is extracted, the gradient value difference of the boundary pixel points on both sides of the symmetry center is calculated, and symmetry matching is performed. The matching error threshold is set to select the optimal symmetry boundary contour, and the structural symmetry optimization result is generated.
[0029] As a further solution of the present invention, the step of obtaining the region alignment result is specifically:
[0030] S311: Based on the structural symmetry optimization result, call the image data of the optical calibration grid, extract the grid boundary curvature distribution parameters, perform segmentation processing on the boundary curvature value, analyze the curvature change rate of each segment, calculate the curvature deviation value of the adjacent area, and obtain the curvature change area parameters;
[0031] S312: Based on the curvature change region parameters, the deviation balance relationship between adjacent curvature regions is analyzed, using the formula:
[0032]
[0033] Obtaining curvature balance calibration parameters;
[0034] Among them, B r represents the curvature balance calibration parameter, w u represents the weight factor of region u, k u is the curvature value of region u, k max is the curvature change area parameter, E is the smoothing adjustment coefficient, N represents the total number of areas, k u+1 Represents the curvature value of area u+1;
[0035] S313: calling the curvature balance calibration parameters, performing error correction on the curvature change area in the optical calibration grid, analyzing the difference between the corrected curvature parameters and the error threshold, determining whether the curvature error meets the threshold condition through iterative calculation, and obtaining the regional alignment result.
[0036] As a further solution of the present invention, the step of obtaining the image structure correction result is specifically:
[0037] S321: based on the regional alignment result, extracting the coordinates and curvature values of the pixel points in the curvature change region, scanning the coordinate data line by line and reading the curvature values, sorting and counting the curvature values in the coordinate order, setting the threshold boundary of the curvature change range, dividing the curvature values into multiple intervals, and obtaining curvature segmented statistical data;
[0038] S322: Based on the curvature segmented statistical data, perform difference operation on the coordinate data in each curvature interval, calculate the curvature difference between each coordinate point and the adjacent point, select the coordinate points whose curvature deviation exceeds the standard value, compare and correct the curvature deviation data with the standard curvature value, and obtain a corrected curvature distribution matrix;
[0039] S323: Based on the corrected curvature distribution matrix, traverse the coordinate points in the curvature change area, perform coordinate correction, remap the adjusted coordinates and curvature values back to the overall image structure data, merge the adjusted coordinate set and the curvature change data, and generate an image structure correction result.
[0040] As a further solution of the present invention, the steps for obtaining the calibration solution of the optical system after optimization are specifically as follows:
[0041] S411: Based on the image structure correction result, 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, and the boundary area of the amplitude distortion distribution is located and the coordinates are marked through differential operation to obtain the nonlinear deformation distribution data;
[0042] S412: calling the nonlinear deformation distribution data, performing morphological repair on the located amplitude distortion area, and gradually correcting it through amplitude distortion characteristics, nonlinear deviation and boundary adjustment parameters, using the formula:
[0043] R c =|d k ·p b +k a ·q b |
[0044] Repair the amplitude distortion distribution and nonlinear deformation of the boundary area to obtain the repaired morphological smoothing parameters;
[0045] Among them, d k Indicates the amplitude of nonlinear deviation, p b is the boundary adjustment weight, k a is the amplitude distortion characteristic parameter, q b is the correction adjustment coefficient, R c Indicates the smoothing parameters of the restored boundary morphology;
[0046] S413: Call the repaired morphological smoothing parameters, analyze the impact of the edge area morphological changes on the connection 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 connection integrity threshold, and generate a calibration plan for the optical system after tuning.
[0047] A medical device optical system calibration system based on image processing, wherein the medical device optical system calibration system based on image processing is used to perform the above-mentioned medical device optical system calibration method based on image processing, and the system comprises:
[0048] The image calibration module captures the calibration image in the medical device, extracts the boundary pixel coordinates of the optical calibration grid, selects the pixel data that meets the boundary distribution characteristics, calculates the spatial offset of the boundary pixel points, analyzes the curvature variation range, and obtains the geometric distortion distribution map;
[0049] The distortion compensation module analyzes the pixel offset relationship of the target area boundary based on the geometric distortion distribution map, screens the nonlinear offset points in the area, performs partition compensation and rematches the area boundary connection, optimizes the boundary pixel spatial distribution, and obtains the distortion compensated image;
[0050] The structural optimization module extracts the boundary contour parameters of the calibration grid based on the distortion compensation image, screens the curvature change area, analyzes the boundary pixel connection offset value, corrects the boundary geometric error region by region, reconstructs the regional balanced boundary connection relationship, verifies the continuity of the curvature change, and obtains the contour structure optimization result;
[0051] The contour correction module extracts the distribution parameters of the calibration grid boundary curvature based on the contour structure optimization result, analyzes the geometric characteristics of the curvature offset area, screens the boundary area whose 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 result;
[0052] Based on the image boundary correction result, the edge tuning module extracts the boundary parameters of the optical calibration grid amplitude distortion, analyzes the diffraction offset characteristics of the nonlinear deformation area, screens the edge pixel curvature offset value, repairs the edge diffraction deformation characteristics region by region, smoothes the regional connection boundary curvature, optimizes the edge space connection characteristics, and obtains the optical system calibration plan after tuning.
[0053] Compared with the prior art, the advantages and positive effects of the present invention are:
[0054] In the present invention, by accurately capturing the calibration image and analyzing the boundary structure of the optical calibration grid, the geometric distortion area in the calibration image is effectively identified and screened, so as to extract more detailed geometric description features, which not only improves the accuracy of distortion compensation image generation, but also further optimizes the image quality of each area by partitioning compensation for nonlinear distortion. By local adjustment and combining the analysis of pixel connection relationship, the coherence of the image boundary structure is improved, and the morphological error problem caused by the distortion of the optical system is solved. By optimizing the structural symmetry and curvature change area, the distortion of the image in the detail area is repaired, the edge details are further smoothed, and the overall image quality and usability are improved. The amplitude distortion characteristics of the optical calibration grid are also effectively controlled, and the morphological distortion of the edge details is further reduced. The integrity and consistency of the image are ensured, while ensuring the imaging accuracy of the medical equipment, the influence of nonlinear distortion and morphological error is effectively solved, and the reliability and performance of the optical system are significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a schematic diagram of the workflow of the present invention;
[0056] Figure 2 It is a flow chart of the geometric distortion distribution diagram in the present invention;
[0057] Figure 3 This is a flow chart of the distortion compensation image in the present invention;
[0058] Figure 4 It is a flow chart of the structural symmetry optimization results in the present invention;
[0059] Figure 5 A flow chart of the regional alignment results in the present invention;
[0060] Figure 6 A flowchart of the image structure correction result in the present invention;
[0061] Figure 7 Flow chart of the calibration scheme of the optical system after optimization in the present invention. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0063] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.
[0064] Embodiment 1
[0065] See also Figure 1 The present invention provides a technical solution: a medical equipment optical system calibration method based on image processing, comprising the following steps:
[0066] S1: By capturing the calibration image in the medical device, analyzing the boundary structure of the optical calibration grid, screening the pixel distribution characteristics of the segmentation boundary, extracting the geometric description features of the calibration image, and generating a geometric distortion distribution map;
[0067] S2: Based on the geometric distortion distribution map, the geometric change relationship of the pixel offset range is analyzed, the position is adjusted in combination with the connection characteristics of the calibration target area, the nonlinear distortion is compensated by partitioning, and the 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, and the boundary contour is symmetric processed to generate the structural symmetry optimization result;
[0068] S3: Based on the structural symmetry optimization results, analyze the image boundary contour features, extract the curvature change area in the optical calibration grid, optimize the connection balance region by region, correct the morphological error, obtain the regional alignment result, perform global correction on the curvature change area in the regional 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, the nonlinear deformation distribution of the calibration target boundary is analyzed, the diffraction deviation of the regional connection is gradually repaired, the edge detail area is morphologically smoothed, the connection integrity of the regional boundary is optimized, and the calibration scheme of the optical system after tuning is generated.
[0070] The geometric distortion distribution map includes boundary curvature characteristics, pixel offset parameters, and regional morphological description values. The distortion compensation image includes position adjustment image, nonlinear compensation distribution, and pixel connection partition value. The structural symmetry optimization results include boundary contour adjustment characteristics, pixel symmetry distribution values, and connection continuity verification map. The regional alignment results include contour optimization values, curvature balance areas, and morphological matching features. The image structure correction results include global curvature correction values, boundary smoothing distribution, and morphological connection correction values. The calibration scheme of the optical system after optimization includes amplitude distortion repair parameters, regional connection integrity map, and edge smoothing optimization map.
[0071] See also Figure 2 , the specific steps for obtaining the geometric distortion distribution map are:
[0072] S111: By capturing the calibration image in the medical device, extracting the boundary structure in the optical calibration grid, identifying the edge pixel density, calculating the grayscale value and the gradient value, and performing Gaussian smoothing to filter the noise, the boundary features of the optical calibration grid are obtained;
[0073] To extract the area of the optical calibration grid in the image, the captured image is first preprocessed, including image denoising and contrast enhancement, to highlight the grid boundary structure. Then, the edge detection algorithm is used to extract the grid boundary contour, and the boundary pixels are statistically analyzed to extract the grayscale value, gradient value and pixel density distribution characteristics of each boundary pixel. Subsequently, the abnormal pixels in the edge area are screened by calculating the grayscale gradient change rate and the local density distribution. The pixels with abnormal grayscale gradient changes are removed from the overall boundary structure to ensure the accuracy and continuity of the boundary. The screened edge pixels are Gaussian smoothed to reduce local mutations 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 characteristics of the optical calibration grid, the boundary pixel distribution characteristics are screened, the threshold range is set, the regional pixel distribution is analyzed, the uniformity of the grid interval is determined, the abnormal pixel distribution is eliminated, and the preliminary results of the geometric distortion distribution are obtained;
[0075] Firstly, the grayscale distribution statistics of each pixel area of the calibration grid are performed, and the grayscale mean and variance value in each local area are calculated to measure the uniformity of the pixels in the local area. The pixel uniformity index is compared with the preset threshold by setting the threshold standard, and the pixel area that does not meet the threshold standard is marked as an abnormal area. Then, the marked abnormal area is re-detected with a gradually decreasing threshold to screen the mislabeled area and correct it. During the execution process, the pixel distribution in the local area is optimized one by one, and the overall uniformity of the pixel distribution in the entire grid area is evaluated by the local uniformity measurement function. The abnormal pixel distribution area is further eliminated, and the quality of the calibration grid pixel distribution is gradually optimized through a cyclic iterative process. Finally, the screened pixel distribution characteristics are formed, and the screening results are used as the preliminary results of the geometric distortion distribution to provide input data for subsequent optimization steps.
[0076] S113: Perform distortion optimization on the preliminary results of geometric distortion distribution, calculate the deviation of the geometric error of the mesh area from the expected standard, and apply the formula:
[0077]
[0078] Calculate the error correction amount of the grid area and generate a geometric distortion distribution map;
[0079] Among them, D opt Represents the error correction amount of the grid area, G i represents the geometric eigenvalue of the i-th grid area, G ref represents the eigenvalue of the standard geometric mesh, w i is the weight coefficient of each area, α, β, γ are adjustment parameters, and n represents the total number of grid areas;
[0080] The benefit of the formula is that by introducing the weight parameter w i ,Adjusting parameters α, β, and γ can balance local and global errors in the geometric error correction process, reduce excessive sensitivity to local anomalies, and improve the smoothness and accuracy of geometric distortion distribution;
[0081] Parameter G i :Acquired by actual measurement of the grid area, such as measuring the grid spacing deviation to obtain G i =1.02;
[0082] Parameter G ref :Through the ideal model setting of the standard calibration grid, take G ref =1.00;
[0083] Parameter w i :Assign different weights according to the size of each grid area, 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] Enter the 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] Square error: 0.02 2 =0.0004;
[0089] Adjustment: 1+0.5·0.02=1.01;
[0090] Index term: 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 shows that the calculated D opt The error correction amount of each grid area is represented. By optimizing the smoothing weight and adjustment coefficient, the error fluctuation of the geometric distortion is reduced, making the generated geometric distortion distribution map more accurate and providing optimized results for the medical equipment calibration process.
[0094] See also Figure 3 , the specific steps for obtaining the distortion compensation image are:
[0095] S211: extracting the coordinate offset of each pixel point based on the geometric distortion distribution map, reading the original coordinates and offset coordinates of the pixel in the image, performing statistics and partitioning processing on the pixel offset features and the image space position, and obtaining a pixel offset mapping relationship;
[0096] First, the original coordinate information of the image is read through the image acquisition device, and the coordinates of each pixel are compared with the offset, and the coordinate offset is calculated. This offset indicates the difference between the actual coordinates and the theoretical coordinates of each pixel in the image after distortion. To ensure the accuracy of distortion correction, multiple areas in the image are selected for detailed analysis. The pixels in each area are counted according to their offset and the spatial position of the image (for example, the relative position from the center point). The offset pattern of each pixel is obtained through the cluster analysis of the coordinate data. Using this pattern, the difference in offset features at different spatial positions (such as the center and edge of the image) can be identified. The statistical results of the offset features in different areas of the image can help define a partitioning scheme. The image space will be divided into multiple small blocks, and each small block has a relatively consistent distortion characteristic. Therefore, the overall compensation accuracy can be improved through regional correction, and the pixel offset mapping relationship is obtained, 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 regional pixels are extracted, the offset amount inside the area is adjusted, the connection characteristics are uniformly corrected according to the coordinate change of the regional boundary, and the regional 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 areas. Each small area is analyzed according to the coordinate offset information provided by the pixel offset mapping relationship, the pixel offset of each small area is extracted, and the pixel offset in the area is further adjusted. Within the area, the adjustment of the offset is mainly based on the relative position relationship between local pixels. For example, by processing the difference in coordinates of adjacent pixels in the local area, calculating its offset trend, and making reasonable adjustments, it is ensured that the distortion within the area can be accurately corrected at the pixel level. By analyzing the boundary coordinate changes between each small area and the adjacent area, a unified correction is made considering the difference in connection characteristics at the boundary. The pixel position adjustment of the boundary area needs to be combined with the coordinate changes of the adjacent area for smooth transition to avoid obvious image distortion or distortion in the transition area. After completing the correction of each area, the regional position adjustment parameters are obtained to describe the calibration requirements of each area, and the parameters are saved for use in the subsequent compensation process. The adjustment parameters can provide regional corrections according to the actual distortion situation, reduce errors during cross-region transitions, and improve the accuracy of the final image restoration.
[0099] S213: Based on the regional position adjustment parameter, nonlinear compensation is performed on the image region by region, the pixel position of each partition is corrected by 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 compensated image is generated;
[0100] The entire image is nonlinearly compensated region by region. The pixel coordinates of the pixels in each region are corrected according to their positions and corresponding adjustment parameters. By nonlinearly adjusting the pixel coordinates in each partition, the spatial position of the pixel and the coordinate relationship of the adjacent regions are taken into consideration to ensure that the distortion is accurately corrected during the compensation process. The correction process is based on the distortion mapping relationship in the aforementioned region. Specific adjustment parameters are applied in each region to calculate the correction amount of each pixel one by one, and then adjust its coordinates. Through the adjustment, the originally distorted pixel is moved to a new position, thereby repairing the distortion of the image. The compensation process is not limited to the adjustment of the local area, but also involves the remapping of the entire image space to ensure that there is no obvious discontinuity or image breakage at the boundary between each region. After the compensation is completed, all corrected pixel coordinates are remapped back to the image space, and the pixel coordinates of the original image are replaced by the corrected coordinates to form a distortion compensated image, that is, the result of the original image after geometric distortion compensation. It can effectively correct the spatial error in the image and ensure the authenticity and accuracy of the image. It is suitable for the calibration and diagnosis of the optical system of medical equipment.
[0101] See also Figure 4 , the specific steps for obtaining the structural symmetry optimization results are:
[0102] S221: Scanning the pixels of the distortion-compensated image one by one, identifying the coordinate relationship of the pixels and analyzing the gradient changes between adjacent pixels, quantizing the pixel gradient values, and generating a pixel gradient absolute value quantization result;
[0103] The coordinates of each row of pixels in the image are traversed row by row, the grayscale value of each pixel is extracted in turn, the obtained grayscale value is compared with the grayscale value of the adjacent pixel, the grayscale gradient change of the adjacent pixel is calculated by the first-order difference method, the gradient calculation uses absolute value operation to ensure the positive value of the difference, 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 noise data is deleted, such as a single abnormal gradient or a value beyond a reasonable range, and finally the valid pixel gradient values are reintegrated and summarized to form a boundary gradient set, which is checked by the pixel coordinate association value to ensure that each pixel gradient value has a one-to-one mapping relationship with its corresponding coordinate point, and the boundary position judgment function is called to verify the correctness of the image boundary pixel set, and the gradient data and coordinate information associated with each boundary pixel are obtained to form a pixel gradient absolute value quantization result.
[0104] S222: Based on the absolute value quantization result of the pixel gradient, a pixel gradient threshold is set for judgment, and each boundary pixel is traversed in a loop to remove pixels that do not meet the threshold, and the connection relationship between continuous pixels is retained. The formula is used:
[0105]
[0106] Generate boundary connection structural continuity results;
[0107] Among them, C represents the continuity value of the boundary connection structure, A j and A j-1 are the gradient values of the current pixel and the adjacent pixel, x j ,y j and x j-1 ,y j-1 are the coordinate values of the pixel coordinate points, and m is the number of boundary pixels;
[0108] The benefit of the formula is that by performing a ratio operation between the gradient value and the Euclidean distance of the coordinates, the continuity of the boundary can be effectively identified, and the boundary pixels with discontinuous structures can be eliminated, further improving the accuracy of boundary structure extraction;
[0109] Given a boundary pixel point m=5, its gradient values are A1=20, A2=30, A3=15, A4=25, A5=35, and their coordinates are (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 connection continuity value C = 42.07, which represents the overall continuity of the gradient of the boundary pixel points. The higher the continuity value, the higher the connection integrity of the boundary structure. The calculation result can be used in the subsequent optimization contour processing stage.
[0115] S223: based on the boundary connection structure continuity result, extract the symmetry center of the boundary contour, calculate the gradient value difference of the boundary pixel points on both sides of the symmetry center, perform symmetry matching, set the matching error threshold to select the optimal symmetry boundary contour, and generate the structural symmetry optimization result;
[0116] First, a set of boundary pixel coordinates is selected. The initial symmetry center of the boundary contour is determined by calculating the maximum and minimum coordinate values in the boundary pixel set. The coordinate symmetry algorithm is used to match the coordinates of the pixels on the left and right sides. The symmetric matching error value is calculated point by point. The error value is quantified by the ratio of the gradient difference between the two points to the coordinate offset. The error values of all matching points are calculated cyclically and an error matrix is established. The error values are compared with the preset thresholds one by one. Asymmetric pixels whose errors exceed the thresholds are eliminated, and the symmetry center of the boundary contour is refitted. The coordinates of the symmetry center are iteratively optimized through the minimum error value. At the same time, the gradient values of the pixels in the boundary structure continuity results are called to assist in screening the symmetric matching results. Finally, the boundary contour with the smallest error value and the most symmetrical structure is selected as the result to generate a structural symmetry optimization result.
[0117] See also Figure 5 , the specific steps for obtaining the regional alignment results are:
[0118] S311: Based on the structural symmetry optimization result, the image data of the optical calibration grid is called, the grid boundary curvature distribution parameters are extracted, the boundary curvature value is segmented, the curvature change rate of each segment is analyzed, the curvature deviation value of the adjacent area is calculated, and the curvature change area parameters are obtained;
[0119] First, the image edge is extracted, and the coordinate point distribution of the edge contour is detected by the grayscale gradient calculation method to obtain the initial boundary data set. 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-order derivative formula, and the continuity of the curvature value distribution is judged. The segmented curvature change rate of each segment of the boundary curvature value is calculated. By comparing the absolute value of the curvature change rate, the grid segment with the largest change rate is extracted, and the corresponding boundary coordinate point is marked as the curvature change area. The maximum curvature value and the boundary area index where it is located are recorded. At the same time, it is verified whether the data in this area meets the constraints of the image calibration boundary curvature distribution, and finally the effective curvature change area parameters are extracted.
[0120] S312: Based on the curvature change area parameters, the deviation balance relationship between adjacent curvature areas is analyzed, using the formula:
[0121]
[0122] Obtaining curvature balance calibration parameters;
[0123] Among them, B r represents the curvature balance calibration parameter, w u represents the weight factor of region u, k u is the curvature value of region u, k maxis the curvature change area parameter, E is the smoothing adjustment coefficient, N represents the total number of areas, k u+1 Represents the curvature value of area u+1;
[0124] The formula is beneficial because it introduces the regional curvature maximum parameter k max and the balance weight factor w u , 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 regional curvature;
[0125] Let the weight factor w u =0.5, the regional curvature values are k1=3.5, k2=4.2, k3=5.1, and the maximum curvature value k max =5.1, smoothing adjustment coefficient E=0.4, substitute the parameters into the formula:
[0126]
[0127] This result shows that the curvature balance calibration parameter B r The curvature deviation between adjacent regions is effectively quantified. A lower curvature value deviation indicates a better balance optimization result. This parameter is used for subsequent error correction and regional balance processing.
[0128] S313: calling the curvature balance calibration parameters, performing error correction on the curvature change area in the optical calibration grid, analyzing the difference between the corrected curvature parameters and the error threshold, determining whether the curvature error meets the threshold condition through iterative calculation, and obtaining the regional alignment result;
[0129] According to the boundary coordinate points and the extracted parameters of the curvature change area, the boundaries of each area in the optical calibration grid are corrected point by point. First, the point set of the curvature change area is locally reconstructed, and curvature smoothing is performed. The curvature distribution deviation of the point set before and after correction is compared to judge the current curvature correction effect. The curvature error is evaluated using a threshold, and the area with a curvature error less than the threshold is selected as the corrected valid area. The area is marked and the adjacent area is iteratively corrected. The regional curvature error is reduced through multiple cycles of calculation to finally obtain the corrected boundary point set, and the curvature distribution consistency verification is performed to determine whether all curvature areas meet the error threshold. The overall balance calibration of the area is completed, and the regional alignment result is output as the optical calibration data of the image boundary contour.
[0130] See also Figure 6 , the steps for obtaining the image structure correction results are as follows:
[0131] S321: based on the regional alignment result, extract the coordinates and curvature values of the pixel points in the curvature change area, scan the coordinate data line by line and read the curvature values, sort and count the curvature values in the coordinate order, set the threshold boundary of the curvature change range, divide the curvature values into multiple intervals, and obtain the curvature segmented statistical data;
[0132] First, it is necessary to extract the pixel coordinates and corresponding curvature values of the curvature change area in the image. The curvature change area is the part of the image that is distorted or twisted. The curvature value of the area varies greatly, which affects the accuracy and clarity of the image. By scanning the pixels of the area line by line, the coordinates and curvature values of each pixel are read in turn. The curvature value can be calculated by calculating the spatial change of the area around the pixel, reflecting the curvature characteristics of the point in the local area. In order to facilitate subsequent analysis, the read curvature values are sorted in coordinate order to ensure that the trend of curvature change can be clearly displayed. The threshold boundary of the curvature change range is set. According to the degree of change of different areas in the image, an appropriate curvature value range is determined to distinguish which areas are relatively flat areas and which areas are parts with large curvature changes. The curvature value is divided into multiple intervals, which can effectively identify the areas with more significant curvature changes in the image. Based on the interval information, the curvature segmentation statistics are obtained to provide a basis for subsequent curvature deviation correction and coordinate adjustment.
[0133] S322: Based on the curvature segmented statistical data, perform difference operation on the coordinate data in each curvature interval, calculate the curvature difference between each coordinate point and the adjacent point, select the 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 in each curvature interval, a difference operation is performed to calculate the curvature difference between each pixel and its adjacent pixels, so as to identify the area with abnormal curvature change. The key to the difference operation is to determine whether there is a significant curvature change at the point through 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 the point. The curvature difference between each pixel and its adjacent points is calculated and analyzed. By setting a standard curvature deviation value, the coordinate points whose difference exceeds the standard value are screened. The points exceeding the standard value are points with abnormal curvature change 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 the existing image correction model to adjust the curvature value that deviates too much 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, which reflects the curvature change of each pixel in the image after correction. The matrix provides basic data for the structural correction of the image to ensure that the distortion and curvature problems of the image are effectively solved.
[0135] S323: Based on the corrected curvature distribution matrix, traverse the coordinate points in the curvature change area, perform coordinate correction, remap the adjusted coordinates and curvature values back to the overall image structure data, merge the adjusted coordinate set and the curvature change data, and generate an image structure correction result;
[0136] Each coordinate point in the entire curvature change area is traversed to perform coordinate correction. The correction operation depends on the curvature value obtained by the above calculation. The purpose is to adjust the coordinate position of each pixel point according to the curvature change characteristics. For each coordinate that needs to be corrected, its position is corrected using the corrected curvature information to ensure that its position in the image conforms to the geometric relationship of the actual physical space. The adjusted coordinate value will take into account the curvature value change of adjacent pixel points, and avoid unnatural transition caused by over-correction through local adjustment or smoothing. After the correction of all coordinate points is completed, the adjusted coordinates and the corresponding curvature values are remapped back to the overall image structure data to ensure that all corrected points can correctly reflect their spatial positions and geometric relationships in the image, and ensure that the geometric characteristics of each pixel are corrected to the optimal state, thereby repairing the distortion in the image. All adjusted coordinate sets are merged with the curvature change data to form an image structure correction result, which can be used as the basic data for the calibration of the optical system of medical equipment to ensure the accuracy and high precision of the image and to ensure that clear and distortion-free image data is provided in medical imaging, diagnosis and other applications.
[0137] See also Figure 7 , the steps to obtain the calibration scheme of the optical system after optimization are as follows:
[0138] S411: Based on the image structure correction result, 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, and the boundary area of the amplitude distortion distribution is located and the coordinates are marked through differential operation to obtain the nonlinear deformation distribution data;
[0139] First, the boundary coordinate points are preprocessed, and the boundary point set is segmented and grouped according to the coordinate axis. The amplitude distortion characteristic parameters of each group of points are used for cumulative analysis, and the amplitude distortion difference of adjacent coordinate points is further calculated. This is used as the initial judgment basis for nonlinear deviation. Subsequently, continuity judgment is performed on the coordinate points in each group, and the continuous point set whose amplitude distortion change exceeds a certain threshold is identified. The boundary coordinates of the point set are extracted, and the marked area is a significant area of nonlinear deformation distribution. At the same time, the coordinate points are associated with the amplitude distortion characteristics to obtain nonlinear deformation distribution data, and a secondary verification is performed. By calculating the maximum and minimum values of the nonlinear deviation amplitude distribution, the accuracy of the amplitude deviation area is screened, and finally the validity of the nonlinear deformation distribution data is determined, and the data results are used for subsequent steps.
[0140] S412: Call the nonlinear deformation distribution data to perform morphological repair on the located amplitude distortion area, and gradually correct it through the amplitude distortion characteristics, nonlinear deviation and boundary adjustment parameters, using the formula:
[0141] R c =|d k ·p b +k a ·q b |
[0142] Repair the amplitude distortion distribution and nonlinear deformation of the boundary area to obtain the repaired morphological smoothing parameters;
[0143] Among them, d k Indicates the amplitude of nonlinear deviation, p b is the boundary adjustment weight, k a is the amplitude distortion characteristic parameter, q b is the correction adjustment coefficient, R c Indicates the smoothing parameters of the restored boundary morphology;
[0144] The benefit of the formula is that through the nonlinear deviation d k , amplitude distortion characteristic parameter k a and boundary adjustment weight p b The joint operation of can effectively realize the morphological restoration of the boundary area, and then quantify the amplitude distortion and deformation of the edge area;
[0145] Assume that the nonlinear deviation amplitude d k =2.5, boundary adjustment weight p b =0.6, amplitude distortion characteristic parameter k a =3.8, correction adjustment coefficient q b =0.4, substitute the parameters 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 show that the restored morphological smoothing parameter R c Represents the boundary-adjusted weight p b and the correction adjustment factor q b The adjusted amplitude distortion repair result is used for subsequent edge area integrity verification and adjustment, and the edge repair accuracy is ensured by quantizing the morphological smoothing parameters.
[0150] S413: calling the repaired morphological smoothing parameters, analyzing the influence of the edge area morphological changes on the connection integrity of the calibration target boundary coordinate data, performing curvature smoothing and coordinate matching, analyzing the overall curvature consistency of the boundary, judging the repair effect by comparing the connection integrity threshold, and generating the optical system calibration plan after tuning;
[0151] The edge curvature is repaired based on the coordinate data of the calibration target boundary. The deviation between the repaired edge coordinates and the original coordinate point set of the calibration target is analyzed 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 screened, and the coordinate points of the area with large deviation are marked. Then, curvature smoothing is performed on the area, and the average curvature value of adjacent coordinate points is calculated. The inverse difference between the average curvature value and the deviation curvature is gradually adjusted to make the regional curvature 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 after boundary curvature smoothing is obtained, the connection integrity analysis of the boundary coordinate points is completed, and the calibration plan of the optical system after tuning is generated.
[0152] The medical equipment optical system calibration system based on image processing is used to perform the above-mentioned medical equipment optical system calibration method based on image processing, and the system includes:
[0153] The image calibration module captures the calibration image in the medical device, extracts the boundary pixel coordinates of the optical calibration grid, selects the pixel data that meets the boundary distribution characteristics, calculates the spatial offset of the boundary pixel points, analyzes the curvature variation range, and obtains the geometric distortion distribution map;
[0154] The distortion compensation module analyzes the pixel offset relationship of the target area boundary based on the geometric distortion distribution map, screens the nonlinear offset points in the area, performs partition compensation and re-matches the area boundary connection, optimizes the boundary pixel spatial distribution, and obtains the distortion compensated image;
[0155] The structural optimization module extracts the boundary contour parameters of the calibration grid based on the distortion compensation image, screens the curvature change area, analyzes the boundary pixel connection offset value, 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 result;
[0156] The contour correction module extracts the distribution parameters of the calibration grid boundary curvature based on the contour structure optimization results, analyzes the geometric characteristics of the curvature offset area, screens the boundary area 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;
[0157] Based on the image boundary correction results, the edge tuning module extracts the boundary parameters of the optical calibration grid amplitude distortion, analyzes the diffraction offset characteristics of the nonlinear deformation area, screens the edge pixel curvature offset value, repairs the edge diffraction deformation characteristics region by region, smoothes the regional connection boundary curvature, optimizes the edge space connection characteristics, and obtains the calibration plan of the optical system after tuning.
[0158] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. A method for calibrating the optical system of a medical device based on image processing, characterized in that: The following steps are involved: By capturing the calibration image in the medical device, analyzing the boundary structure of the optical calibration grid, screening the pixel distribution characteristics of the segmentation boundary, extracting the geometric description features of the calibration image, and generating a geometric distortion distribution map; Based on the geometric distortion distribution map, the geometric change relationship of the pixel offset range is analyzed, the position is adjusted in combination with the connection characteristics of the calibration target area, the nonlinear distortion is compensated by partition, and 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, and the boundary contour is symmetric processed to generate a structural symmetry optimization result; Based on the structural symmetry optimization result, the image boundary contour features are analyzed, the curvature change area in the optical calibration grid is extracted, the connection balance is optimized region by region, the morphological error is corrected, the regional alignment result is obtained, and the curvature change area in the regional alignment result is globally corrected to generate the image structure correction result; Based on the image structure correction result and 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 regional connection is gradually repaired, the edge detail area is morphologically smoothed, the connection integrity of the regional boundary is optimized, and the calibration scheme of the optical system after tuning is generated.
2. The method for calibrating the optical system of medical equipment based on image processing according to claim 1, characterized in that: The steps for obtaining the geometric distortion distribution map are specifically as follows: By capturing the calibration image in the medical device, the boundary structure in the optical calibration grid is extracted, the edge pixel density is identified, the grayscale value and gradient value are calculated, and Gaussian smoothing is performed to filter the noise to obtain the boundary features of the optical calibration grid; Based on the boundary characteristics of the optical calibration grid, the boundary pixel distribution characteristics are screened, the threshold range is set, the regional pixel distribution is analyzed, the grid interval uniformity is determined, the abnormal pixel distribution is eliminated, and the preliminary results of the geometric distortion distribution are obtained; The preliminary results of the geometric distortion distribution are subjected to distortion optimization, and the deviation of the geometric error of the mesh area from the expected standard is calculated, applying the formula: Calculate the error correction amount of the grid area and generate a geometric distortion distribution map; Among them, D opt Represents the error correction amount of the grid area, G i represents the geometric eigenvalue of the i-th grid area, G ref represents the eigenvalue of the standard geometric mesh, w i is the weight coefficient of each area, α, β, γ are adjustment parameters, and n represents the total number of grid areas.
3. The method for calibrating the optical system of medical equipment based on image processing according to claim 2, characterized in that: The steps of obtaining the distortion-compensated image are specifically as follows: Based on the geometric distortion distribution map, the coordinate offset of each pixel point is extracted, the original coordinates and offset coordinates of the pixel in the image are read, and the offset features of the pixel and the image space position are statistically processed and partitioned to obtain a 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 regional pixels are extracted, the offset amount inside the area is adjusted, the connection characteristics are uniformly corrected according to the coordinate change of the regional boundary, and the regional position adjustment parameters are obtained; Based on the regional position adjustment parameters, the image is nonlinearly compensated region by region, the pixel position of each partition is corrected by the pixel coordinate adjustment amount, the corrected pixel coordinates are remapped to the image space, the pixels replace the original image coordinates, and a distortion compensated image is generated.
4. The method for calibrating the optical system of medical equipment based on image processing according to claim 3, characterized in that: The steps for obtaining the structural symmetry optimization result are specifically as follows: Scanning the pixels of the distortion-compensated image one by one, identifying the coordinate relationship of the pixels and analyzing the gradient changes between adjacent pixels, quantizing the pixel gradient values, and generating a 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, and each boundary pixel is traversed in a loop to remove pixels that do not meet the threshold, and the connection relationship between continuous pixels is retained. The formula is used: Generate boundary connection structural continuity results; Among them, C represents the continuity value of the boundary connection structure, A j and A j-1 are the gradient values of the current pixel and the adjacent pixel, x j ,y j and x j-1 ,y j-1 are the coordinate values of the pixel coordinate points, and m is the number of boundary pixels; Based on the continuity result of the boundary connection structure, the symmetry center of the boundary contour is extracted, the gradient value difference of the boundary pixel points on both sides of the symmetry center is calculated, and symmetry matching is performed. The matching error threshold is set to screen the optimal symmetry boundary contour and generate a structural symmetry optimization result.
5. The method for calibrating the optical system of medical equipment based on image processing according to claim 4, characterized in that: The steps for obtaining the region alignment result are specifically as follows: Based on the structural symmetry optimization result, the image data of the optical calibration grid is called, the grid boundary curvature distribution parameters are extracted, the boundary curvature value is segmented, the curvature change rate of each segment is analyzed, the curvature deviation value of the adjacent area is calculated, and the curvature change area parameters are obtained; Based on the curvature change area parameters, the deviation balance relationship between adjacent curvature areas is analyzed, and the formula is adopted: Obtaining curvature balance calibration parameters; Among them, B r represents the curvature balance calibration parameter, w u represents the weight factor of region u, k u is the curvature value of region u, k max is the curvature change area parameter, E is the smoothing adjustment coefficient, N represents the total number of areas, k u+1 Represents the curvature value of area u+1; The curvature balance calibration parameters are called to perform error correction on the curvature change area in the optical calibration grid, the difference between the corrected curvature parameters and the error threshold is analyzed, and whether the curvature error meets the threshold condition is determined through iterative calculation to obtain the regional alignment result.
6. The method for calibrating the optical system of medical equipment based on image processing according to claim 5, characterized in that: The steps for obtaining the image structure correction result are specifically as follows: Based on the regional alignment result, the coordinates and curvature values of the pixel points in the curvature change area are extracted, the coordinate data is scanned line by line and the curvature values are read, the curvature values are sorted and counted according to the coordinate order, the threshold boundary of the curvature change range is set, the curvature values are divided into multiple intervals, and the curvature segmented statistical data is obtained; Based on the curvature segmented statistical data, a difference operation is performed on the coordinate data in each curvature interval, the curvature difference between each coordinate point and the adjacent point is calculated, the coordinate points whose curvature deviation exceeds the standard value are screened, the curvature deviation data is compared and corrected with the standard curvature value, and a corrected curvature distribution matrix is obtained; Based on the corrected curvature distribution matrix, the coordinate points in the curvature change area are traversed, coordinate correction is performed, the adjusted coordinates and curvature values are remapped back to the overall image structure data, the adjusted coordinate set and the curvature change data are merged, and the image structure correction result is generated.
7. The method for calibrating the optical system of medical equipment based on image processing according to claim 6, characterized in that: The steps for obtaining the calibration scheme of the optical system after optimization are specifically as follows: Based on the image structure correction result, 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, and the boundary area of the amplitude distortion distribution is located and the coordinates are marked through differential operation to obtain the nonlinear deformation distribution data; The nonlinear deformation distribution data is called to perform morphological repair on the located amplitude distortion area, and the amplitude distortion characteristics, nonlinear deviation and boundary adjustment parameters are gradually corrected, using the formula: R c =|d k ·p b +k a ·q b | Repair the amplitude distortion distribution and nonlinear deformation of the boundary area to obtain the repaired morphological smoothing parameters; Among them, d k Indicates the amplitude of nonlinear deviation, p b is the boundary adjustment weight, k a is the amplitude distortion characteristic parameter, q b is the correction adjustment coefficient, R c Indicates the smoothing parameters of the restored boundary morphology; The repaired morphological smoothing parameters are called to analyze the influence of the morphological changes in the edge area on the connection 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 connection integrity threshold, and generate the optical system calibration plan after tuning.
8. A medical equipment optical system calibration system based on image processing, characterized in that: According to any one of claims 1 to 7, the method for calibrating the optical system of a medical device based on image processing comprises: The image calibration module captures the calibration image in the medical device, extracts the boundary pixel coordinates of the optical calibration grid, selects the pixel data that meets the boundary distribution characteristics, calculates the spatial offset of the boundary pixel points, analyzes the curvature variation range, and obtains the geometric distortion distribution map; The distortion compensation module analyzes the pixel offset relationship of the target area boundary based on the geometric distortion distribution map, screens the nonlinear offset points in the area, performs partition compensation and rematches the area boundary connection, optimizes the boundary pixel spatial distribution, and obtains the distortion compensated image; The structural optimization module extracts the boundary contour parameters of the calibration grid based on the distortion compensation image, screens the curvature change area, analyzes the boundary pixel connection offset value, corrects the boundary geometric error region by region, reconstructs the regional balanced boundary connection relationship, verifies the continuity of the curvature change, and obtains the contour structure optimization result; The contour correction module extracts the distribution parameters of the calibration grid boundary curvature based on the contour structure optimization result, analyzes the geometric characteristics of the curvature offset area, screens the boundary area whose 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 result; Based on the image boundary correction result, the edge tuning module extracts the boundary parameters of the optical calibration grid amplitude distortion, analyzes the diffraction offset characteristics of the nonlinear deformation area, screens the edge pixel curvature offset value, repairs the edge diffraction deformation characteristics region by region, smoothes the regional connection boundary curvature, optimizes the edge space connection characteristics, and obtains the optical system calibration plan after tuning.
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
Method and system for improved image segmentation
CN101969852A
Electrocardiogram image positioning comparison method based on photogrammetry
CN117745808A
Image acquisition system for pattern recognition and analysis
CN118644686A
Cited By
Geological structure fracture automatic identification and detection system based on deep learning
CN120198416A
AI-based lung perfusion evaluation system
CN120279019A
Self-adaptive segmentation method and system for lesion area of seminal vesicle endoscope image
CN120298272A
Method and system for marking glioma area in neuromedical image
CN120580224A
Engine oil colloid identification processing system and method based on hyperspectral imaging
CN120876373A