Ultrasonic image dynamic range compression processing method

Through the combined method of Gamma correction and Retinex algorithm, the problem of detail loss caused by dynamic range compression in ultrasonic image processing is solved, and high-quality image compression and display effects are achieved.

CN119784862AActive Publication Date: 2025-04-08CHENGDU LIANKE AEROTECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510264613.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-04-08
Estimated Expiration
2045-03-07

AI Technical Summary

Technical Problem

Existing ultrasonic image processing technology is prone to loss of image details when compressing the dynamic range, resulting in poor image quality.

Method used

The Gamma correction algorithm is used for global brightness adjustment, and combined with the Retinex algorithm and the boot filter, a contrast enhancement factor and an adaptive nonlinear offset factor are introduced to perform local adaptive dynamic range compression.

Benefits of technology

While retaining image detail information, effectively compressing the image dynamic range, improving the image presentation effect on standard display devices, and enhancing the flexibility and adaptability of image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784862A_ABST
    Figure CN119784862A_ABST
Patent Text Reader

Abstract

An ultrasonic image dynamic range compression processing method relates to the technical field of image processing, and comprises the following steps: acquiring high dynamic range original A-Scan data, and converting the data into two-dimensional matrix data; preprocessing the two-dimensional matrix data to obtain standard input data; performing nonlinear brightness adjustment on the standard input data by adopting a Gamma correction algorithm, preliminarily compressing the dynamic range of the image, and generating a compressed image after global brightness adjustment; based on a Retinex algorithm, decomposing the compressed image after global brightness adjustment, introducing a contrast enhancement factor and an adaptive nonlinear offset factor, and calculating an enhanced compressed image in a low dynamic range; the method can maintain the definition of the processed image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method for dynamic range compression processing of ultrasonic images. Background Art

[0002] Ultrasonic testing is a non-destructive testing technology widely used in industry, medicine and other fields. Its basic principle is to use the propagation characteristics of ultrasonic waves in the workpiece, by emitting ultrasonic waves and analyzing their reflected echoes to evaluate the internal structure and defects of the object. Ultrasonic waves refer to sound waves with a frequency higher than the human hearing range (20 Hz - 20 kHz), usually between 0.5 and 15MHz. During the detection process, the ultrasonic transmitter emits ultrasonic waves into the object to be tested. When the sound waves encounter the material interface or defects, the sound waves will be reflected back and captured by the receiver. By analyzing the time delay, amplitude change and phase change of the reflected wave, the location, size and nature of the defect can be inferred, thereby evaluating the internal structure of the material.

[0003] Ultrasonic B-Scan and C-Scan images have become common and important tools in defect detection because they can intuitively display the internal conditions of an object. The ultrasonic receiver converts the mechanical vibration signal received by the probe wafer into an electrical signal, and then converts the analog signal into a digital signal after passing through an analog-to-digital converter for quantitative display. The digital signal is usually a high dynamic range signal, which may be as high as 14 bits, 16 bits or higher digital accuracy, and can capture tiny changes and defects inside the object.

[0004] However, due to the limitations of display devices and human eyes, high dynamic range A-Scan ultrasound signals cannot be directly and effectively displayed. Therefore, during the imaging process, these signals usually need to be compressed to form low dynamic range A-Scan signals, and then the compressed A-Scan signals are used for imaging to form B-Scan and C-Scan for presentation on the display device.

[0005] Existing ultrasound imaging technology usually uses linear or logarithmic compression methods to directly convert high dynamic range ultrasound data into low dynamic range ultrasound data before imaging. This global compression method causes subtle defect information to be ignored, resulting in poor ultrasound image quality. A small number of scholars have applied methods in the field of digital image processing to ultrasound images, such as U.S. patent publication number CN111819465A, which discloses a system and method for adaptively configuring the dynamic range for ultrasound image display; however, this method requires user input to determine the percentage of black and medium gray. If it is not set properly, it will cause the image effect to be counterproductive; in addition, this method is based on a global compression method and does not fully consider the local information of the image, which will cause the loss of image details; Therefore, we propose a method that can compress the dynamic range of an image while preserving image detail information. Summary of the invention

