A confocal endoscope image correction parameter calculation method and related device

CN118365711BActive Publication Date: 2026-10-30BIOPSEE (SUZHOU) MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311601059.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-28
Publication Date
2026-10-30
Estimated Expiration
2043-11-28

AI Technical Summary

Technical Problem

相关技术中,缺少一种准确的校正参数计算方法

Benefits of technology

[0042]综上,本申请实施例的共聚焦内窥镜图像校正参数计算方法包括:对待计算数据集中的待计算图像数据进行二值化处理操作,以获取二值化图像集;对上述二值化图像集中的二值化图像数据进行形态封闭操作,以获取封闭图像集;在上述封闭图像集中的封闭图像中获取类椭形区域的高度信息、宽度信息和最边列信息;基于上述高度信息、宽度信息和最边列信息计算校正参数,其中,上述校正参数包括拉伸系数信息和中心列信息。本申请实施例提供的一种共聚焦内窥镜图像校正参数计算方法,通过二值化处理可以清晰地区分前景和背景,通过形态学封闭操作,可以改善图像中目标对象的完整性,在获取了清晰的二值化图像和封闭图像后,可以更有效率地进行像素级的操作。从封闭图像中获取高度信息、宽度信息和最边列信息计算出的校正参数调整图像扭曲,从而提升图像质量。二值化和封闭操作有助于降低图像的复杂度,减少噪声的影响,因此可以更容易地实施图像分析。上述方法可以自动化进行,减少了手动干预的需要,提高了整个图像处理流程的效率和可重复性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118365711B_ABST
    Figure CN118365711B_ABST
Patent Text Reader

Abstract

The application discloses a confocal endoscope image correction parameter calculation method and related equipment, and relates to the field of image processing. The method comprises the following steps: performing a binaryzation processing operation on image data to be calculated in a data set to be calculated, so as to obtain a binaryzation image set; performing a morphological closing operation on binaryzation image data in the binaryzation image set, so as to obtain a closed image set; obtaining height information, width information and most edge column information of an elliptical region in the closed image in the closed image set; and calculating correction parameters based on the height information, the width information and the most edge column information, wherein the correction parameters comprise stretching coefficient information and center column information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of image processing, and more specifically, this application relates to a method for calculating image correction parameters of a confocal endoscope and related equipment. Background Technology

[0002] A confocal endoscope is a medical device that can be inserted into the human body through channels such as gastroscopes and colonoscopes to obtain local histological images, enabling precise diagnosis of small lesions, gastrointestinal diseases, and early gastrointestinal cancers. The scanning control module of a confocal endoscope has two important components: a resonant mirror and a galvanometer mirror. The resonant mirror's function is to rapidly scan light in the horizontal direction (hence also called an X-ray mirror), while the galvanometer mirror's function is to scan light in the vertical direction (hence also called a Y-ray mirror). Together, they obtain a two-dimensional planar image.

[0003] The resonant mirror works by reciprocating along its axis at a certain angle, turning in the opposite direction when it reaches the edge of the scanning range. Furthermore, its angular velocity during scanning varies sinusoidally with spatial position. This sinusoidal angular velocity is slower at the edges and faster in the middle, resulting in overall distortion characterized by stretching at both ends and compression in the middle. Currently, there is a lack of an accurate method for calculating the correction parameters in related technologies. Summary of the Invention

[0004] The summary section introduces a series of simplified concepts, which will be further explained in detail in the detailed description section. This summary section is not intended to limit the key and essential technical features of the claimed technical solution, nor is it intended to determine the scope of protection of the claimed technical solution.

[0005] In a first aspect, this application proposes a method for calculating confocal endoscope image correction parameters, the method comprising:

[0006] The image data to be computed in the dataset to be computed is binarized to obtain a binary image set;

[0007] A morphological closure operation is performed on the binarized image data in the above binarized image set to obtain a closed image set;

[0008] In the closed images of the above closed image set, obtain the height, width, and outermost column information of the elliptical region;

[0009] The correction parameters are calculated based on the height, width, and outermost column information mentioned above. These correction parameters include the stretching coefficient information and the center column information.

