Image stripe removing method and device, storage medium and terminal
The wavelet-based image stripe removal method addresses the inefficacy of existing technologies by targeting stripe directions with Fourier transforms and filters, improving image clarity and accuracy while avoiding hardware costs.
Patent Information
- Application Number
- CN202411057969.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-12-27
AI Technical Summary
Existing image stripe removal technologies in X-ray digital imaging are ineffective for weak, wide, and low-frequency stripes, leading to reduced image clarity and accuracy, and hardware-based solutions are costly and inconvenient.
An image stripe removal method utilizing wavelet decomposition, selective Fourier transform, high-pass filtering, and wavelet reconstruction to target stripe directions, employing Gaussian or Gabor filters based on stripe width and frequency.
Effectively removes image stripes in specific directions, enhancing image quality by preserving relevant features and reducing noise without requiring additional hardware.
Smart Images

Figure CN119205543A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and relates to an image stripe removal method, and in particular to an image stripe removal method and device, a storage medium and a terminal. Background Art
[0002] X-ray digital imaging is a common non-destructive testing technology widely used to evaluate the quality of workpieces. It detects internal structures or defects by emitting X-rays and recording the images after they penetrate the material. However, in practical applications, due to random fluctuations in sensor response, stripes may appear in the output image. Such stripes are usually called stripe noise and affect the clarity and accuracy of the image. In order to improve the imaging quality, calibration and application of advanced image processing techniques are often required to mitigate these effects.
[0003] In the prior art, the above problem is generally solved by transforming the image into the two-dimensional Fourier domain for processing, then calculating the frequency point position of the stripes, and performing specific Gaussian damping on the abnormal point position of the spectrum. This method can effectively remove the image stripes that are more serious and have a higher frequency, but the effect is not ideal for the weaker, wider and lower frequency stripes in the image. For example, when the stripes in the image are weak, it is difficult to locate the position of the abnormal energy point in the Fourier domain; when the stripes in the image are wider, the stripes and useful signals are not easy to distinguish in the frequency domain. At this time, when the abnormal energy points are suppressed, the signals with similar frequencies will also be reduced; when the frequency of the stripes in the image is low, when the image is transformed into the Fourier domain, its abnormal energy points are in the low-frequency area, and after the abnormal energy is processed, the image will show obvious ringing phenomenon. In addition, there are some methods that solve the above problems by making certain changes to the hardware design. For example, improving the sensor material, using materials with higher uniformity to manufacture sensors to reduce response fluctuations; redesigning the detector array to reduce the difference between each pixel; adding a temperature control system to keep the sensor working environment stable to reduce thermal noise; integrating an automatic calibration module to adjust the inconsistent sensor response in real time. These methods rely on adjusting the physical structure or components of the device, which is not convenient to use and requires additional hardware costs. Summary of the invention
[0004] The object of the present invention is to provide an image stripe removal method and device, a storage medium and a terminal, which are used to solve the technical problem that the image stripe removal technology in the prior art has a poor effect.
[0005] In a first aspect, the present invention provides an image stripe removal method, comprising:
[0006] Acquire an image to be striped, and perform wavelet decomposition on the image to be striped to obtain a decomposition result;
[0007] Selecting corresponding detail components from the decomposition results as components to be processed according to the stripe directions in the image to be striped, and performing Fourier transform on the components to be processed according to the stripe directions to obtain corresponding spectrum data;
[0008] Performing high-pass filtering on the spectrum data to obtain a filtering result, and performing inverse Fourier transform on the filtering result to obtain a stripe-removed detail component corresponding to the component to be processed;
[0009] Performing wavelet reconstruction on the unselected components in the decomposition result and the detail components after stripe removal to obtain a stripe-removed image;
[0010] The decomposition result includes an approximate component, a diagonal detail component, a horizontal detail component and a vertical detail component, and the stripe direction includes a diagonal direction, a horizontal direction and a vertical direction.
[0011] In one embodiment of the present invention, the wavelet decomposition includes multiple iterative decompositions, and the number of iterative decompositions is proportional to the width of stripes in the image to be de-striped.
[0012] In one embodiment of the present invention, the variance of the high-pass filter is proportional to the frequency of stripes in the image to be striped.
[0013] In an embodiment of the present invention, the high-pass filter is a Gaussian damped filter.
[0014] In an embodiment of the present invention, the high pass filter is a Gabor filter.
[0015] In a second aspect, the present invention further provides an image stripe removal device, characterized in that it comprises a decomposition module, a spectrum module, a filtering module and a reconstruction module;
[0016] A decomposition module is used to obtain an image to be striped and perform wavelet decomposition on the image to be striped to obtain a decomposition result;
[0017] A spectrum module, used for selecting corresponding detail components in the decomposition result as components to be processed according to the stripe directions in the image to be striped, and performing Fourier transform on the components to be processed according to the stripe directions to obtain corresponding spectrum data;
[0018] A filtering module, used for performing high-pass filtering on the spectrum data to obtain a filtering result, and performing inverse Fourier transform on the filtering result to obtain a stripe-removed detail component corresponding to the component to be processed;
[0019] A reconstruction module, used for performing wavelet reconstruction on the unselected components in the decomposition result and the detail components after stripe removal to obtain a stripe-removed image;
[0020] The decomposition result includes an approximate component, a diagonal detail component, a horizontal detail component and a vertical detail component, and the stripe direction includes a diagonal direction, a horizontal direction and a vertical direction.
[0021] In a third aspect, the present invention further provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the image stripe removal method as described above.
[0022] In a fourth aspect, the present invention further provides a terminal, comprising a processor and a memory, wherein the memory is communicatively connected to the processor;
[0023] The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes the above-mentioned image stripe removal method.
[0024] As described above, the image stripe removal method and device, storage medium and terminal of the present invention have the following beneficial effects:
[0025] 1. Use wavelet decomposition to decompose the image to be striped, select the component corresponding to the stripe direction in the decomposition result as the component to be processed for filtering, and then reconstruct the detail component after stripe removal and other components by wavelet, which can effectively remove the stripe noise in a specific direction and improve the image quality.
[0026] 2. Selectively selecting detail components corresponding to the direction of the stripes for subsequent processing can extract the features closest to the stripes, help identify features of specific frequencies and directions such as edges and textures, and reduce other noise and compressed data that are not related to the stripes. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic flow chart of the image stripe removal method according to an embodiment of the present invention is shown.
[0028] Figure 2 A schematic diagram of a data processing flow of an image stripe removal method according to an embodiment of the present invention is shown.
[0029] Figure 3 A schematic structural diagram of an image stripe removal device according to an embodiment of the present invention is shown.
[0030] Figure 4 A schematic diagram of the structure of a terminal according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0031] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0032] The principles and implementation methods of the image stripe removal method and device, storage medium and terminal of this embodiment will be described in detail below, so that those skilled in the art can understand the image stripe removal method, device, storage medium and terminal of this embodiment without creative work.
[0033] In order to solve the above technical problems existing in the prior art, an embodiment of the present invention provides an image stripe removal method.
[0034] Figure 1 FIG. 1 is a flow chart showing a method for removing streaks from an image according to an embodiment of the present invention. Figure 1 As shown, the image stripe removal method according to the embodiment of the present invention mainly comprises the following steps:
[0035] Step S100: obtaining an image to be de-streaked, and performing wavelet decomposition on the image to be de-streaked to obtain a decomposition result.
[0036] It should be noted that the image to be striped is not limited to the image of the X-ray detector, but may also be other natural grayscale images that need to remove periodic stripes.
[0037] The decomposition results include approximate components, diagonal detail components, horizontal detail components and vertical detail components, and the stripe directions include diagonal directions, horizontal directions and vertical directions.
[0038] Specifically, wavelet decomposition is an image processing technology that can decompose an image into components of different frequencies and time scales. In this application, it is used to perform multi-layer decomposition of the image to extract details of different scales and directions. The decomposition results of wavelet decomposition include approximate components, diagonal detail components, horizontal detail components, and vertical detail components. Among them, the approximate components can characterize the overall information structure of the image, while other detail components characterize the high-frequency information of details in different directions. Compared with the method of extracting features using deep learning methods such as neural networks in the prior art, the technical solution of this application does not need to rely on a large number of data sets, and its processing is faster and the operating cost is lower.
[0039] Optionally, the wavelet decomposition includes multiple iterative decompositions, and the number of iterative decompositions is proportional to the stripe width in the image to be striped. That is, in this embodiment, the wavelet decomposition in step S100 is not only decomposed once, but iteratively decomposed multiple times, and the result after the last iterative decomposition is used as the decomposition result. Wavelet decomposition is to convolve the signal with a group of wavelet functions, and these wavelet functions are obtained by scaling and translating the mother wavelet. In the wavelet decomposition, the original image (the image to be striped) is decomposed into approximate components, vertical detail components, horizontal detail components and diagonal detail components after the first decomposition, and the second decomposition is to decompose the approximate components after the first decomposition again to obtain the approximate components, vertical detail components, horizontal detail components and diagonal detail components after the second decomposition, that is, each decomposition is iterated only on the approximate components to extract deeper features. The stripe width in the image to be striped refers to the extension range of each stripe in the direction perpendicular to the stripe direction. For example, the stripe width in the image to be striped containing vertical stripes refers to the extension range of each vertical stripe in the horizontal direction. The wider the stripe width, the more iterations there are, which also means that the more times the feature needs to be extracted. The wide stripes correspond to lower frequencies, and a deeper decomposition is required to capture them. Further, the number of iterative decompositions is proportional to the stripe width in a linear function. According to the complex situation of the actual processing, it can also be appropriately set to other proportional relationships. Multiple iterative decompositions can extract features of different scales more meticulously, help separate wide stripes, and by increasing the number of iterations, the low-frequency components of the stripes can be better identified and processed. However, the more iterations there are, the more image details are missing, so a smaller number of iterations is used for narrower stripes. Therefore, the setting of the number of wavelet decomposition iterations in this embodiment can improve the stripe removal effect while retaining image details as much as possible.
[0040] Step S200: selecting corresponding detail components in the decomposition result as components to be processed according to the stripe directions in the image to be striped, and performing Fourier transform on the components to be processed according to the stripe directions to obtain corresponding spectrum data.
[0041] Specifically, the decomposition result of the wavelet decomposition is selected to obtain a component to be processed, and the component to be processed is one of a diagonal detail component, a horizontal detail component, and a vertical detail component. The direction represented by the component to be processed is the same as the direction of the stripes in the image to be striped. For example, if the direction of the stripes in the image to be striped is vertical, then the component to be processed selected in this step corresponds to the vertical detail component. Figure 2 FIG. 1 is a schematic diagram showing a data processing flow of the image stripe removal method according to an embodiment of the present invention, referring to FIG. Figure 2As shown in the figure, in the first column of the image to be striped, the stripe direction is vertical, so in the decomposition result of the second column of wavelet decomposition, the vertical detail component is selected for the next step of processing. This selective selection of detail components corresponding to the stripe direction for subsequent processing can extract the features closest to the stripes, which helps to identify features of specific frequencies and directions such as edges and textures, while reducing other noise and compressed data that are not related to the stripes. It can not only effectively improve the stripe removal effect, but also avoid the loss of other image details as much as possible, and achieve stripe removal on the basis of retaining image details as much as possible.
[0042] After selecting the components to be processed, it is also necessary to perform Fourier transform on the components to be processed according to the direction of the stripes. Fourier transform converts spatial domain information into frequency domain information. When solving the above technical problems, it can highlight the frequency components in the direction of the stripes, making it easier to identify and filter out frequency components in a specific direction (ie, stripes) in the frequency domain. It should be noted that when the stripe direction is horizontal, that is, the component to be processed is a horizontal detail component, or the stripe direction is vertical, that is, the component to be processed is a vertical detail component, the spectrum data is a one-dimensional spectrum, and when the stripe direction is diagonal, that is, the component to be processed is a diagonal detail component, the spectrum data is a two-dimensional spectrum. For example, refer to Figure 2 As shown, when obtaining the vertical detail component ( Figure 2 In the second column of decomposition results, the third figure from top to bottom is the vertical detail component), then according to the vertical stripe direction, a one-dimensional Fourier transform is performed on the component to be processed in the horizontal direction to obtain a one-dimensional spectrum as the spectrum data. This is because the vertical stripes mainly show the frequency transformation characteristics in the horizontal direction, that is, by performing Fourier transform in the direction orthogonal to the stripe direction, the frequency characteristics of the stripes can be more clearly separated and processed. When the component to be processed is a horizontal detail component, the Fourier transform must be calculated in the vertical direction; when the component to be processed is a diagonal detail component, its corresponding spectrum data is a two-dimensional spectrum data, so there is no need to select the vertical or horizontal direction of the Fourier transform.
[0043] Step S300: performing high-pass filtering on the spectrum data to obtain a filtering result, and performing inverse Fourier transform on the filtering result to obtain a stripe-removed detail component corresponding to the component to be processed.
[0044] Specifically, the spectrum data obtained in step S200 is subjected to high-pass filtering. High-pass filtering is a filtering technique that can retain high-frequency components in an image while suppressing or removing low-frequency components. In the corresponding detail components, stripes are usually manifested as low-frequency components. Therefore, by processing the spectrum data of the detail components through high-pass filtering, these low-frequency components can be effectively removed, thereby retaining and enhancing high-frequency details in the image.
[0045] It should be noted that the filtering result after high-pass filtering is still frequency domain data, so it is necessary to perform inverse Fourier transform on the filtering result to obtain the detail component after stripe removal corresponding to the to-be-processed image. Inverse Fourier transform is a mathematical tool that converts frequency domain data back to time domain or space domain. Its principle is the inverse process of Fourier transform, which recombines the frequency components into the original signal. Therefore, the filtering result after high-pass filtering can be converted back to the space domain. The data converted back to the space domain is the detail component after stripe removal. Corresponding to the to-be-processed component, the stripe noise has been removed in the detail component after stripe removal.
[0046] Optionally, the variance of the high-pass filter is proportional to the frequency of the stripes in the image to be striped. In the image to be striped, the stripe frequency refers to the number of times or intervals at which the stripes appear repeatedly in the image, that is, the rate at which the stripes appear repeatedly in the image at a specific interval and direction. In the process of obtaining the filtering result of step S300, the variance is used to control the characteristics of the filter and determine the frequency response range. When the stripe frequency is high, the variance increases to achieve the removal of stripes with a higher frequency. According to the stripe frequency, the filter variance is set to be proportional to it, so that the stripe variance can be accurately removed on the basis of retaining the image details.
[0047] Optionally, the high-pass filter is a Gaussian damping filter. When the component to be processed is a vertical detail component or a horizontal detail component, the high-pass filter is a Gaussian damping filter. The Gaussian damping filter has a smooth frequency response, so it can effectively remove stripe noise in the horizontal and vertical directions.
[0048] Optionally, the high-pass filter is a Gabor filter. When the component to be processed is a diagonal detail component, the high-pass filter is a Gabor filter. The Gabor filter can provide good direction selection and scale selection characteristics, and filters of different directions can be constructed according to the direction of the stripes. Therefore, the use of the Gabor filter can effectively distinguish and remove diagonal stripes.
[0049] Step S400: Perform wavelet reconstruction on the unselected components in the decomposition result and the detail components after stripe removal to obtain the stripe-free image.
[0050] Specifically, wavelet reconstruction is the inverse process of wavelet decomposition, which recombines all components into a complete image, generates an image after stripes are removed, and restores its original structure and details. Figure 2As shown in FIG. 1 , the stripe direction in the image to be striped is vertical, so the vertical detail component in the decomposition result is processed in step S300, while the other components (i.e., the approximate component, the horizontal detail component, and the diagonal detail component) are not processed in step S300. Instead, after the stripe-free detail component is obtained, the stripe-free detail component is combined with the unselected components to perform wavelet reconstruction, and the complete image is resynthesized. The complete image is used as the stripe-free image, and reference is made to FIG. Figure 2 As shown in FIG. 1 , the stripe noise of the image after stripe removal has been significantly removed compared with the image to be stripe removed.
[0051] The protection scope of the image stripe removal method of the embodiment of the present invention is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present invention are included in the protection scope of the present invention.
[0052] The image stripe removal method of the embodiment of the present invention uses wavelet decomposition to decompose the image to be striped, selects the component corresponding to the stripe direction in the decomposition result as the component to be processed for filtering, and then reconstructs the stripe-removed detail component and other components by wavelet, which can effectively remove the stripe noise in a specific direction and improve the image quality. In addition, the detail component corresponding to the stripe direction is selectively selected for subsequent processing, which can extract the features closest to the stripes, help identify the features of specific frequencies and directions such as edges and textures, and reduce other noise and compressed data unrelated to the stripes.
[0053] In order to solve the above technical problems existing in the prior art, an embodiment of the present invention further provides an image stripe removal device.
[0054] Figure 3 FIG. 1 shows a schematic diagram of the structure of an image stripe removal device according to an embodiment of the present invention, referring to FIG. Figure 3 As shown, the image stripe removal device according to the embodiment of the present invention includes a decomposition module, a spectrum module, a filtering module and a reconstruction module;
[0055] A decomposition module is used to obtain an image to be striped and perform wavelet decomposition on the image to be striped to obtain a decomposition result;
[0056] A spectrum module, used for selecting corresponding detail components in the decomposition result as components to be processed according to the stripe directions in the image to be striped, and performing Fourier transform on the components to be processed according to the stripe directions to obtain corresponding spectrum data;
[0057] A filtering module, used for performing high-pass filtering on the spectrum data to obtain a filtering result, and performing inverse Fourier transform on the filtering result to obtain a stripe-removed detail component corresponding to the component to be processed;
[0058] A reconstruction module, used for performing wavelet reconstruction on the unselected components in the decomposition result and the detail components after stripe removal to obtain a stripe-removed image;
[0059] The decomposition result includes an approximate component, a diagonal detail component, a horizontal detail component and a vertical detail component, and the stripe direction includes a diagonal direction, a horizontal direction and a vertical direction.
[0060] The image stripe removal device of the embodiment of the present invention uses wavelet decomposition to decompose the image to be striped, selects the component corresponding to the stripe direction in the decomposition result as the component to be processed for filtering, and then reconstructs the stripe-removed detail component and other components by wavelet, which can effectively remove the stripe noise in a specific direction and improve the image quality. In addition, the detail component corresponding to the stripe direction is selectively selected for subsequent processing, which can extract the features closest to the stripes, help identify the features of specific frequencies and directions such as edges and textures, and reduce other noise and compressed data unrelated to the stripes.
[0061] In order to solve the above technical problems existing in the prior art, an embodiment of the present invention further provides a storage medium on which a computer program is stored, characterized in that when the program is executed by a processor, all steps of the image stripe removal method of the embodiment are implemented.
[0062] The specific steps of the image stripe removal method and the beneficial effects obtained by applying the readable storage medium provided by the embodiment of the present invention are the same as those in the above embodiment, and will not be described in detail here.
[0063] A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above-mentioned embodiment can be completed by instructing a processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above-mentioned storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, a solid-state disk (SSD)), etc.
[0064] In order to solve the above technical problems existing in the prior art, an embodiment of the present invention further provides a terminal. Figure 4 A schematic diagram of the structure of the terminal according to an embodiment of the present invention is shown, referring to Figure 4 As shown, the terminal of the embodiment of the present invention includes a processor and a memory, and the memory is communicatively connected to the processor; the memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory, so that the terminal executes all steps of the image stripe removal method of the above embodiment.
[0065] The specific steps of the image stripe removal method and the beneficial effects obtained by applying the terminal provided by the embodiment of the present invention are the same as those in the above embodiment, and will not be described in detail here.
[0066] It should be noted that the memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage. Similarly, the processor may also be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0067] Although the embodiments disclosed in the present invention are as above, the contents described are only embodiments adopted for facilitating the understanding of the present invention and are not intended to limit the present invention. Any technician in the technical field to which the present invention belongs can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present invention, but the protection scope of the present invention shall still be subject to the scope defined in the attached claims.
Claims
1. A method for removing streaks from an image, comprising: Acquire an image to be striped, and perform wavelet decomposition on the image to be striped to obtain a decomposition result; Selecting corresponding detail components from the decomposition results as components to be processed according to the stripe directions in the image to be striped, and performing Fourier transform on the components to be processed according to the stripe directions to obtain corresponding spectrum data; Performing high-pass filtering on the spectrum data to obtain a filtering result, and performing inverse Fourier transform on the filtering result to obtain a stripe-removed detail component corresponding to the component to be processed; Performing wavelet reconstruction on the unselected components in the decomposition result and the detail components after stripe removal to obtain a stripe-removed image; The decomposition result includes an approximate component, a diagonal detail component, a horizontal detail component and a vertical detail component, and the stripe direction includes a diagonal direction, a horizontal direction and a vertical direction.
2. The method according to claim 1, characterized in that The wavelet decomposition includes multiple iterative decompositions, and the number of iterative decompositions is proportional to the width of stripes in the image to be de-striped.
3. The method according to claim 1, characterized in that The variance of the high-pass filter is proportional to the frequency of stripes in the image to be striped.
4. The method according to claim 1, characterized in that: The high-pass filter is a Gaussian damped filter.
5. The method according to claim 1, characterized in that The high-pass filter is a Gabor filter.
6. An image stripe removal device, characterized in that: include: A decomposition module is used to obtain an image to be striped and perform wavelet decomposition on the image to be striped to obtain a decomposition result; A spectrum module, used for selecting corresponding detail components in the decomposition result as components to be processed according to the stripe directions in the image to be striped, and performing Fourier transform on the components to be processed according to the stripe directions to obtain corresponding spectrum data; A filtering module, used for performing high-pass filtering on the spectrum data to obtain a filtering result, and performing inverse Fourier transform on the filtering result to obtain a stripe-removed detail component corresponding to the component to be processed; A reconstruction module, used for performing wavelet reconstruction on the unselected components in the decomposition result and the detail components after stripe removal to obtain a stripe-removed image; The decomposition result includes an approximate component, a diagonal detail component, a horizontal detail component and a vertical detail component, and the stripe direction includes a diagonal direction, a horizontal direction and a vertical direction.
7. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the image stripe removal method according to any one of claims 1 to 5 is implemented.
8. A terminal, characterized in that: It comprises a processor and a memory, wherein the memory is communicatively connected to the processor; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes the image stripe removal method according to any one of claims 1 to 5.