[0006] The object of the present invention is to provide a method for dynamic range compression processing of ultrasonic images, which can solve the problem of detail information loss after traditional ultrasonic image processing.

[0007] The present invention is achieved through the following technical solutions: A method for dynamic range compression processing of ultrasonic images, comprising: Get the original A-Scan data with high dynamic range and convert it into two-dimensional matrix data; Preprocess the two-dimensional matrix data to obtain standard input data; Gamma correction algorithm is used to perform nonlinear brightness adjustment on standard input data, preliminarily compress the dynamic range of the image, and generate a compressed image after global brightness adjustment; Based on the Retinex algorithm, the compressed image after global brightness adjustment is decomposed, and the contrast enhancement factor and adaptive nonlinear offset factor are introduced to calculate the enhanced compressed image with low dynamic range.

[0008] Furthermore, the ultrasonic echo signal received by the ultrasonic board is converted into raw A-Scan data with a high dynamic range through an analog-to-digital converter, and then a gate is used to select the effective signal area to integrate multiple A-Scan data into two-dimensional matrix data for two-dimensional imaging.

[0009] Furthermore, the preprocessing process includes grayscale processing, edge detection and data normalization.

[0010] Furthermore, the specific steps of the edge detection include: Use Canny edge detection algorithm to identify the true contour of the workpiece; Replace 0 pixel values ​​outside the artifact outline with NaN data.

[0011] Furthermore, a guided filter is used to smooth the compressed image after global brightness adjustment and decompose it to generate a base layer.

[0012] Furthermore, the contrast enhancement factor The calculation formula is: ; in, is the pixel value of the compressed image pixel after global brightness adjustment; is the maximum pixel value of the compressed image pixel after global brightness adjustment; is the contrast control parameter.

[0013] Furthermore, the adaptive nonlinear offset factor The calculation formula is: ; in, is the nonlinear control parameter; yes The average value of .

[0014] Furthermore, the enhanced compressed image The calculation formula is: ; in, The base layer is obtained by smoothing the compressed image after global brightness adjustment using the guided filter.

[0015] Furthermore, a deep learning model is used to enhance the compressed image Extract key features from Based on the key features, the quality score of each frame is calculated; Judging whether the enhanced compressed image is reasonable based on the quality score; If it is unreasonable, adjust the Gamma correction parameters, contrast enhancement factor and adaptive nonlinear offset factor, and recalculate the enhanced compressed image; If it is reasonable, a reasonable enhanced compressed image is output.

[0016] Furthermore, convolutional neural network is used to extract key features from enhanced compressed images.

[0017] The technical solution of the present invention has at least the following advantages and beneficial effects: The present invention discloses a method for compressing the dynamic range of an ultrasonic image. The method compresses the global dynamic range of a preprocessed image by using a Gamma correction algorithm, and enhances the local part of the compressed image after global brightness adjustment by using a Retinex algorithm, so that the output enhanced compressed image can not only be presented on a standard display device, but also effectively retains the original detail information of the image, which is convenient for subsequent lossless processing and detection steps; and introduces a contrast enhancement factor and an adaptive nonlinear offset factor, so that the Retinex algorithm can intelligently adjust the mapping intensity according to the image content, further improving the flexibility and adaptability of image processing; In addition, the use of Gamma correction technology as a means of global brightness nonlinear adjustment can simulate the sensitivity of the human eye to brightness, optimize the visual effect of ultrasound images, reduce image distortion, and improve image clarity; In addition, in the Retinex algorithm, the image that has undergone global brightness nonlinear adjustment is smoothed by a guided filter to obtain a base layer, and the guided image of the guided filter is constructed by a median filter. The median filter effectively removes sharp noise in the image by replacing the central pixel value with the median of the local window while retaining the mutation characteristics of the signal. The guided image is constructed by a median filter, which can effectively remove noise while retaining the edge information of the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A method flow chart of the present invention; Figure 2 The figure is a schematic diagram of a system structure of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0020] Example 1 like Figure 1 The method for dynamic range compression processing of an ultrasonic image shown in the figure comprises: Get the original A-Scan data with high dynamic range and convert it into two-dimensional matrix data; The acquisition process of the original A-Scan data is as follows: the ultrasonic echo signal received by the ultrasonic board is converted into original A-Scan data with a high dynamic range through an analog-to-digital converter; then the effective signal area is selected using a gate, and multiple A-Scan data are integrated into two-dimensional matrix data for two-dimensional imaging, namely B-Scan data or C-Scan data; in addition, this method is applicable to a variety of industrial ultrasonic non-destructive testing types, including penetration method, pulse echo method and ultrasonic diffraction time difference method (TOFD), etc., supports two-dimensional imaging modes (B-Scan and C-Scan), and is widely applicable in different detection scenarios.

