Terahertz image denoising method based on adaptive partitioning of connected domain

By adopting connected domain adaptive partitioning and filtering technology in terahertz image processing, the problem of insufficient denoising capability and real-time performance in the existing technology is solved, and more efficient noise suppression and image quality improvement are achieved.

CN115082339BActive Publication Date: 2024-10-18XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210712698.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-22
Publication Date
2024-10-18
Estimated Expiration
2042-06-22

AI Technical Summary

Technical Problem

Existing terahertz image denoising methods are difficult to effectively suppress various noises in images, especially trailing noise, and the algorithm complexity and real-time performance are poor.

Method used

Adopting a denoising method based on adaptive partitioning of connected domains, through the steps of coarse denoising, adaptive partitioning of connected domains, standard deviation calculation, Gaussian filtering and bilateral filtering, targeted operations are performed on different area blocks to suppress noise and preserve image edges. Texture information.

Benefits of technology

It improves the signal-to-noise ratio of the image, reduces the amount of calculation, improves the real-time performance of the algorithm, can effectively suppress trailing noise and stripe noise, and significantly improves the denoising effect and processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115082339B_ABST
    Figure CN115082339B_ABST
Patent Text Reader

Abstract

The present invention proposes a terahertz image denoising method based on connected domain adaptive partitioning, and the implementation steps are: (1) coarse denoising of terahertz images; (2) adaptive partitioning of image connected domains; (3) estimating the noise standard deviation using background area block images; (4) performing Gaussian filtering on non-background area block images according to the standard deviation, and performing bilateral filtering on target edge area block images therein, and outputting a denoised terahertz image. The present invention adaptively partitions the terahertz image through a connected domain, and performs corresponding operations according to the area block images, so that it can suppress various noises including tailing noise, so as to retain the edge texture information of the image, thereby improving the signal-to-noise ratio of the image. At the same time, since there is no need to perform operations such as wavelet transform decomposition and image reconstruction, the amount of calculation is reduced, thereby improving the real-time performance of the algorithm, and is expected to be widely used in the field of terahertz image processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing and relates to an image denoising method, in particular to a terahertz image denoising method based on connected domain adaptive partitioning, which can be used in the fields of terahertz wave-based spectral imaging, nondestructive testing, safety inspection, biomedicine, etc. Technical Background

[0002] In a broad sense, the terahertz band refers to electromagnetic waves with a frequency of 0.1THz to 10THz and a wavelength of 3mm to 30um. It occupies a unique position in the electromagnetic spectrum and is the transition zone from macroscopic classical theory to microscopic quantum theory. Therefore, it has the excellent characteristics of both. Terahertz images are formed by terahertz waves in an active or passive manner. Due to the excellent characteristics of terahertz waves, terahertz images include not only the morphological information of the object, but also the composition information of the object. The amount of information contained is large, so it has broad application prospects. However, due to the low output power and instability of terahertz imaging equipment, the terahertz image information has large changes and low contrast. Secondly, due to the diffraction and interference effects of terahertz light waves, the image will also produce noise such as stripes, grains and tails. Due to the quality problems of terahertz images, the subsequent processing and analysis of terahertz images is seriously affected.

[0003] Terahertz image denoising algorithms can be divided into spatial domain filtering algorithms and transform domain filtering algorithms. Spatial domain filtering refers to using filters to perform pixel-by-pixel operations on the input image, such as high-pass filtering, median filtering, non-local uniform filtering, etc. Transform domain filtering refers to converting the image from the spatial domain to the transform domain for filtering, and then inversely transforming it back to the spatial domain image, such as wavelet transform filtering and three-dimensional block matching filtering. However, the existing terahertz image denoising methods are difficult to suppress various noises in terahertz images, and will cause blurred image edges and poor denoising effects. In addition, because the algorithm is very complex, the real-time performance is poor.

