Industrial CT Scanning Data Standardization Method and Device
By acquiring the parameters of the CT scanning equipment and the actual dimensions represented by the pixel values, calculating the scaling factor and resampling, and performing sample contour segmentation, the problem of data inconsistency in industrial CT scanning is solved, and the accuracy and usability of image data are improved.
Patent Information
- Application Number
- CN202510941209.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-07-09
AI Technical Summary
Existing industrial CT scanning technology neglects factors such as differences in operator operation, environmental variables, material characteristics of the scanned sample, and deviations in sample placement, resulting in inconsistencies in CT scan image data and defects in localization, making it difficult to meet high-precision requirements.
By acquiring the voltage and current parameters of the CT scanning equipment, the scanning method, and the actual size represented by the pixel values, the scaling factor is calculated, and the sample contour is segmented using a bilinear interpolation algorithm to resample and construct standard industrial CT scan image data.
It effectively eliminates data differences caused by voltage, current, and pixel size factors among different CT scanning devices, improves the availability and accuracy of CT scan image data, and reduces dimensional measurement inaccuracies.
Smart Images

Figure CN120451319B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of CT scanning technology, and in particular to a method and apparatus for standardizing industrial CT scanning data. Background Technology
[0002] In the practice of industrial computed tomography (CT) data processing, there is a lack of understanding of the characteristics of the field. Key influencing factors such as differences in operator technique, environmental variables, the material properties of the scanned sample, and deviations in sample placement are often overlooked, leading to the simplistic use of CT scan images as a single input. This approach fails to meet the high-precision requirements of industrial applications. Furthermore, in actual operation, differences in voltage and current parameter settings among different CT scanning devices, as well as inconsistencies in pixel physical size calibration in the original CT scan images, pose significant challenges to data standardization. Moreover, the wide range of physical sizes of different objects detected by CT, from micrometer-level precision components to meter-level large structures, easily leads to problems such as defect location deviations and inaccurate dimensional measurements. Summary of the Invention
[0003] The present invention aims to at least partially solve one of the technical problems in the related art.
[0004] Therefore, the first objective of this invention is to propose a standardization method for industrial CT scan data, which effectively eliminates data differences caused by factors such as voltage, current, and pixel size of different CT scan devices, thereby improving the availability and accuracy of CT scan image data.
[0005] The second objective of this invention is to provide an industrial CT scan data standardization device.
[0006] The third objective of this invention is to provide an electronic device.
[0007] The fourth objective of this invention is to provide a non-transitory computer-readable storage medium storing computer instructions.
[0008] To achieve the above objectives, a first aspect of the present invention provides a method for standardizing industrial CT scan data, the method comprising:
[0009] Based on the scanned images of industrial samples after CT scanning, the voltage and current parameters of the CT scanning equipment, the parameters of the CT scanning equipment, the CT scanning mode, and the original actual size represented by a pixel value in the scanned image are obtained.
[0010] The scaling factor is calculated based on the original actual size represented by a pixel value in the scanned image and the pixel size in the scanned image.
[0011] Based on the scaling factor, the scanned image is resampled using a bilinear interpolation algorithm to obtain the actual size of the resampled image represented by a pixel value after resampling.
[0012] The scanned image is segmented to obtain a sample scan image of the industrial sample itself after sample contour segmentation.
[0013] The voltage and current parameters of the CT scanning device, the parameters of the CT scanning device, the CT scanning mode, the original actual size, the resampled actual size, and the sample scan image are used to construct standard industrial CT scan image data.
[0014] To achieve the above objectives, a second aspect of the present invention provides an industrial CT scan data standardization device, the device comprising:
[0015] The acquisition module is used to acquire the voltage and current parameters of the CT scanning device, the parameters of the CT scanning device, the CT scanning mode, and the original actual size represented by a pixel value in the scanned image based on the scanned image of the industrial test sample after CT scanning.
[0016] The calculation module is used to calculate the scaling factor based on the original actual size represented by a pixel value in the scanned image and the pixel size in the scanned image.
[0017] The resampling module is used to resample the scanned image based on the scaling factor using a bilinear interpolation algorithm to obtain the actual size of the resampled image represented by a pixel value after resampling.
[0018] The segmentation module is used to segment the scanned image to obtain a sample scan image of the industrial sample itself after sample contour segmentation.
[0019] The construction module is used to construct standard industrial CT scan image data from the voltage and current parameters of the CT scanning device, the CT scanning device parameters, the CT scanning mode, the original actual size, the resampled actual size, and the sample scan image.
[0020] To achieve the above objectives, a third aspect of the present invention provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.
[0021] To achieve the above objectives, a fourth aspect of the present invention provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method described in the first aspect.
[0022] The industrial CT scan data standardization method, apparatus, electronic device, and storage medium of this invention, based on the scanned image of an industrial test sample after CT scanning, acquires the voltage and current parameters of the corresponding CT scanning equipment, CT scanning equipment parameters, CT scanning mode, and the original actual size represented by a pixel value in the scanned image; based on the scaling factor calculated from the original actual size and pixel size, the scanned image is resampled to obtain the resampled actual size; a sample scan image of the industrial test sample itself after sample contour segmentation is acquired; and the voltage and current parameters of the CT scanning equipment, CT scanning equipment parameters, CT scanning mode, original actual size, resampled actual size, and sample scan image are constructed into standard industrial CT scan image data. This effectively eliminates data differences caused by voltage, current, and pixel size factors among different CT scanning equipment, improving the usability and accuracy of CT scan image data.
[0023] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0024] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0025] Figure 1 This is a flowchart illustrating an industrial CT scan data standardization method provided in an embodiment of the present invention.
[0026] Figure 2 This is a schematic diagram of the structure of an industrial CT scan data standardization device provided in an embodiment of the present invention. Detailed Implementation
[0027] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0028] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this invention all comply with the relevant provisions of relevant laws and regulations.
[0029] The industrial CT scan data standardization method and apparatus of the present invention are described below with reference to the accompanying drawings.
[0030] Figure 1 This is a flowchart illustrating an industrial CT scan data standardization method provided in an embodiment of the present invention.
[0031] like Figure 1 As shown, the method includes the following steps:
[0032] Step 101: Based on the scanned image of the industrial sample after CT scanning, obtain the voltage and current parameters of the CT scanning device corresponding to the scanned image, the parameters of the CT scanning device, the CT scanning mode, and the original actual size represented by a pixel value in the scanned image.
[0033] In some possible implementations, in the practice of industrial computed tomography (CT) data processing, by combining the voltage and current parameters of the CT scanning device corresponding to the scanned image, the parameters of the CT scanning device, the CT scanning method, and the original actual size represented by a pixel value in the scanned image, key influences such as differences in operation by experimental personnel, interference from environmental variables, material characteristics of the scanned sample, and deviations in sample placement are reduced, laying a solid foundation for the efficient application of large-scale industrial CT data models.
[0034] Step 102: Calculate the scaling factor based on the original actual size represented by a pixel value in the scanned image and the pixel size in the scanned image.
[0035] In some possible implementations, due to the large range of physical dimensions of different objects being detected, from micrometer-level precision components to meter-level large structures, a scaling factor can be used to accurately establish the correspondence between the original actual dimensions and pixel dimensions, reducing problems such as positioning deviations and inaccurate size measurements. Therefore, constructing a precise scale mapping system through a scaling factor ensures the accuracy and reliability of industrial CT scan data processing results.
[0036] Step 103: Based on the scaling factor, the scanned image is resampled using a bilinear interpolation algorithm to obtain the actual size of the resampled image represented by a pixel value after resampling.
[0037] In some possible implementations, based on a scaling factor, a bilinear interpolation algorithm is used to resample the scanned image to obtain the actual resampled size represented by a single pixel value after resampling, including: the corresponding continuous coordinates in the scanned image are... In the scanned image The coordinates of four adjacent pixels are , , , The corresponding pixel values are respectively , , , In this case, based on the scaling factor, a bilinear interpolation algorithm is used to resample the scanned image, resulting in the coordinates of the resampled scanned image as follows: The pixels; based on the coordinates in the resampled scanned image. The actual size of the resampled pixel is calculated based on the pixel value after resampling; the bilinear interpolation algorithm is as follows:
[0038] , , , , , .
[0039] In addition, linear or nonlinear quantization methods can be used to quantize resampled scan images to reduce the amount of data and unify the data bit depth, resulting in quantized formatted scan images that can be stored. Data quantization reduces the memory footprint of formatted scan images, improves the storage and processing efficiency of formatted scan images, and reduces the cost of formatted scan image processing.
[0040] Furthermore, when the grayscale value distribution in the resampled scanned image is greater than or equal to a set threshold (when the grayscale value distribution is concentrated), a linear quantization method is used to quantize the resampled scanned image to reduce the data volume and unify the data bit depth, resulting in a quantized formatted scanned image, which is then stored.
[0041] In a resampled scan image, the N-bit grayscale value is , range ( When N=16, M=65535), the quantized n-bit grayscale value is , range ( When n=8 and m=255, the linear mapping formula for linear quantization is: , This is for rounding operations to ensure quantification accuracy.
[0042] Furthermore, when the grayscale value distribution in the resampled scanned image is less than a set threshold, a nonlinear quantization method is used to quantize the resampled scanned image to reduce the data volume and unify the data bit depth, resulting in a quantized formatted scanned image, which is then stored. The nonlinear quantization method includes:
[0043] By statistically analyzing the histogram of the resampled scanned image, the probability density function of the gray values in the resampled scanned image is obtained as follows: ,pass Histogram equalization is performed to obtain the equalized grayscale values. The mapping relationship for histogram equalization is the cumulative distribution function (CDF), that is: .
[0044] The equalized N-bit grayscale value The formula for linear mapping to an n-bit range is:
[0045] .
[0046] The combined formulas yield the linear mapping formula for nonlinear quantization:
[0047] .
[0048] in, The data bit depth of the resampled scan image (e.g., 16 bits) ), To format the data bit depth of the scanned image (e.g., 8 bits), ), This is the floor function. This is a rounding function.
[0049] Step 104: Perform sample contour segmentation on the scanned image to obtain a sample scan image of the industrial sample itself after sample contour segmentation.
[0050] In some possible implementations, sample contour segmentation is performed on the scanned image to obtain a sample scanned image of the industrial test sample itself after sample contour segmentation. This includes: performing sample contour segmentation on the scanned image using a forward graph matching edge recognition method and a reverse graph matching edge recognition method to obtain a sample scanned image of the industrial test sample itself after sample contour segmentation. The reverse graph matching edge recognition method uses an edge detection algorithm or a deep learning method to reduce interference around the actual test sample (industrial test sample) and optimize the proportion of the scanned image to the entire image.
[0051] Furthermore, the scanned image is segmented using a forward graph matching edge recognition method to obtain a sample scanned image of the industrial test sample itself after sample contour segmentation. This includes: constructing standard templates T of different dimensions of the scanned image, wherein the standard templates include two-dimensional templates (size: , element is represented as ) and 3D templates (size: , element is represented as The process involves iterating through the two-dimensional scanned image D row by row and column by column using a sliding window, and then iterating through the three-dimensional scanned image D along the horizontal axis (x), vertical axis (y), and depth axis (z) using the sliding window. The calculation of the traversed two-dimensional scanned image (...) ) / 3D scan image ( The first similarity between the sample and each location in the 2D / 3D template is used to locate the region containing the edge of the industrial sample in the 2D / 3D scan image. ;according to Map the corresponding region R in the 2D / 3D scanned image, calculate the second similarity within R with each position in the 2D / 3D template; select regions with a second similarity greater than a set threshold. The second position with the highest similarity is used as the edge position of the industrial sample in the scanned image to perform sample contour segmentation, thereby obtaining the sample scan image of the industrial sample itself after sample contour segmentation. The forward graph matching edge recognition method makes full use of the known information during sample preparation and can more accurately identify the edge when the boundary of the sample is unclear, thus avoiding the limitations of traditional methods.
[0052] This involves calculating the first similarity between the traversed 2D / 3D scanned images and each location in the 2D / 3D template, and locating the regions in the 2D / 3D scanned images that contain the edges of the industrial sample under test. This includes: employing a multi-resolution analysis method to perform Gaussian pyramid decomposition on 2D / 3D scanned images to obtain image representations at different resolutions (2D and 3D); then calculating the first similarity between the traversed 2D / 3D scanned images and each location in the 2D / 3D template to determine the edge regions of the industrial sample being tested. .
[0053] Two-dimensional:
[0054] 3D:
[0055] Where s is the downsampling factor, and x, y, z are the low-resolution image coordinates.
[0056] Alternatively, the two-dimensional normalized cross-correlation (NCC) formula is:
[0057] .
[0058] The formula for the mean of a two-dimensional template is:
[0059] .
[0060] The formula for the mean value of a two-dimensional scanned image region is:
[0061] .
[0062] The formula for three-dimensional normalized cross-correlation (NCC) is:
[0063] .
[0064] The formula for the mean value of a 3D template is:
[0065] .
[0066] The formula for the mean value of a 3D scanned image region is:
[0067] .
[0068] Furthermore, the inverse graph matching edge recognition method can employ ordinary edge detection algorithms or deep learning methods, which are relatively computationally complex, and their accuracy depends on the algorithm architecture. It is suitable for edge detection of samples with unknown shapes or deformations. Through multi-resolution analysis, it significantly reduces the computational load of edge recognition, improves processing speed, and makes the processing of CT scan data more efficient. Specifically, the edge detection algorithms include:
[0069] 1. Feature extraction and edge candidate point detection: Use a multi-level edge detection algorithm (Canny operator) or a discrete differential operator for edge detection (Sobel operator) to calculate the gradient magnitude and direction.
[0070] The gradient calculation of the scanned image uses the Sobel operator: it calculates the gradients in the horizontal and vertical directions. , :
[0071] , .
[0072] Gradient magnitude and direction , :
[0073] , .
[0074] 2. Feature point enhancement: Non-maximum suppression and double thresholding are applied to refine edge candidate points.
[0075] Nonmaximum suppression:
[0076] , yes Local maximum value in the gradient direction, otherwise 0.
[0077] Dual threshold processing:
[0078] .
[0079] 3. Initial edge model construction: Based on the extracted edge candidate points, an initial edge model is constructed. Parametric representation: Parametric curves (such as B-splines, NURBS) or non-parametric representation (such as point sets) are used.
[0080] Parametric initial edge model B spline curve:
[0081] .
[0082] in, It is a k-th order B-spline basis function. It is a control point.
[0083] 4. Define the energy function, combining the scanned image gradient, smoothing constraints, and prior knowledge to define the energy function (snake model energy function):
[0084] .
[0085] in: It is B-spline curve parameterization. Controlling elasticity, Control rigidity, It is the image energy term, defined as a function of the gradient magnitude.
[0086] 5. Iterative optimization of the initial edge model: Minimize the energy function using the gradient descent algorithm, and update the parameters of the initial edge model based on the optimization results.
[0087] The gradient descent algorithm formula is:
[0088] .
[0089] in, t is the learning rate, and t is the number of iterations.
[0090] Step 105: Construct standard industrial CT scan image data by combining the voltage and current parameters of the CT scanning equipment, the parameters of the CT scanning equipment, the CT scanning mode, the original actual size, the resampled actual size, and the sample scan image.
[0091] Achieving a precise correspondence between actual size and pixel size reduces analytical errors in size effect studies, laying a solid foundation for efficient application in the era of large-scale industrial CT data models.
[0092] The industrial CT scan data standardization method of this invention, based on the scanned image of an industrial test sample after CT scanning, obtains the voltage and current parameters of the corresponding CT scanning equipment, CT scanning equipment parameters, CT scanning mode, and the original actual size represented by a pixel value in the scanned image; based on the scaling factor calculated from the original actual size and pixel size, the scanned image is resampled to obtain the resampled actual size; a sample scan image of the industrial test sample itself after sample contour segmentation is obtained; and the voltage and current parameters of the CT scanning equipment, CT scanning equipment parameters, CT scanning mode, original actual size, resampled actual size, and sample scan image are constructed into standard industrial CT scan image data. This effectively eliminates data differences caused by voltage, current, and pixel size factors among different CT scanning equipment, improving the usability and accuracy of CT scan image data.
[0093] To achieve the above embodiments, the present invention also proposes an industrial CT scan data standardization device.
[0094] Figure 2 This is a schematic diagram of the structure of an industrial CT scan data standardization device provided in an embodiment of the present invention.
[0095] like Figure 2 As shown, the industrial CT scan data standardization device 20 includes: an acquisition module 21, a calculation module 22, a resampling module 23, a segmentation module 24, and a construction module 25.
[0096] The acquisition module 21 is used to acquire the voltage and current parameters of the CT scanning device, the parameters of the CT scanning device, the CT scanning mode, and the original actual size represented by a pixel value in the scanned image based on the scanned image of the industrial test sample after CT scanning.
[0097] Calculation module 22 is used to calculate the scaling factor based on the original actual size represented by a pixel value in the scanned image and the pixel size in the scanned image;
[0098] The resampling module 23 is used to resample the scanned image based on the scaling factor using a bilinear interpolation algorithm to obtain the actual size of the resampled image represented by a pixel value after resampling.
[0099] The segmentation module 24 is used to perform sample contour segmentation on the scanned image to obtain a sample scan image of the industrial sample under test after sample contour segmentation.
[0100] The construction module 25 is used to construct standard industrial CT scan image data from the voltage and current parameters of the CT scanning device, the parameters of the CT scanning device, the CT scanning mode, the original actual size, the resampled actual size, and the sample scan image.
[0101] Furthermore, in one possible implementation of this embodiment of the invention, the resampling module 23 is specifically used for:
[0102] The corresponding continuous coordinates in the scanned image are In the scanned image The coordinates of four adjacent pixels are , , , The corresponding pixel values are respectively , , , In the case of the aforementioned scaling factor, a bilinear interpolation algorithm is used to resample the scanned image to obtain the coordinates in the resampled scanned image as follows: Pixels;
[0103] According to the coordinates in the resampled scanned image The pixels are used to calculate the actual size of the resampled image represented by a single pixel value after resampling.
[0104] The bilinear interpolation algorithm is as follows:
[0105] , , , , , .
[0106] Furthermore, in one possible implementation of this invention, the apparatus further includes:
[0107] The quantization storage module is used to quantize the resampled scan image using linear or nonlinear quantization methods to reduce the data volume and unify the data bit depth, thereby obtaining a quantized formatted scan image and storing it.
[0108] Furthermore, in one possible implementation of this invention, the quantization storage module is specifically used to quantize the resampled scan image using a linear quantization method when the grayscale value distribution in the resampled scan image is greater than or equal to a set threshold, so as to reduce the data volume and unify the data bit depth, obtain a quantized formatted scan image, and store it, wherein:
[0109] In a resampled scan image, the N-bit grayscale value is , range ( After quantization, the n-bit grayscale value is , range ( In the case of ), the linear mapping formula for linear quantization is: , This is for rounding operations.
[0110] Furthermore, in one possible implementation of this invention, the quantization storage module is further configured to, when the grayscale value distribution in the resampled scan image is less than a set threshold, quantize the resampled scan image using a nonlinear quantization method to reduce the data volume and unify the data bit depth, thereby obtaining a quantized formatted scan image and storing it. The nonlinear quantization method includes:
[0111] By statistically analyzing the histogram of the resampled scanned image, the probability density function of the gray values in the resampled scanned image is obtained as follows: ,pass Histogram equalization is performed to obtain the equalized grayscale values. The mapping relationship for histogram equalization is the cumulative distribution function, i.e.: ;
[0112] The equalized N-bit grayscale value The formula for linear mapping to an n-bit range is:
[0113] ;
[0114] The combined formulas yield the linear mapping formula for nonlinear quantization:
[0115] ;
[0116] in, Data bit depth of resampled scanned images To format the data bit depth of the scanned image, This is the floor function. This is a rounding function.
[0117] Furthermore, in one possible implementation of this embodiment of the invention, the segmentation module 24 is specifically used for:
[0118] The scanned image is segmented into a sample contour using both forward graph matching edge recognition and inverse graph matching edge recognition methods to obtain a sample scanned image of the industrial test sample itself after sample contour segmentation. The inverse graph matching edge recognition method employs an edge detection algorithm or a deep learning method.
[0119] Furthermore, in one possible implementation of this invention, the segmentation module 24 is further specifically used for:
[0120] Construct standard templates for scanned images in different dimensions, including two-dimensional and three-dimensional templates;
[0121] The two-dimensional scanned image is traversed row by row and column by column using a sliding window, and the three-dimensional scanned image is traversed along the horizontal axis, vertical axis and depth axis using a sliding window.
[0122] Calculate the first similarity between the traversed 2D / 3D scanned images and each location in the 2D / 3D template, and locate the regions in the 2D / 3D scanned images that contain the edges of the industrial sample under test. ;
[0123] according to Map the corresponding region R in the 2D / 3D scanned image, and calculate the second similarity between R and each position in the 2D / 3D template;
[0124] The position with the second similarity greater than the set threshold / the position with the highest second similarity is selected as the edge position of the industrial sample under test in the scanned image, so as to perform sample contour segmentation and obtain the sample scan image of the industrial sample under test itself after sample contour segmentation.
[0125] The industrial CT scan data standardization device of this invention, based on the scanned image of an industrial test sample after CT scanning, acquires the voltage and current parameters of the corresponding CT scanning equipment, CT scanning equipment parameters, CT scanning mode, and the original actual size represented by a pixel value in the scanned image; based on the scaling factor calculated from the original actual size and pixel size, the scanned image is resampled to obtain the resampled actual size; a sample scan image of the industrial test sample itself after sample contour segmentation is acquired; and the voltage and current parameters of the CT scanning equipment, CT scanning equipment parameters, CT scanning mode, original actual size, resampled actual size, and sample scan image are constructed into standard industrial CT scan image data. This effectively eliminates data differences caused by voltage, current, and pixel size factors among different CT scanning equipment, improving the usability and accuracy of CT scan image data.
[0126] To achieve the above embodiments, the present invention also proposes an electronic device, comprising:
[0127] At least one processor; and
[0128] A memory communicatively connected to the at least one processor; wherein,
[0129] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the aforementioned method.
[0130] To implement the above embodiments, the present invention also proposes a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the aforementioned method.
[0131] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0132] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0133] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0134] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0135] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0136] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it includes one or a combination of the steps of the method embodiments.
[0137] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0138] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for standardizing industrial CT scan data, characterized in that, The method includes: Based on the scanned images of industrial test samples after CT scanning, the voltage and current parameters of the CT scanning equipment, the parameters of the CT scanning equipment, the CT scanning mode, and the original actual size represented by a pixel value in the scanned image are obtained. The scaling factor is calculated based on the original actual size represented by a pixel value in the scanned image and the pixel size in the scanned image. Based on the scaling factor, the scanned image is resampled using a bilinear interpolation algorithm to obtain the actual size of the resampled image represented by a pixel value after resampling. The scanned image is segmented to obtain a sample scan image of the industrial sample itself after sample contour segmentation. The voltage and current parameters of the CT scanning device, the parameters of the CT scanning device, the CT scanning mode, the original actual size, the resampled actual size, and the sample scan image are used to construct standard industrial CT scan image data.
2. The method according to claim 1, characterized in that, The step of resampling the scanned image using a bilinear interpolation algorithm based on the scaling factor to obtain the actual resampled size represented by a single pixel value after resampling includes: The corresponding continuous coordinates in the scanned image are In the scanned image The coordinates of four adjacent pixels are , , , The corresponding pixel values are respectively , , , In the case of the aforementioned scaling factor, a bilinear interpolation algorithm is used to resample the scanned image to obtain the coordinates in the resampled scanned image as follows: Pixels; According to the coordinates in the resampled scanned image The pixels are used to calculate the actual size of the resampled image represented by a single pixel value after resampling. The bilinear interpolation algorithm is as follows: , , , , , 。 3. The method according to claim 2, characterized in that, The method further includes: The resampled scan image is quantized using linear or nonlinear quantization methods to reduce the amount of data and unify the data bit depth, resulting in a quantized formatted scan image, which is then stored.
4. The method according to claim 3, characterized in that, When the grayscale value distribution in the resampled scanned image is greater than or equal to a set threshold, the resampled scanned image is quantized using a linear quantization method to reduce the data volume and unify the data bit depth, resulting in a quantized formatted scanned image, which is then stored. In a resampled scan image, the N-bit grayscale value is , range ( After quantization, the n-bit grayscale value is , range ( In the case of ), the linear mapping formula for linear quantization is: , This is for rounding operations.
5. The method according to claim 4, characterized in that, When the grayscale value distribution in the resampled scanned image is less than a set threshold, a nonlinear quantization method is used to quantize the resampled scanned image to reduce the data volume and unify the data bit depth, resulting in a quantized formatted scanned image, which is then stored. The nonlinear quantization method includes: By statistically analyzing the histogram of the resampled scanned image, the probability density function of the gray values in the resampled scanned image is obtained as follows: ,pass Histogram equalization is performed to obtain the equalized grayscale values. The mapping relationship for histogram equalization is the cumulative distribution function, i.e.: ; The equalized N-bit grayscale value The formula for linear mapping to an n-bit range is: ; The combined formulas yield the linear mapping formula for nonlinear quantization: ; in, Data bit depth of resampled scan image To format the data bit depth of the scanned image, This is the floor function. This is a rounding function.
6. The method according to claim 1, characterized in that, The step of performing sample contour segmentation on the scanned image to obtain a sample scan image of the industrial sample itself after sample contour segmentation includes: The scanned image is segmented into a sample contour using both forward graph matching edge recognition and backward graph matching edge recognition methods to obtain a sample scan image of the industrial test sample itself after sample contour segmentation. The backward graph matching edge recognition method employs an edge detection algorithm or a deep learning method.
7. The method according to claim 6, characterized in that, The scanned image is segmented using a forward graph matching edge recognition method to obtain a sample scan image of the industrial sample itself after sample contour segmentation, including: Construct standard templates for scanned images in different dimensions, including two-dimensional and three-dimensional templates; The two-dimensional scanned image is traversed row by row and column by column using a sliding window, and the three-dimensional scanned image is traversed along the horizontal axis, vertical axis and depth axis using a sliding window. Calculate the first similarity between the traversed 2D / 3D scanned images and each location in the 2D / 3D template, and locate the regions in the 2D / 3D scanned images that contain the edges of the industrial sample under test. ; according to Map the corresponding region R in the 2D / 3D scanned image, and calculate the second similarity between R and each position in the 2D / 3D template; The position with the second similarity greater than the set threshold / the position with the highest second similarity is selected as the edge position of the industrial sample under test in the scanned image, so as to perform sample contour segmentation and obtain the sample scan image of the industrial sample under test itself after sample contour segmentation.
8. An industrial CT scan data standardization device, characterized in that, The device includes: The acquisition module is used to acquire the voltage and current parameters of the CT scanning device, the parameters of the CT scanning device, the CT scanning mode, and the original actual size represented by a pixel value in the scanned image based on the scanned image of the industrial test sample after CT scanning. The calculation module is used to calculate the scaling factor based on the original actual size represented by a pixel value in the scanned image and the pixel size in the scanned image. The resampling module is used to resample the scanned image based on the scaling factor using a bilinear interpolation algorithm to obtain the actual size of the resampled image represented by a pixel value after resampling. The segmentation module is used to segment the scanned image to obtain a sample scan image of the industrial sample itself after sample contour segmentation. The construction module is used to construct standard industrial CT scan image data from the voltage and current parameters of the CT scanning device, the CT scanning device parameters, the CT scanning mode, the original actual size, the resampled actual size, and the sample scan image.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-7.
Citation Information
Patent Citations
Method for measuring minor detail feature sizes in industrial CT (computerized tomography) detection
CN105092616A
Workpiece size visual measurement method for complex machining environment
CN117011282A