[0021] Preprocess the two-dimensional matrix data to obtain standard input data; Gamma correction algorithm is used to perform nonlinear brightness adjustment on standard input data, preliminarily compress the dynamic range of the image, and generate a compressed image after global brightness adjustment. , that is, compressing the global dynamic range of the image; Gamma correction is a nonlinear tone mapping method used to adjust the brightness distribution of the image to compensate for the brightness perception characteristics of the display device or the human eye. It achieves global dynamic range compression by changing the intensity of each pixel value in the image. Specifically, it converts the pixel value according to a power law function (i.e., the Gamma function); Gamma correction is based on the following formula: ; in, is the pixel brightness value of the input image, usually normalized to the interval [0,1]; is the pixel brightness value of the output image after Gamma correction; It is an adjustable parameter, i.e., the Gamma correction parameter, which determines the shape of the curve; when When <1, Gamma correction will increase the contrast of dark areas; When >1, the contrast of the bright area will be reduced; choose the appropriate The value can make the image look more natural and better adapt to different display environments and viewing conditions; Decomposition of compressed images after global brightness adjustment based on the Retinex algorithm , and introduce contrast enhancement factor and adaptive nonlinear offset factor to calculate the enhanced compressed image with low dynamic range. This algorithm is used to perform local adaptive dynamic range compression on the compressed image.

[0022] Example 2 The preprocessing process includes grayscale processing, edge detection and data normalization.

[0023] 1) Grayscale processing Convert a two-dimensional matrix with high dynamic range (usually B-Scan or C-Scan image data composed of multiple A-Scan data) into a grayscale image, where the grayscale value of each pixel corresponds to the amplitude of the original A-Scan data at the corresponding point in the matrix.

[0024] The purpose is to simplify the data format: the original ultrasound data is essentially single-channel amplitude information, and directly mapping it to a grayscale image avoids redundant color channels, such as RGB three channels, and reduces computational complexity; focusing on amplitude information: ultrasound imaging characterizes material properties through echo intensity, and grayscale images can intuitively reflect amplitude differences (the higher the brightness, the stronger the signal strength), making it easier to observe structural features; and data standardization: unifying all input images into a single-channel grayscale format to eliminate the interference of color differences on the algorithm and ensure consistency in the processing flow.

[0025] 2) Edge Detection If the scanning range covers the entire workpiece, since the shape of the workpiece is usually irregular, there are zero pixel values ​​filled in the periphery of the workpiece in the matrix data used for imaging, and these pixels will interfere with subsequent calculations. Therefore, the Canny edge detection algorithm is first used to identify the true outline of the workpiece. Then, the zero pixel values ​​outside the workpiece outline are replaced with NaN to eliminate the impact of the zero pixel value on the overall image, where NaN is the abbreviation of "Not-a-Number", which is a special numeric type that means "not a number". If only a partial scan is performed on the inside of the workpiece, and the workpiece edge and external filling values ​​are not involved, this step can be omitted.