[0004] The existing technology combines the clustering algorithm with the wavelet transform, in order to improve the real-time performance and denoising effect of the algorithm, for example, the patent application with the application publication number CN108133466A and the name "An improved adaptive wavelet terahertz image denoising method" discloses an improved wavelet terahertz image denoising method, and the specific steps of the method include: clustering the pixels using the fuzzy C-means method, and clustering them into five parts; calculating the average texture value of the five parts, and dividing them into smooth areas and non-smooth areas; selecting appropriate wavelet bases and decomposition layers for the smooth and non-smooth areas, respectively, and decomposing each layer using a decomposition algorithm to obtain the wavelet coefficients of each layer; determining a threshold value based on the wavelet coefficients, filtering through an adaptive threshold function, and removing noise; reconstructing the image using an inverse wavelet transform, and outputting the image. This method calculates the corresponding adaptive thresholds according to different areas, performs separate wavelet denoising on different areas, suppresses the stripe noise in the image, improves the signal-to-noise ratio of the image, and avoids image edge blur. However, since only the smoothness of the image is considered during clustering, and the characteristics of the tail noise in the terahertz image are not considered, it is difficult to suppress the tail noise. Even though the mean-based clustering algorithm reduces the amount of calculation compared to other clustering methods, since this method includes processes such as wavelet transform decomposition and image reconstruction, the overall calculation amount of the filtering process is large and the real-time performance is poor. Summary of the invention

[0005] The purpose of the present invention is to address the deficiencies of the above-mentioned prior art and propose a terahertz image denoising method based on connected domain adaptive partitioning to solve the technical problems of poor denoising ability and real-time performance in the prior art.

[0006] In order to achieve the above object, the technical solution adopted by the present invention comprises the following steps:

[0007] (1) Coarse denoising of terahertz images:

[0008] Calculate the mean of the M×N terahertz image containing the target And the terahertz image is smaller than The pixel value is set to 0 to achieve coarse denoising of the terahertz image, where M ≥ 64 and N ≥ 64;

[0009] (2) Adaptively divide the connected domain of the terahertz image after coarse denoising:

[0010] (2a) obtaining multiple connected domains of the coarsely denoised terahertz image O, and setting the pixels of the largest connected domain to white, and setting the pixels of the remaining connected domains to black, to generate a mask image;

[0011] (2b) The mask image is evenly divided into a×b blocks with an area of ​​A. rThe area block image is obtained by calculating the area A of the white pixels in each area block image. w The relationship between the divided area block image and the threshold T is adaptively classified to obtain N b background area block images and N t target area block images and N e The non-background area block image is composed of target edge area block images, where: N b +N t +N e =a×b;

[0012] (2c) mapping the position information of the classification results of all the area block images to the terahertz image O after coarse denoising to obtain a terahertz image O1 including three types of area blocks;

[0013] (3) Calculate the standard deviation of the O1 noise of the classified terahertz image:

[0014] Calculate the standard deviation of each background area block image in the terahertz image O1 and convert N b The average value δ of the standard deviations is taken as the standard deviation of the terahertz image noise O1;

[0015] (4) Obtain denoising results of terahertz images:

[0016] (4a) setting each background area block image in the terahertz image O1 to black, and performing Gaussian filtering on each non-background area block image in O1 based on the standard deviation δ;

[0017] (4b) Perform bilateral filtering on each target edge area block image in the non-background area block image after Gaussian filtering to obtain a denoised terahertz image.

[0018] Compared with the prior art, the present invention has the following advantages:

[0019] The present invention generates a mask image through multiple connected domains of a terahertz image after rough denoising, and adaptively classifies the regional block images according to the relationship between the area of ​​white pixels of each regional block image in the mask image and a threshold T, so as to obtain the denoising result of the terahertz image. On the one hand, targeted operations are performed on different regional block images, so that various noises including tailing noise in the terahertz image can be suppressed to retain the edge texture information of the image, thereby improving the signal-to-noise ratio of the image; on the other hand, the operation of adaptively dividing the connected domain is simple, and there is no need to perform operations such as wavelet transform decomposition and image reconstruction, thereby reducing the amount of calculation, thereby improving the real-time performance of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a flow chart of the implementation of the present invention;

[0021] Figure 2 is the terahertz security inspection image to be denoised;

[0022] Figure 3 It is the existing technology Figure 2 The denoising result of

[0023] Figure 4 The present invention is Figure 2 The denoising result graph. DETAILED DESCRIPTION

[0024] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0025] Reference Figure 1 , the present invention comprises the following steps:

[0026] Step 1) Coarse denoising of the terahertz image:

[0027] Calculate the mean of the M×N terahertz image containing the target And the terahertz image is smaller than The pixel value is set to 0. Coarse denoising can effectively remove the transition noise between the target and the background, which is convenient for the subsequent acquisition of the connected domain. Among them, M ≥ 64, N ≥ 64, the mean The calculation formula is:

[0028]

[0029] Where P(m,n) is the pixel value of the mth row and nth column;

[0030] Step 2) Adaptively divide the connected domain of the terahertz image after rough denoising:

[0031] Step 2a) obtaining multiple connected domains of the terahertz image O after rough denoising, the implementation steps are:

[0032] The terahertz image O after rough denoising is binarized. The image binarization process is to set the grayscale value of the pixel on the image to 0 or 255, that is, the process of making the entire image present an obvious black and white effect. The threshold value T used in the present invention is R According to the image greater than the threshold T R The variance of the pixel is δ F and less than the threshold T R The variance of the pixel is δ B Calculate and convert T R Start traversing from 0 to 255 and record δ F With δ B The threshold value T when the difference is maximum MAX,R The present invention selects T MAX,RAs the threshold of binarization. And take the pixels with pixel values ​​greater than 1 in the binarized terahertz image as seeds, and mark each seed;

[0033] Push each seed and the position where the pixel in the neighborhood of each seed is greater than 1 into the stack, and assign the same label to all pixels in the stack. The neighborhood can be selected from four neighborhoods and eight neighborhoods. According to the experimental results, the present invention selects eight neighborhoods;

[0034] Pop the pixel at the top of the stack, and then push the position with a pixel greater than 1 in the neighborhood of the top pixel into the stack. Repeat the operation until the stack is empty, and obtain multiple connected domains with labels. The connected domain of an image refers to the area composed of pixels with the same pixel value and adjacent positions in the image. Obtaining the connected domain means finding independent connected domains in the image and marking them.

[0035] The pixels of the largest connected domain are set to white, and the pixels of the remaining connected domains are set to black to generate a mask image;

[0036] Step 2b) Divide the mask image evenly into a×b blocks of area A r The area block image is obtained by calculating the area A of the white pixels in each area block image. w The relationship between A and the threshold T is used to adaptively classify the divided regional block images. The implementation method is: w and the preset threshold T satisfies A w The area block image of <T is taken as the target edge area block image, satisfying A w The region block image ≥ T is taken as the target region block image, and A w = 0 is used as the background block image. b background area block images and N t target area block images and N e The non-background area block image is composed of target edge area block images. According to the image processed in this paper, a is selected as 28 and b is selected as 12, and the experimental effect is the best. The total number of small image blocks is 336, among which, N b +N t +N e =a×b, T=0.75×A r ;

[0037] (2c) Mapping the position information of the classification results of all the region block images to the terahertz image O after rough denoising, and obtaining a terahertz image O1 including three types of region blocks. The region block image classification can effectively distinguish the background from the foreground and remove the background noise. At the same time, the noise level of the whole image can be estimated according to the noise of the background region block image, and the image noise can be suppressed more accurately. The target region block image and the target edge region block image can be distinguished, and the edge and texture information of the image can be better preserved.

[0038] Step 3) Calculate the standard deviation of the classified terahertz image O1 noise:

[0039] Calculate the standard deviation of each background area block in the terahertz image O1 and convert N b The average value δ of the standard deviations is used as the standard deviation of the noise of the terahertz image O after rough denoising. By estimating the noise standard deviation δ of the entire image, subsequent processing can be performed according to the size of the current image noise. The calculation formula of δ is:

[0040]

[0041]

[0042] Among them, δ j , are the standard deviation and mean of the jth background area block, C is the number of pixels in the background area block, s j,i is the grayscale value of the i-th pixel value of the j-th background area block;

[0043] Step 4) Obtain the denoising result of the terahertz image:

[0044] Step 4a) Each background area block image in the terahertz image O1 is set to black, and each non-background area block image in O1 is subjected to Gaussian filtering based on the standard deviation δ, which can suppress the stripe noise and tail noise of the image. The calculation formula of Gaussian filtering is:

[0045] P k =I k *G δ

[0046]

[0047] Among them, P k represents the Gaussian filtering result of the kth non-background area block image, * represents image convolution, I k represents the kth non-background area block image, G δ represents a two-dimensional Gaussian kernel function with a standard deviation of δ, and x and y represent the position information of the pixel;