[0010] Optionally, the above-described binarization operation on the image data to be computed in the dataset to be computed, to obtain a binarized image set, includes:

[0011] Obtain the pixel histogram information of the image data to be calculated in the above dataset, and calculate the initial binarization threshold based on the OTSU method;

[0012] For pixel histogram information that exceeds the initial binarization threshold, the target binarization threshold is calculated again based on the OTSU method.

[0013] Based on the aforementioned target binarization threshold, the image data to be calculated in the aforementioned dataset is binarized to obtain a binarized image set.

[0014] Optionally, the above-mentioned morphological closure operation on the binarized image data in the binarized image set to obtain a closed image set includes:

[0015] Determine the structuring elements from the binary image data in the aforementioned binary image set;

[0016] Based on the above structural elements, a dilation operation is performed on the above binarized image data to obtain enlarged image data of the target region.

[0017] Based on the above structural elements, an erosion operation is performed on the expanded image data of the target region to obtain a closed image;

[0018] The aforementioned closed image set is obtained based on the aforementioned closed image.

[0019] Optionally, the above calculation of correction parameters based on the height information, width information, and outermost column information includes:

[0020] The stretch coefficient information is calculated based on the height and width information described above.

[0021] Optionally, the above calculation of correction parameters based on the height information, width information, and outermost column information includes:

[0022] Calculate the information C in the center column above using the following formula:

[0023]

[0024] In the formula, C represents the coordinates of the geometric center point of the image, c0 represents the outermost column information, H1 represents the height information, W1 represents the width information, and f... sample f is the sampling frequency. scan Here, is the scanning frequency, and arcsin() is the arcsine function.

[0025] Optionally, the above method further includes:

[0026] Obtain the dataset to be processed;

[0027] Perform data denoising on the above dataset to obtain the above dataset to be calculated.

[0028] Optionally, the above method further includes:

[0029] Switch the confocal endoscope to preprocessing mode to obtain a preprocessed image set;

[0030] The preprocessed images in the above preprocessed image set are flipped to obtain the above dataset to be processed, so that all images in the above dataset to be processed have the same acquisition direction;

[0031] Obtain the alignment parameters from the alignment parameter module, align the dataset to be processed according to the alignment parameters, and obtain the dataset to be calculated.

[0032] Optionally, obtaining the alignment parameters from the alignment parameter module as described above includes:

[0033] In the above dataset to be processed, select one first dataset and two second datasets. Each data in the second dataset is adjacent to the data in the first dataset in the calculation dataset. The second data in different second datasets of the same order are concentrated on both sides of the first data in the first dataset in the calculation dataset.

[0034] The second dataset is offset based on the first dataset, and the alignment cost is calculated.

[0035] The target alignment parameters are determined based on the alignment cost mentioned above.

[0036] Secondly, this application also proposes a confocal endoscope image correction parameter calculation device, comprising:

[0037] The first acquisition unit is used to perform binarization processing on the image data to be calculated in the above-mentioned dataset to obtain a binary image set.

[0038] The second acquisition unit is used to perform a morphological closure operation on the binarized image data in the above-mentioned binarized image set to obtain a closed image set.

[0039] The third acquisition unit is used to acquire the height information, width information, and outermost column information of the elliptical region in the closed image of the above closed image set;

[0040] The calculation unit is used to calculate correction parameters based on the height information, width information and outermost column information mentioned above, wherein the correction parameters include stretching coefficient information and center column information.

[0041] Thirdly, an electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program stored in the memory to implement the steps of the confocal endoscope image correction parameter calculation method as described in any of the first aspects above.

[0042] In summary, the method for calculating confocal endoscope image correction parameters according to this application includes: performing binarization processing on the image data to be calculated in the dataset to obtain a binarized image set; performing a morphological closure operation on the binarized image data in the binarized image set to obtain a closed image set; obtaining the height information, width information, and outermost column information of the elliptical region in the closed image set; and calculating correction parameters based on the height information, width information, and outermost column information, wherein the correction parameters include stretching coefficient information and center column information. The method for calculating confocal endoscope image correction parameters provided by this application can clearly distinguish the foreground and background through binarization processing, and can improve the integrity of the target object in the image through morphological closure operation. After obtaining clear binarized and closed images, pixel-level operations can be performed more efficiently. The correction parameters calculated from the height information, width information, and outermost column information obtained from the closed image adjust image distortion, thereby improving image quality. Binarization and closure operations help reduce image complexity and the impact of noise, thus making image analysis easier to implement. The above methods can be automated, reducing the need for manual intervention and improving the efficiency and repeatability of the entire image processing workflow.