[0026] The purpose is to remove interference: when the scanning range covers the entire workpiece, there may be zero-value pixels in the image that do not belong to the actual object. Edge detection can accurately mark the boundary of the workpiece and replace the pixel values ​​of the external irrelevant area with NaN to avoid affecting subsequent calculations; improve accuracy: ensure that the data used for imaging analysis is limited to the inside of the actual workpiece, thereby improving the accuracy of the final result; and optimize computing resources: only process the inside of the workpiece, reducing unnecessary calculations and improving computing efficiency.

[0027] When NaN values ​​are added to the data, the positions of special values ​​need to be marked by masks so that the special values ​​do not participate in subsequent calculations.

[0028] 3) Data Normalization Normalize the matrix data to the interval [0,1] according to the minimum and maximum values ​​to provide standardized input for subsequent compression algorithms; The specific calculation formula is: ; in is the original matrix data, and are the minimum and maximum values ​​of the original matrix data respectively.

[0029] Through normalization processing, the data range differences caused by different ultrasound equipment or imaging conditions, such as gain settings, probe frequencies, etc., can be eliminated, providing standardized input for subsequent dynamic range compression algorithms; and providing a suitable input range for subsequent dynamic range compression operations. For example, gamma correction usually requires the input value to be between [0,1].

[0030] Example 3 In addition, a guided filter is used to adjust the global brightness of the compressed image. Smoothing is performed to obtain the base layer The guidance image of the guided filter is obtained by The guided filter is an edge-preserving filter that uses the information of the guided image to filter the input image.

[0031] The core principle of the guided filter is to use the guidance image to filter the image to be processed, which can smooth the image and maintain edge information. Before using the guided filter, you need to construct the guidance image. Common methods for constructing the guidance image include directly using the input image, using Gaussian filtering to generate the guidance image, and using grayscale images to generate the guidance image.

[0032] In view of the fact that ultrasonic images in industrial scenes have a lot of noise, a median filter is used to filter the input image to construct a guide image, remove the sharp noise of the image, and retain the mutation part of the signal, that is, the edge part of the image.

[0033] The median filter replaces the pixel value by selecting the median value in the neighborhood of each pixel in the image, effectively removing salt and pepper noise and keeping the edges clear. Although the computational complexity is high, it can better preserve image details while denoising. It is a nonlinear filtering method that balances denoising and detail preservation. The size of the selected neighborhood can significantly affect the filtering results. The larger the neighborhood (i.e., the larger the window), the more obvious the smoothing effect of the image. In order to retain more detail information, a neighborhood of size 3x3 is selected here to calculate the median.

[0034] After adding special values ​​to the image data, if the neighborhood of the pixel contains special values, only the non-special values ​​in the neighborhood are sorted and the median is selected. If the number of elements in the neighborhood pixel value list after removing the special value is an odd number, the median is the middle number; if the number of elements is an even number, the median is usually the average of the two middle numbers.

[0035] In addition, the contrast enhancement factor The calculation formula is: ; in, is the pixel value of the compressed image pixel after global brightness adjustment; is the maximum pixel value of the compressed image pixel after global brightness adjustment; is the contrast control parameter, when When it is greater than 1, the image contrast is enhanced. When it is less than 1, the image contrast decreases. Take a constant greater than 1.

[0036] here, The larger the value of The larger the value, the higher the contrast enhancement of the pixel. Used to control the intensity of contrast enhancement, The overall increase makes the contrast enhancement effect more significant. In this way, the contrast enhancement factor can be adaptively adjusted according to the grayscale value of each pixel in the image. .

[0037] In particular, the adaptive nonlinear offset factor The calculation formula is: ; in, is the nonlinear control parameter; yes The average value of .

[0038] Reflects the overall brightness level of the image. Higher, It will also be higher.

[0039] Finally, the enhanced compressed image The calculation formula is: ; in, for The base layer is obtained after smoothing by the guided filter. Division in the logarithmic domain is equivalent to subtraction in the brightness domain, so For the input image Subtract its base layer After that, the detail layer is obtained, which is the enhanced image of interest.