[0048] Step 4b) performing bilateral filtering on each target edge area block image in the non-background area block image after Gaussian filtering. The bilateral filtering can retain the edge and texture information of the image to obtain a denoised terahertz image. The calculation formula of the bilateral filtering is:

[0049] B l =E l *W

[0050] W=W d ×W r

[0051]

[0052]

[0053] Among them, B l represents the bilateral filtering result of the lth target edge area block image after Gaussian filtering, * represents image convolution, E l represents the lth target edge area block image, W is the template weight of bilateral filtering, W d represents the spatial domain kernel, p and q are the position information of the pixels in the target edge area block image, h and v are the center coordinates of the target edge area block image, δ d represents the standard deviation of the Gaussian function in the spatial domain, W r represents the range kernel, f(p,q) is the pixel value of the pth row and qth column of the target edge region block image, f(h,v) represents the pixel value of the center coordinate of the f(p,q) target edge region block image, δ r represents the standard deviation of the Gaussian function in the range, exp(·) represents the exponential function with the natural constant e as the base, and ||·|| represents the norm.

[0054] The technical effects of the present invention are described below in conjunction with simulation experiments.

[0055] 1. Simulation conditions and contents:

[0056] The simulation experiment hardware platform is: CPU is i5-9400, main frequency is 2.9 GHz, running memory is 8 GB, and the simulation experiment software platform of the present invention is: operating system is Windows 11, Python version 3.6.0.

[0057] The image of the terahertz security inspection device used in the simulation is as follows: Figure 2 As shown, Figure 2 This is the image of a human body in a terahertz security scanner. It can be seen that the image has serious noise, the edge between the body and the background is very blurred, there are a lot of cloud-like stripe noise on both sides of the body and above the head, and there is long stick-shaped trailing noise between the legs.

[0058] The denoising effects of the present invention and the prior art, as well as the signal-to-noise ratio and processing time are compared and simulated, wherein the denoising effects of the prior art and the present invention are as follows: Figure 3 , Figure 4 As shown, the signal-to-noise ratio and processing time are

[0059] As shown in Table 1, the calculation formula of signal-to-noise ratio and processing time signal-to-noise ratio PSNR is as follows:

[0060]

[0061]

[0062] Among them, MAX I represents the maximum pixel value of the image, MSE represents the mean square error, M×N represents the size of the image, I(t i ,t j ) represents the terahertz image at t i Line, t j The pixel value of the column, K(t i ,t j ) indicates that the image after denoising is i Line, t j The pixel value of the column.

[0063] 2. Analysis of simulation results:

[0064] Reference Figure 3 The existing technology preserves the edge between the body and the background better, and has a certain effect on suppressing the stripe noise on both sides of the body, but it is difficult to suppress the trailing noise between the legs.

[0065] Reference Figure 4 The present invention preserves the edge between the body and the background better and successfully suppresses stripe noise and tail noise, and the denoising effect is better than the prior art.

[0066] Table 1.

[0067] Terahertz image denoising algorithm Signal-to-noise ratio (dB) Processing time(s) Prior art 25.67 2.12 The present invention 29.26 0.79

[0068] Referring to Table 1, the signal-to-noise ratio of the denoised image of the present invention is 29.26 dB, which is higher than that of the prior art method, proving that the image denoising effect of the present invention is good and the signal-to-noise ratio of the image can be improved. At the same time, the processing time of the present invention for one image is 0.79 s, which is less than the processing time of the prior art, proving that the real-time performance of the algorithm is good.

Claims