[0043] The method for calculating confocal endoscope image correction parameters proposed in this application, along with other advantages, objectives, and features of this application, will be partly apparent from the following description and partly understood by those skilled in the art through study and practice of this application. Attached Figure Description

[0044] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit this specification. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0045] Figure 1 A schematic flowchart of a method for calculating image correction parameters of a confocal endoscope provided in this application embodiment;

[0046] Figure 2 A schematic diagram of the spatial position of a resonant mirror during scanning, provided in an embodiment of this application;

[0047] Figure 3This application provides a schematic diagram illustrating the principle of reciprocating scanning sampling using a resonant mirror.

[0048] Figure 4 A schematic diagram illustrating the relationship between angular velocity and spatial position during resonant mirror scanning, provided as an embodiment of this application;

[0049] Figure 5 A schematic diagram of an image to be calculated provided in an embodiment of this application;

[0050] Figure 6 A schematic diagram of a binarized image provided in an embodiment of this application;

[0051] Figure 7 A schematic diagram of a closed image provided for an embodiment of this application;

[0052] Figure 8 A schematic diagram illustrating the principle of original image flipping provided in an embodiment of this application;

[0053] Figure 9 This is a schematic diagram of an original image after being flipped, provided as an embodiment of this application;

[0054] Figure 10 This is a schematic diagram illustrating an alignment scenario with different offset values, provided in an embodiment of this application.

[0055] Figure 11 A schematic diagram of the structure of a confocal endoscope image correction parameter calculation device provided in this application embodiment;

[0056] Figure 12 This is a schematic diagram of an electronic device for calculating confocal endoscope image correction parameters, provided as an embodiment of this application. Detailed Implementation

[0057] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus. The technical solutions of the embodiments of this application will now be clearly and completely described in conjunction with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.

[0058] Figure 2 This is a schematic diagram of the spatial position of the resonant mirror during scanning in related technologies; Figure 3 This is a schematic diagram illustrating the principle of reciprocating scanning sampling using a resonant mirror in related technologies. Figure 4 This is a schematic diagram illustrating the relationship between angular velocity and spatial position during resonant mirror scanning in related technologies. For example... Figures 2 to 4 As shown, the resonant mirror works by reciprocating along its axis at a certain angle, turning in the opposite direction when it reaches the edge of the scanning range. Furthermore, the angular velocity during scanning varies sinusoidally with the spatial position.

[0059] When using confocal endoscopy, sampling is generally performed at equal time intervals. Due to the reciprocating and sinusoidal characteristics of the resonant mirror during scanning, the original image obtained by sampling has the following problems: (1) The scanning directions of adjacent rows are out of phase; (2) Due to the high scanning speed, it is difficult to keep the scanning start points of adjacent rows consistent, resulting in displacement between adjacent rows; (3) The sinusoidal angular velocity during scanning is slow at the edges and fast in the middle, resulting in distortion with stretching at both ends and compression in the middle.

[0060] Phase inversion, shift, and distortion cause the acquired image to deviate from the actual shape of the object. Such images, if applied clinically, provide users with incorrect information, leading to inaccurate diagnoses, which is unacceptable. Therefore, confocal endoscopes must align shifts and correct distortions to eliminate problems caused by the resonant mirror scanning characteristics, providing users with accurate images that match the actual shape, and thus providing accurate diagnostic information for clinicians. To at least address some of the above problems, this application proposes a method for calculating confocal endoscope image correction parameters for image alignment.

[0061] Please see Figure 1 This is a schematic flowchart of a method for calculating confocal endoscope image correction parameters provided in an embodiment of this application, which specifically includes:

[0062] S110. Perform binarization processing on the image data to be calculated in the dataset to obtain a binarized image set;