[0040] Specifically, the contrast enhancement factor It is used to adjust the contrast in the local area of ​​the image. The larger the pixel value of the pixel in the image, The larger the value of The larger the pixel value in the image, the smaller the pixel value in the image. The smaller the value, the smaller the pixel value corresponding to the output image The smaller the grayscale value, the more obvious the difference between different grayscale levels in the image.

[0041] The purpose of this factor is to improve visibility: by increasing the local contrast, the details in the image that were originally difficult to distinguish can be made more clearly visible, especially in areas with high and low signal amplitudes; and to maintain a natural appearance: despite the enhanced contrast, it is still necessary to ensure that the image looks natural without over-sharpening or distortion; and to adapt to local characteristics: the ultrasonic image of the workpiece reflects its complex internal material properties, and the contrast enhancement factor can be adaptively adjusted according to the characteristics of each local area, so as to better present the characteristics of the material or defect.

[0042] Adaptive nonlinear offset factor , which is used to adjust the input value of the logarithmic function. The characteristic of the logarithmic function is that its gradient, that is, the rate of change of the function, gradually decreases as the input value increases, which means that when the input value is small, the logarithmic function changes faster, and when the input value is large, it changes slower.

[0043] The starting point of the logarithmic function is adjusted. By changing this starting point, the nonlinear strength of the logarithmic function can be controlled. Specifically: if (The average value of compressed image pixels after global brightness adjustment) is smaller, that is, the image is darker, Smaller ( ), then the logarithmic function will start with a larger gradient, which means that in the dark areas of the image, the changes in the logarithmic function will be more obvious, thereby increasing the brightness of these areas.

[0044] On the contrary, if Larger, that is, brighter image, The larger the value, the smaller the gradient of the logarithmic function will be and the slower it will change, which means that in bright areas of the image, the increase in brightness will be more gradual.

[0045] This approach ensures that the local adaptation output can be appropriately mapped according to the scene content. In dark scenes, the visibility of dark details can be increased, while in bright scenes, overexposure can be avoided and the details of bright parts can be maintained. In this way, the image processing algorithm can better adapt to different scene conditions and improve image quality. And the purpose of this factor is to correct brightness deviation: in different detection scenarios, the brightness of the image may change for various reasons. The adaptive nonlinear offset factor can be automatically adjusted according to the actual situation to make the overall brightness of the image closer to the actual situation; protect dark area details: for low-brightness areas, appropriate offsets can prevent these areas from becoming too dark and losing key information; avoid overexposure, and dark areas are low signal intensity areas, usually areas with large attenuation: similarly, in high-brightness areas, reasonable offsets can help prevent the loss of details caused by excessive brightness; and intelligent mapping intensity: introducing two adaptive coefficients allows the algorithm to intelligently adjust the mapping intensity according to the image content, further improving the flexibility and adaptability of image processing.

[0046] The two factors have a common goal: to optimize the visual effect of the image so that the final generated image can maintain a good contrast and brightness balance globally and highlight important details locally; to calculate and apply these two factors in an automated manner, reducing the need for manual adjustments by the user and improving processing efficiency; and whether in the fields of medical diagnosis or industrial flaw detection, such technology can ensure that image quality meets professional requirements and can flexibly respond to imaging challenges under a variety of complex conditions.