1. A terahertz image denoising method based on connected domain adaptive partitioning, characterized in that: The steps include: (1) Coarse denoising of terahertz images: Calculate the mean of the M×N terahertz image containing the target And the terahertz image is smaller than The pixel value is set to 0 to achieve coarse denoising of the terahertz image, where M ≥ 64 and N ≥ 64; (2) Adaptively divide the connected domain of the terahertz image after coarse denoising: (2a) obtaining multiple connected domains of the coarsely denoised terahertz image O, and setting the pixels of the largest connected domain to white, and setting the pixels of the remaining connected domains to black, to generate a mask image; (2b) The mask image is evenly divided into a×b blocks with an area of ​​A. r The area block image is then calculated based on the area A of the white pixels in each area block image. w The relationship between the divided area block image and the threshold T is adaptively classified to obtain N b background area block images and N t target area block images and N e The non-background area block image is composed of target edge area block images, where: N b +N t +N e =a×b; (2c) mapping the position information of the classification results of all the area block images to the terahertz image O after coarse denoising to obtain a terahertz image O1 including three types of area blocks; (3) Calculate the standard deviation of the O1 noise of the classified terahertz image: Calculate the standard deviation of each background area block image in the terahertz image O1 and convert N b The average value δ of the standard deviations is taken as the standard deviation of the terahertz image noise O1; (4) Obtain denoising results of terahertz images: (4a) setting each background area block image in the terahertz image O1 to black, and performing Gaussian filtering on each non-background area block image in O1 based on the standard deviation δ; (4b) Perform bilateral filtering on each target edge area block image in the non-background area block image after Gaussian filtering to obtain a denoised terahertz image.

2. The terahertz image denoising method based on connected domain adaptive partitioning according to claim 1 is characterized in that: The mean value of the terahertz image described in step (1) The calculation formula is: Among them, P(m,n) is the pixel value of the mth row and nth column.

3. The terahertz image denoising method based on connected domain adaptive partitioning according to claim 1, characterized in that: The steps of obtaining multiple connected domains of the coarsely denoised terahertz image O in step (2a) are as follows: (2a1) binarizing the terahertz image O after rough denoising, taking pixels with pixel values ​​greater than 1 in the binarized terahertz image as seeds, and marking each seed; (2a2) Push each seed and the positions of pixels greater than 1 in the neighborhood of each seed into the stack, and assign the same label to all pixels in the stack; (2a3) Pop the pixel at the top of the stack, and then push the pixel in the neighborhood of the top pixel whose number is greater than 1 into the stack. Repeat this operation for multiple rounds until the stack is empty, and obtain multiple connected domains with labels.

4. The terahertz image denoising method based on connected domain adaptive partitioning according to claim 1, characterized in that: The area A of the white pixels in each region block image described in step (2b) w The divided area block images are classified by: w and the preset threshold T satisfies A w The area block image of <T is taken as the target edge area block image, satisfying A w The region block image ≥ T is taken as the target region block image, and A w =0 is used as the background block image.

5. The terahertz image denoising method based on connected domain adaptive partitioning according to claim 1, characterized in that: N in step (3) b The average value of the standard deviations δ is calculated as: Among them, δ j , are the standard deviation and mean of the jth background area block, C is the number of pixels in the background area block, s j,i is the grayscale value of the i-th pixel value in the j-th background area block.

6. The terahertz image denoising method based on connected domain adaptive partitioning according to claim 1, characterized in that: In step (4a), Gaussian filtering is performed on each non-background area block image based on the standard deviation δ, and the filtering formula is: P k =I k *G δ Among them, P k represents the Gaussian filtering result of the kth non-background area block image, * represents image convolution, I k represents the kth non-background area block image, G δ represents a two-dimensional Gaussian kernel function with a standard deviation of δ, and x and y represent the position information of the pixel.

7. The terahertz image denoising method based on connected domain adaptive partitioning according to claim 1, characterized in that: In step (4b), bilateral filtering is performed on each target edge area block image in the non-background area block image after Gaussian filtering. The filtering formula is: B l =E l *W W=W d ×W r Among them, B l represents the bilateral filtering result of the lth target edge area block image after Gaussian filtering, * represents image convolution, E l represents the lth target edge area block image, W is the template weight of bilateral filtering, W d represents the spatial domain kernel, p and q are the position information of the pixels in the target edge area block image, h and v are the center coordinates of the target edge area block image, δ d represents the standard deviation of the Gaussian function in the spatial domain, W r represents the range kernel, f(p,q) is the pixel value of the pth row and qth column of the target edge region block image, f(h,v) represents the pixel value of the center coordinate of the f(p,q) target edge region block image, δ r represents the standard deviation of the Gaussian function in the range, exp(·) represents the exponential function with the natural constant e as the base, and ||·|| represents the norm.

Citation Information

Patent Citations

  • Improved self-adaptive wavelet terahertz image denoising method

    CN108133466A

  • Terahertz image recognition method, device and equipment and readable storage medium

    CN108764358A