[0063] For example, such as Figure 5 The diagram shown is a schematic representation of an image to be calculated according to an embodiment of this application. The dataset to be calculated is an image dataset intended for correction. The pixel values ​​in the image are simplified to two possible values, typically 0 and 1, to separate the foreground object and background, i.e., the effective image region and the ineffective image region, thereby forming a... Figure 6 The image shown is a binarized image. By selecting an appropriate threshold, pixel values ​​above the threshold are set to 1, typically representing the foreground, while those below the threshold are set to 0, representing the background.

[0064] S120. Perform a morphological closure operation on the binarized image data in the above binarized image set to obtain a closed image set;

[0065] For example, improving the continuity of objects in a binarized image involves filling in holes and breaks within objects to make boundaries clearer. First, a dilation operation is performed on the image to enlarge foreground objects; then, an erosion operation is performed to restore the original size of the objects while preserving the filling effect. This results in a closed image set, such as... Figure 7 The image shown is a closed image provided in this embodiment, in which the boundaries of the foreground objects are closed, without holes or breaks.

[0066] S130. Obtain the height, width, and outermost column information of the elliptical region from the closed images in the above closed image set;

[0067] For example, such as Figure 7 As shown, elliptical-shaped objects are extracted from a closed image, and their size information is obtained. The objects in the closed image are analyzed, their height and width are measured, and their positions in the image are determined, i.e., the edge column information. The collected height, width, and edge column information will be used for calculating correction parameters in subsequent steps.

[0068] S140. Calculate the correction parameters based on the above height information, width information and outermost column information, wherein the above correction parameters include stretching coefficient information and center column information.

[0069] For example, extracted size information is used to generate image correction parameters, including a stretching factor and image center column information. Based on the physical dimensions of the elliptical region and the pixel dimensions in the image, correction parameters, such as the stretching factor, are calculated using a mathematical model to correct scaling distortion in the image. The resulting stretching factor and center column information can then be used to adjust the entire image set to improve image quality.

[0070] In summary, the confocal endoscope image correction parameter calculation method provided in this application clearly distinguishes the foreground and background through binarization processing, and improves the integrity of the target object in the image through morphological closure operations. After obtaining clear binarized and closed images, pixel-level operations can be performed more efficiently. Correction parameters calculated from height, width, and outermost column information obtained from the closed image adjust image distortion, thereby improving image quality. Binarization and closure operations help reduce image complexity and the impact of noise, thus making image analysis easier to implement. The above method can be automated, reducing the need for manual intervention and improving the efficiency and repeatability of the entire image processing workflow.

[0071] In some examples, the above binarization operation on the image data to be computed in the dataset to be computed, in order to obtain a binary image set, includes:

[0072] Obtain the pixel histogram information of the image data to be calculated in the above dataset, and calculate the initial binarization threshold based on the OTSU method;

[0073] For pixel histogram information that exceeds the initial binarization threshold, the target binarization threshold is calculated again based on the OTSU method.

[0074] Based on the aforementioned target binarization threshold, the image data to be calculated in the aforementioned dataset is binarized to obtain a binarized image set.

[0075] For example, first, statistical calculations are performed on the dataset. For histograms of all pixel locations, the OTSU method is used to calculate the binarization threshold TH1; for pixel locations above TH1, a histogram is calculated, and the OTSU method is used to calculate the binarization threshold TH2. Binarization is performed using TH2 to obtain the binarized image set B.

[0076]

[0077] It should be noted that,

[0078] In summary, the confocal endoscope image correction parameter calculation method provided in this application, through a two-stage OTSU method, can more precisely process the foreground and background in the image, especially when there are regions with different brightness levels within the foreground. Traditional single thresholding may misclassify backgrounds with similar brightness as foreground or ignore details within the foreground. Two-stage threshold selection helps reduce this error. The OTSU algorithm does not require manual threshold setting, making the process fully automated, improving efficiency and repeatability. When the image brightness distribution is complex or the contrast between the foreground and background is low, two-stage OTSU can provide better segmentation results.

[0079] In some examples, the above-described morphological closure operation on the binarized image data in the binarized image set to obtain a closed image set includes:

[0080] Determine the structuring elements from the binary image data in the aforementioned binary image set;