[0047] Example 4 In addition, this method can also use deep learning models to extract key features from enhanced compressed images, aiming to identify and quantify important visual attributes in the image, such as contrast, clarity, noise level, etc. These features will serve as the basis for subsequent quality assessment; Specifically, you can choose a pre-trained convolutional neural network (CNN), such as the ResNet model. It should be noted that the pre-training process of the ResNet model is to generate noise-free high-quality ultrasound images through COMSOL simulation software, and then input the simulation data into the ResNet model for training to complete the pre-training; then use the last layer or the last few layers of the selected model as feature extractors to obtain high-dimensional feature vectors, which capture the spatial structure and semantic information of the image; finally, according to specific task requirements, you can add custom layers on the basis of the pre-trained model, such as fully connected layers, pooling layers, etc., to further refine the feature representation; The specific process of extracting key features includes: 1) Ensure that all input images have the same resolution, i.e., images are usually scaled to the input size expected by the model; 2) Normalize the image pixel values ​​to [0, 1]; 3) If the original image is a grayscale image and the CNN model requires RGB input, a pseudo-color image can be constructed by copying the grayscale channel; and vice versa; 4) To increase the generalization ability of the model, operations such as random cropping, flipping, and rotation can be applied during the training phase, but kept as is during inference; 5) Download and load the pre-trained weights of the selected model, making sure to use only the convolutional layers and not the top classifier; 6) Create a PyTorch model instance that contains only the convolutional layers in the original model. You can choose to keep the activation output before the last convolutional layer as the feature representation, which is usually the most informative part; and the PyTorch model is as follows: import torch from torchvision import models, transforms # Load the pre-trained ResNet model and remove the classifier part model = models.resnet50(pretrained=True) modules = list(model.children())[:-1]# Remove the last fully connected layer feature_extractor = torch.nn.Sequential(*modules) # Set to evaluation mode feature_extractor.eval() # Define preprocessing transformations preprocess = transforms.Compose([ transforms.Resize((224, 224)), transforms.ToTensor(), transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224,0.225]), ]) # Extract feature function def extract_features(image): # Preprocess the image input_tensor = preprocess(image).unsqueeze(0) # Add batch dimension with torch.no_grad():# Disable gradient calculation features = feature_extractor(input_tensor) return features.flatten().numpy()# Flatten the features into a one-dimensional array # Example call # image is a PIL.Image object features = extract_features(image) 7) Input the preprocessed image into the newly constructed feature extractor, perform forward propagation calculations, and obtain the feature vectors corresponding to each image. These feature vectors contain rich spatial structure and semantic information; 8) Use principal component analysis (PCA) techniques to reduce dimensionality for better visualization or to simplify subsequent calculations; 9) Normalize the feature vectors again to ensure that the feature values ​​between different images are comparable.

[0048] Calculate the quality score of each frame based on key features; assign a quality score to each frame by combining multiple key features to quantify the overall performance of the image; First, establish a quality evaluation system suitable for the application scenario. For example, it can include weight configurations for multiple dimensions such as contrast, clarity, and noise level. Then, multiply each eigenvalue by its corresponding weight and sum them up to get the final quality score. This can be done through simple linear combinations or more complex nonlinear functions. In addition, in order to enhance the intelligence of quality assessment, a supervised learning model is trained, such as a support vector machine (SVM), a random forest (RF), or a regression model. The supervised learning model can learn the difference pattern between high-quality images and low-quality images based on historical data, and predict the quality score of new images accordingly. Judging whether the enhanced compressed image is reasonable based on the quality score; determining whether the current image processing result meets the expected standard, so as to determine whether further parameter adjustment is needed. One or more quality score thresholds can be pre-set to distinguish "reasonable" from "unreasonable" images. These thresholds can be flexibly adjusted according to the needs of actual applications; Then, by comparing the calculated quality score with the set threshold, if the score is higher than the threshold, the image is considered reasonable; otherwise, it is considered unreasonable; If it is unreasonable, adjust the Gamma correction parameters, contrast enhancement factor and adaptive nonlinear offset factor, and recalculate the enhanced compressed image; that is, when the image quality does not meet the standard, automatically adjust the relevant parameters to optimize the image effect until a satisfactory level is reached; The Gamma correction parameters When adjusting according to the overall brightness of the image, if the image is too dark, reduce value to increase brightness; if the image is too bright, increase value to reduce brightness; Contrast Enhancement Factor Adjustment: If the contrast in a local area is too low, increase the contrast control parameter appropriately. , making the differences between different gray levels more obvious; Adaptive nonlinear offset factor : Adjust the offset factor according to the characteristics of the brightness distribution in the image , make sure the dark areas are not too dark and the bright areas are not overexposed; If it is reasonable, then a reasonable enhanced compressed image is output, that is, .

[0049] Example 5 As attached Figure 2 The ultrasonic image dynamic range compression processing system shown includes a data acquisition module, a processing module, an output module and a feedback analysis module; The data acquisition module is used to acquire original A-Scan data with a high dynamic range and convert it into a two-dimensional matrix; The processing module includes a preprocessing unit, a preliminary compression unit and an enhancement unit, wherein the preprocessing unit is used to preprocess the original A-Scan data, the preliminary compression unit uses a Gamma correction algorithm to perform preliminary compression on the preprocessed data, and the enhancement unit enhances the image data after preliminary compression; The output module is used to output enhanced image data; The feedback analysis module is used to analyze whether the enhanced image data meets the expected standard, and if it does not meet the expected standard, it can adjust the Gamma correction parameters of the preliminary compression unit, and the contrast enhancement factor and adaptive nonlinear offset factor of the enhancement unit.

[0050] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for dynamic range compression processing of ultrasonic images, characterized in that: include: Get the original A-Scan data with high dynamic range and convert it into two-dimensional matrix data; Preprocess the two-dimensional matrix data to obtain standard input data; Gamma correction algorithm is used to perform nonlinear brightness adjustment on standard input data, preliminarily compress the dynamic range of the image, and generate a compressed image after global brightness adjustment; Based on the Retinex algorithm, the compressed image after global brightness adjustment is decomposed, and the contrast enhancement factor and adaptive nonlinear offset factor are introduced to calculate the enhanced compressed image with low dynamic range.

2. The method for ultrasonic image dynamic range compression processing according to claim 1, characterized in that: The ultrasonic echo signal received by the ultrasonic board is converted into raw A-Scan data with a high dynamic range through an analog-to-digital converter, and then a gate is used to select the effective signal area, and multiple A-Scan data are integrated into two-dimensional matrix data for imaging.

3. The method for ultrasonic image dynamic range compression processing according to claim 1, characterized in that: The preprocessing process includes grayscale processing, edge detection and data normalization.

4. The method for ultrasonic image dynamic range compression processing according to claim 3, characterized in that: The specific steps of edge detection include: Use Canny edge detection algorithm to identify the true contour of the workpiece; Replace 0 pixel values ​​outside the artifact outline with NaN data.

5. The method for ultrasonic image dynamic range compression processing according to claim 1, characterized in that: The compressed image after global brightness adjustment is smoothed using a guided filter and decomposed to generate a base layer.

6. The method for ultrasonic image dynamic range compression processing according to claim 5, characterized in that: The contrast enhancement factor The calculation formula is: ; in, is the pixel value of the compressed image pixel after global brightness adjustment; is the maximum pixel value of the compressed image pixel after global brightness adjustment; is the contrast control parameter.

7. The method for ultrasonic image dynamic range compression processing according to claim 6, characterized in that: The adaptive nonlinear offset factor The calculation formula is: ; in, is the nonlinear control parameter; yes The average value of .

8. The method for ultrasonic image dynamic range compression processing according to claim 7, characterized in that: The enhanced compressed image The calculation formula is: ; in, The base layer is obtained by smoothing the compressed image after global brightness adjustment using the guided filter.

9. The ultrasonic image dynamic range compression processing method according to claim 1, characterized in that: Using deep learning models to enhance compressed images Extract key features from Based on the key features, the quality score of each frame is calculated; Judging whether the enhanced compressed image is reasonable based on the quality score; If it is unreasonable, adjust the Gamma correction parameters, contrast enhancement factor and adaptive nonlinear offset factor, and recalculate the enhanced compressed image; If it is reasonable, a reasonable enhanced compressed image is output.

10. The method for ultrasonic image dynamic range compression processing according to claim 9, characterized in that: Convolutional neural network is used to extract key features from enhanced compressed images.

Citation Information

Patent Citations

  • System and method for adaptively configuring dynamic range for ultrasound image display

    CN111819465A

  • Image enhancement method, display device and computer readable storage medium

    CN107644409A

  • License plate image brightness processing method, device and equipment

    CN110473158A

  • Image brightness enhancement method and device

    CN113947553A