[0081] Based on the above structural elements, a dilation operation is performed on the above binarized image data to obtain enlarged image data of the target region.

[0082] Based on the above structural elements, an erosion operation is performed on the expanded image data of the target region to obtain a closed image;

[0083] The aforementioned closed image set is obtained based on the aforementioned closed image.

[0084] For example, using morphological operations to improve a binarized image involves determining a structuring element and performing dilation and erosion operations. First, the structuring element, also called the kernel, is determined, defining the shape and size of the morphological operation. The structuring element is selected or designed based on the image features to be processed and the target task. It can be a square, a circle, or any matrix of a specific shape, its size matching the size of the features to be processed in the image. Next, a dilation operation is performed, which expands the foreground (white area) in the image, typically used to close small holes in foreground objects, increase object size, or connect adjacent objects. During dilation, the structuring element slides across the image; if the intersection of the structuring element and the foreground is not empty, the area covered by that structuring element is designated as foreground. The dilated image features are larger and more prominent than before. Then, an erosion operation is performed, which shrinks the foreground region in the image, typically used to remove small objects or break up adjacent objects. During erosion, the original position remains foreground only if the structuring element is completely contained within the foreground region; otherwise, it becomes background. The eroded image features are smaller than before but more accurately represent the original objects. Finally, a closed image set is obtained. Through morphological closing operations—dilation followed by erosion—the resulting closed images typically have smoother boundaries. Morphological closing is a combination of dilation and erosion operations; it helps fill in holes and small cracks inside objects while preserving their size and shape. The resulting closed image set retains the main features of the foreground objects while reducing noise and small discontinuities, providing cleaner data for subsequent image analysis steps.

[0085] The method provided in this embodiment can significantly improve image quality. Through morphological operations, it can ensure that important features in the image are preserved and highlighted, while removing unnecessary details and noise.

[0086] In some examples, the correction parameters are calculated based on the height, width, and outermost column information, including:

[0087] The stretch coefficient information is calculated based on the height and width information described above.

[0088] For example, the stretching factor information α can be calculated from the height information H1 and the width information W1, specifically according to the following formula:

[0089]

[0090] In some examples, the correction parameters are calculated based on the height, width, and outermost column information, including:

[0091] Calculate the information C in the center column above using the following formula:

[0092]

[0093] In the formula, C represents the coordinates of the geometric center point of the image, c0 represents the outermost column information, H1 represents the height information, W1 represents the width information, and f... sample f is the sampling frequency. scan Here, is the scanning frequency, and arcsin() is the arcsine function.

[0094] For example, by correcting parameter C, distortions that may be introduced during image scanning, such as bending of scan lines or deformation caused by non-linear scanning speed, can be corrected. The corrected image yields more accurate results during subsequent processing such as feature extraction and edge detection. This correction method is not limited to specific image types and is applicable to various image data acquired by scanning devices.

[0095] In some examples, the above method also includes:

[0096] Obtain the dataset to be processed;

[0097] Perform data denoising on the above dataset to obtain the above dataset to be calculated.

[0098] For example, the dataset to be processed is obtained by flipping the original images acquired by a confocal endoscope in preprocessing mode, and all images in the dataset have a uniform acquisition orientation. The dataset is then denoised to improve image quality and reduce errors. Methods such as median filtering, Gaussian filtering, or waveform thresholding can be used. The denoised dataset is called the computation dataset and is used for subsequent image processing and analysis.

[0099] In some examples, the above method also includes:

[0100] Switch the confocal endoscope to preprocessing mode to obtain a preprocessed image set;

[0101] The preprocessed images in the above preprocessed image set are flipped to obtain the above dataset to be processed, so that all images in the above dataset to be processed have the same acquisition direction;

[0102] Obtain the alignment parameters from the alignment parameter module, align the dataset to be processed according to the alignment parameters, and obtain the dataset to be calculated.

[0103] For example, image alignment can be performed before correcting the image data in the dataset to be computed. Let H be the row number of the raw image generated during confocal endoscopy scanning. The "row number" indicates which row of data it is located in. Each row contains N1 data elements, with indices from 0 to N1-1. The confocal endoscope images the fiber optic probe, putting the endoscope into preprocessing mode. Raw image data is continuously acquired to form a preprocessed image set. Since the resonant mirror scans reciprocally, the data directions of adjacent rows are opposite. All even-numbered rows are flipped so that their data direction aligns with that of the odd-numbered rows. The preprocessed images in the preprocessed image set are then flipped.

[0104] Let {A} be the data before and after a certain row is flipped. n} and {B n}, n=0,1,2,L,N-1, then we have B n =A N-1-n The physical meaning of flipping n = 0, 1, 2, ..., N-1 Figure 8 As shown, the flipped image is as follows Figure 9 As shown, all images in the dataset to be processed have the same acquisition direction.

[0105] The alignment parameter module stores alignment parameters, which can be offset values. Let {F} represent the values ​​before and after alignment for a row of data. n} and {G n}, n=0,1,2,L,N-1, offset value is a * Then there is

[0106]

[0107] or

[0108]

[0109] In some examples, obtaining alignment parameters from the alignment parameter module as described above includes:

[0110] In the above dataset to be processed, select one first dataset and two second datasets. Each data in the second dataset is adjacent to the data in the first dataset in the calculation dataset. The second data in different second datasets of the same order are concentrated on both sides of the first data in the first dataset in the calculation dataset.

[0111] The second dataset is offset based on the first dataset, and the alignment cost is calculated.

[0112] The target alignment parameters are determined based on the alignment cost mentioned above.

[0113] For example, select a first dataset and two second datasets from the dataset to be processed. Each data point in the second dataset is spatially adjacent to a data point in the first dataset, and data points of the same order in each second dataset are located on either side of a specific data point in the first dataset.

[0114] Using the first dataset as a baseline, the second dataset is offset to achieve optimal alignment. The similarity or difference between the datasets can be assessed by calculating the alignment cost, using methods such as cross-correlation and Euclidean distance. This alignment cost reflects the accuracy and effectiveness of the alignment.

[0115] Based on the calculated alignment cost, the optimal alignment parameters, such as offset, rotation angle, or scaling factor, are determined. The alignment parameters that minimize the differences between the first and second datasets are found to ensure optimal consistency and correspondence between the datasets. (Illustrations of different offset values ​​are provided.) Figure 10 The figures show the cases with offsets of -4, 0, and 3, respectively. `od` represents odd-numbered rows, and `ed` represents even-numbered rows. The numbers in the cells represent the indices of data elements within each row. Let `F` represent the rows before and after alignment. n} and {G n}, n=0,1,2,L,N-1, offset value is a * Then there is

[0116]

[0117] or

[0118]

[0119] Please see Figure 11 One embodiment of the confocal endoscope image correction parameter calculation device in this application may include:

[0120] The first acquisition unit 21 is used to perform binarization processing on the image data to be calculated in the above-mentioned dataset to obtain a binary image set.

[0121] The second acquisition unit 22 is used to perform a morphological closure operation on the binarized image data in the above-mentioned binarized image set to obtain a closed image set.

[0122] The third acquisition unit 23 is used to acquire the height information, width information and outermost column information of the elliptical region in the closed image of the above closed image set;

[0123] The calculation unit 24 is used to calculate correction parameters based on the height information, width information and outermost column information mentioned above, wherein the correction parameters include stretching coefficient information and center column information.

[0124] like Figure 12 As shown, this application embodiment also provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor. When the processor 320 executes the computer program 311, it implements the steps of any of the above-described methods for calculating confocal endoscope image correction parameters.

[0125] Since the electronic device described in this embodiment is the device used to implement the confocal endoscope image correction parameter calculation device in the embodiments of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the method described in the embodiments of this application. Therefore, how the electronic device implements the method in the embodiments of this application will not be described in detail here. Any device used by those skilled in the art to implement the method in the embodiments of this application is within the scope of protection of this application.

[0126] In practical implementation, when the computer program 311 is executed by the processor, it can achieve the following: Figure 1 Any of the corresponding implementation methods in the embodiments.

[0127] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0128] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0129] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0130] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0131] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0132] This application also provides a computer program product, which includes computer software instructions. When the computer software instructions are executed on a processing device, the processing device performs the confocal endoscope image correction parameter calculation process in the corresponding embodiment.

[0133] A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0134] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0135] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0136] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0137] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0138] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0139] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for calculating image correction parameters of a confocal endoscope, characterized in that, include: The image data to be computed in the dataset to be computed is binarized to obtain a binary image set; A morphological closure operation is performed on the binarized image data in the binarized image set to obtain a closed image set; In the closed image set, obtain the height information, width information, and outermost column information of the elliptical region; The correction parameters are calculated based on the height information, width information, and outermost column information, wherein the correction parameters include stretching coefficient information and center column information; The information of the center column is calculated according to the following formula: In the formula, C represents the center column information, c0 represents the outermost column information, H1 represents the height information, W1 represents the width information, and f represents the height information. sample f is the sampling frequency. scan Here, is the scanning frequency, and arcsin() is the arcsine function.

2. The method for calculating confocal endoscope image correction parameters according to claim 1, characterized in that, The binarization operation on the image data to be computed in the dataset to be computed, to obtain a binary image set, includes: Obtain the pixel histogram information of the image data to be calculated in the dataset to be calculated, and calculate the initial binarization threshold based on the OTSU method; For pixel histogram information that exceeds the initial binarization threshold, the target binarization threshold is calculated again based on the OTSU method; The image data to be calculated in the dataset to be calculated is binarized based on the target binarization threshold to obtain a binarized image set.

3. The method for calculating confocal endoscope image correction parameters according to claim 1, characterized in that, The step of performing a morphological closure operation on the binarized image data in the binarized image set to obtain a closed image set includes: Determine the structuring elements from the binary image data in the binary image set; Based on the structuring element, a dilation operation is performed on the binarized image data to obtain enlarged image data of the target region. Based on the structuring element, an erosion operation is performed on the expanded image data of the target region to obtain a closed image; The closed image set is obtained based on the closed image.

4. The method for calculating confocal endoscope image correction parameters according to claim 1, characterized in that, The calculation of correction parameters based on the height information, width information, and outermost column information includes: The stretch coefficient information is calculated based on the height information and the width information.

5. The method for calculating confocal endoscope image correction parameters according to claim 1 further includes: Obtain the dataset to be processed; Perform data denoising on the dataset to be processed to obtain the dataset to be computed.

6. The method for calculating confocal endoscope image correction parameters according to claim 5, characterized in that, Also includes: The confocal endoscope is switched to preprocessing mode to obtain a preprocessed image set; The preprocessed images in the preprocessed image set are flipped to obtain the dataset to be processed, so that all images in the dataset to be processed have the same acquisition direction; The alignment parameters are obtained from the alignment parameter module, and the dataset to be processed is aligned according to the alignment parameters to obtain the dataset to be calculated.

7. The method for calculating confocal endoscope image correction parameters according to claim 6, characterized in that, Obtaining the alignment parameters from the alignment parameter module includes: In the dataset to be processed, select a first dataset and two second datasets, wherein each data in the second dataset is adjacent to the data in the first dataset in the computational dataset, and the second data in the same order of different second datasets are clustered in the computational dataset on both sides of the first data in the first dataset. The second dataset is offset based on the first dataset, and the alignment cost is calculated. The target alignment parameters are determined based on the alignment cost.

8. A confocal endoscope image correction parameter calculation device, used to implement the method according to any one of claims 1 to 7, characterized in that, include: The first acquisition unit is used to perform binarization processing on the image data to be calculated in the dataset to be calculated, so as to obtain a binary image set. The second acquisition unit is used to perform a morphological closure operation on the binarized image data in the binarized image set to obtain a closed image set; The third acquisition unit is used to acquire the height information, width information, and outermost column information of the elliptical region in the closed image of the closed image set; The calculation unit is used to calculate correction parameters based on the height information, width information, and outermost column information, wherein the correction parameters include stretching coefficient information and center column information.

9. An electronic device, comprising: The memory and processor are characterized in that the processor is used to execute a computer program stored in the memory to implement the steps of the method for calculating confocal endoscope image correction parameters as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Binarization processing method and system of three-dimensional image

    CN107590814A

  • Probe type confocal endoscope field-of-view detection method

    CN117073982A