An image processing method and apparatus

By performing global and local enhancement and denoising on the images and training the optimal neural network, the problem of insufficient recognition of specific regions in images in existing technologies has been solved, and efficient identification of COVID-19 lesion regions has been achieved.

CN116563137BActive Publication Date: 2026-07-21MACAU UNIV OF SCI & TECH
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
MACAU UNIV OF SCI & TECH
Filing Date
2023-03-27
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies cannot perform local enhancement and local denoising on specific regions of the image under test, resulting in insufficient recognition of the target region in the image.

Method used

By performing global enhancement and global denoising on the original image, followed by local enhancement of the pre-defined target foreground region and local denoising of the background region, an optimal neural network is trained, which is then used to process the image under test.

Benefits of technology

It significantly improved the recognition of target areas in the images under test, especially in the identification of COVID-19 lesion areas, thus enhancing the accuracy and clarity of diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116563137B_ABST
    Figure CN116563137B_ABST
Patent Text Reader

Abstract

The application discloses an image processing method and device. The method comprises the following steps: performing global enhancement and global denoising on an original image to obtain a first target image; performing local enhancement on a pre-set target foreground region in the first target image to obtain a second target image; performing local denoising on a pre-set target background region in the second target image to obtain a third target image; training an original neural network according to the original image and the third target image to obtain an optimal neural network; and processing a to-be-tested image according to the optimal neural network. The application can perform local enhancement and local denoising on a specific region of an image, and greatly improves the recognition degree of a target region of the to-be-tested image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more particularly to an image processing method and apparatus. Background Technology

[0002] Image enhancement and denoising are among the fundamental techniques in image preprocessing, primarily aimed at increasing image contrast and producing clearer images.

[0003] Currently, image enhancement methods are mainly divided into two categories: spatial domain and frequency domain. Spatial domain methods primarily process the grayscale values ​​of image pixels, aiming to adjust the grayscale distribution and modifying grayscale across the entire image. Frequency domain enhancement algorithms mainly include Distributed Cosine Transform (DCT), Fourier Transform (FFT), and Distributed Wavelet Transform (DWT), which transform the image to be enhanced in a specific transform domain and then obtain the enhanced image through the corresponding inverse transform. Similarly, image denoising methods also process the entire image. Therefore, existing technologies cannot perform local enhancement and denoising on specific regions of the image under test.

[0004] Therefore, there is a need in the art for an effective algorithm for local enhancement and local denoising of target regions in the image under test (e.g., mild COVID-19 lesion regions) to improve the recognition of target regions in the image under test. Summary of the Invention

[0005] The present invention aims to provide an image processing method and apparatus that can solve the above-mentioned technical problems.

[0006] According to one aspect of the present invention, an image processing method is provided, comprising: performing global enhancement and global denoising on an original image to obtain a first target image; performing local enhancement on a pre-defined target foreground region in the first target image to obtain a second target image; performing local denoising on a pre-defined target background region in the second target image to obtain a third target image; training an original neural network based on the original image and the third target image to obtain an optimal neural network; and processing a test image based on the optimal neural network.

[0007] Preferably, the second target image is obtained by locally enhancing a pre-defined target foreground region in the first target image, including: determining multiple connected regions contained in the target foreground region based on the grayscale value of the target foreground region; determining a connected region with an area greater than a specific percentage of the area of ​​the target foreground region as a first target connected region; and enhancing the grayscale value of the first target connected region to obtain the second target image.

[0008] Preferably, based on the grayscale value of the target foreground region, and according to the following formula, the multiple connected regions contained in the target foreground region are determined:

[0009] ;

[0010] Where N8 represents the octagonal region of the grayscale value, N4 represents the quatagonal region of the grayscale value, p represents the pixel position of the target foreground region, x represents the x-coordinate of the pixel position of the target foreground region, and y represents the y-coordinate of the pixel position of the target foreground region.

[0011] The distribution range of this grayscale value is: Where 0≤a1, b1≤255; and a1 is the minimum value of the distribution range, and b1 is the maximum value of the distribution range.

[0012] Preferably, the third target image is obtained by performing local denoising on a pre-defined target background region in the second target image, including: determining multiple connected regions contained in the target foreground region based on the grayscale value of the target background region; determining a connected region with an area smaller than a specific percentage of the area of ​​the target background region as a second target connected region; and enhancing the grayscale value of the second target connected region to obtain the third target image.

[0013] Preferably, based on the grayscale value of the target background region, and according to the following formula, the multiple connected regions contained in the target foreground region are determined:

[0014] ;

[0015] Where N8 represents the octagonal region of the grayscale value, N4 represents the quatagonal region of the grayscale value, p represents the pixel position of the target foreground region, x represents the x-coordinate of the pixel position of the target foreground region, and y represents the y-coordinate of the pixel position of the target foreground region.

[0016] The distribution range of this grayscale value is: Where 0≤a1, b1≤255; and a1 is the minimum value of the distribution range, and b1 is the maximum value of the distribution range.

[0017] Preferably, the image to be tested is processed according to the optimal neural network, including: inputting the image to be tested into the data module of the optimal neural network to obtain an intermediate image corresponding to the first target image; and inputting the intermediate image into the prior module of the neural network to obtain a final image corresponding to the third target image.

[0018] Preferably, the image to be tested is input into the data module of the optimal neural network, and an intermediate image corresponding to the first target image is obtained according to the following formula:

[0019] The formula for this data module is: Where y represents the intermediate image, k represents the number of iterations of the optimal neural network, D represents the data module, x represents the x-coordinate of the pixel position of the target foreground region, s represents the scale factor of the intermediate image, F represents the blur kernel of the intermediate image, and v represents the first hyperparameter.

[0020] Preferably, the intermediate image is input into the prior module of the optimal neural network, and the final image corresponding to the third target image is obtained according to the following formula: The formula of the prior module is: Where x represents the final image, k represents the number of iterations of the optimal neural network, P represents the prior module, y represents the intermediate image, and ω represents the second hyperparameter.

[0021] Preferably, before placing the image to be tested into the data module of the optimal neural network, the method includes: pre-setting a hyperparameter module in the optimal neural network; the formula of the hyperparameter module further includes: Where v represents the first hyperparameter, ω represents the second hyperparameter, and H represents the hyperparameter module. The parameter represents the noise level of the optimal neural network, and s represents the scaling parameter of the optimal neural network.

[0022] According to another aspect of the present invention, an image processing apparatus is also provided, comprising: a global enhancement and denoising module for performing global enhancement and global denoising on an original image to obtain a first target image; a local enhancement module for performing local enhancement on a pre-defined target foreground region in the first target image to obtain a second target image; a local denoising module for performing local denoising on a pre-defined target background region in the second target image to obtain a third target image; a neural network training module for training an original neural network based on the original image and the third target image to obtain an optimal neural network; and a processing module for processing a test image based on the optimal neural network.

[0023] This invention trains an optimal neural network through local image enhancement and noise reduction, and then processes the image under test through this optimal neural network, further improving the recognition of the target foreground region of the image under test. Attached Figure Description

[0024] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0025] Figure 1This is a flowchart of an image processing method according to an embodiment of the present invention;

[0026] Figure 2 This is a schematic diagram of a neural network according to an embodiment of the present invention;

[0027] Figure 3 This is a structural block diagram of an image processing apparatus according to an embodiment of the present invention;

[0028] Figure 4 A schematic diagram of a local enhancement and denoising module according to an embodiment of the present invention; and

[0029] Figure 5 This is a schematic diagram of the COVID-19 detection effect and detection equipment according to an embodiment of the present invention. Detailed Implementation

[0030] This invention trains an optimal neural network through local image enhancement and denoising, and then uses this optimal neural network to process the image under test. Unlike existing technologies, this invention can perform local enhancement and denoising on specific target regions of an image, greatly improving the recognition accuracy of target regions in the image under test.

[0031] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0032] This invention provides an image processing method. Figure 1 This is a flowchart of an image processing method according to an embodiment of the present invention. Figure 1 As shown, the steps include S102 to S110.

[0033] Step S102: Perform global enhancement and global denoising on the original image to obtain the first target image.

[0034] Step S104: Local enhancement is performed on the pre-defined target foreground region in the first target image to obtain the second target image.

[0035] Step S106: Local denoising is performed on the pre-defined target background region in the second target image to obtain the third target image.

[0036] Step S108: Train the original neural network based on the original image and the third target image to obtain the optimal neural network.

[0037] Step S110: Process the image to be tested according to the optimal neural network.

[0038] This invention obtains a third target image by performing global enhancement and noise reduction on the original image, as well as local enhancement and noise reduction. The original neural network is then trained based on the original image and the third target image to obtain the optimal neural network. Finally, the image to be tested is processed, which further improves the recognition of specific target regions in the image to be tested.

[0039] According to an embodiment of the present invention, a second target image is obtained by locally enhancing a pre-defined target foreground region in a first target image, comprising: determining a plurality of connected regions contained in the target foreground region based on the grayscale value of the target foreground region; determining a first target connected region among the plurality of connected regions whose area is greater than a specific percentage of the area of ​​the target foreground region; and enhancing the grayscale value of the first target connected region to obtain the second target image. The determination of the plurality of connected regions contained in the target foreground region is based on the following formula, comprising:

[0040] Where N8 represents an 8-connected region of grayscale values, N4 represents a 4-connected region of grayscale values, p represents the pixel position of the target foreground region, x represents the x-coordinate of the pixel position of the target foreground region, and y represents the y-coordinate of the pixel position of the target foreground region; the distribution range of grayscale values ​​is... Where 0≤a1, b1≤255; and a1 is the minimum value of the distribution range, and b1 is the maximum value of the distribution range.

[0041] This embodiment describes in detail a method for local enhancement of a target foreground region. This method offers at least two advantages: First, based on the grayscale value range of the target foreground region, a first connected region is determined. This accurately identifies interconnected local regions that require enhancement. Second, the grayscale value of the first connected region is enhanced to m... p The advantage of doing this is that it can effectively enhance local areas and further improve the recognizability of connected regions.

[0042] According to an embodiment of the present invention, local denoising is performed on a pre-defined target background region in a second target image to obtain a third target image, including: determining multiple connected regions contained in a target foreground region based on the grayscale values ​​of the target background region; identifying connected regions with an area smaller than a specific percentage of the target background region as second target connected regions; and enhancing the grayscale values ​​of the second target connected regions to obtain the third target image. The determination of the multiple connected regions contained in the target foreground region is based on the following formula:

[0043] Where N8 represents an 8-connected region of grayscale values, N4 represents a 4-connected region of grayscale values, p represents the pixel position of the target foreground region, x represents the x-coordinate of the pixel position of the target foreground region, and y represents the y-coordinate of the pixel position of the target foreground region; the distribution range of this grayscale value is... Where 0≤a1, b1≤255; and a1 is the minimum value of the distribution range, and b1 is the maximum value of the distribution range.

[0044] This embodiment describes in detail a method for local noise reduction of a target background region. This method has at least two advantages: First, based on the grayscale values ​​of the target background region, a second connected region is determined. This allows for the accurate selection of interconnected local regions that need noise reduction. Second, the grayscale values ​​of the second connected region are enhanced to n. p The advantage of doing this is that it can reduce noise in local areas, further improving the distinction between foreground and background areas.

[0045] According to an embodiment of the present invention, processing the image to be tested based on an optimal neural network includes: inputting the image to be tested into the data module of the optimal neural network to obtain an intermediate image corresponding to a first target image; and inputting the intermediate image into the prior module of the optimal neural network to obtain a final image corresponding to a third target image.

[0046] This embodiment describes in detail a method for processing a test image using an optimal neural network. This method has at least the following two advantages: First, a data module is manually set in the optimal neural network. This allows for global image enhancement and denoising, making the overall test image clearer. Second, after the data module outputs a relatively clear intermediate image, a priori module is manually set in the optimal neural network to perform local enhancement and denoising on specific target areas of the intermediate image, effectively improving the recognition of the target areas.

[0047] According to an embodiment of the present invention, the image to be tested is input into the data module of the optimal neural network, and an intermediate image corresponding to the first target image is obtained according to the following formula:

[0048] Formula for the data module: ;

[0049] Where y represents the intermediate image, k represents the number of iterations of the optimal neural network, D represents the data module, x represents the x-coordinate of the pixel position of the target foreground region, s represents the scale factor of the intermediate image, F represents the blur kernel of the intermediate image, and v represents the first hyperparameter.

[0050] This embodiment describes in detail a method for obtaining an intermediate image based on a formula in a data module, which has at least the following two advantages: First, a blur kernel and a scale factor are set in the formula to improve the clarity of the intermediate image; second, the number of iterations is set in the formula so that the image under test can be iterated multiple times according to actual needs until the required clarity is achieved.

[0051] According to an embodiment of the present invention, the intermediate image is input into the prior module of the optimal neural network, and the final image corresponding to the third target image is obtained according to the following formula:

[0052] The formula for the prior module: ;

[0053] Where x represents the final image, k represents the number of iterations of the optimal neural network, P represents the prior module, y represents the intermediate image, and ω represents the second hyperparameter.

[0054] This embodiment describes in detail a method for obtaining the final image based on the formula of the prior module, which has at least the following two advantages: First, based on the formula of the prior module, a clearer final image after local enhancement and denoising can be obtained; Second, the prior module also sets the number of iterations, which can be iterated multiple times according to actual needs until a completely clear and noise-free final image is obtained.

[0055] According to an embodiment of the present invention, before placing the image to be tested into the data module of the optimal neural network, the method includes: pre-setting a hyperparameter module in the optimal neural network; the formula of the hyperparameter module further includes: Where v represents the first hyperparameter, ω represents the second hyperparameter, and H represents the hyperparameter module. The parameter represents the noise level of the optimal neural network, and s represents the scaling parameter of the optimal neural network.

[0056] This embodiment describes in detail the hyperparameter module before the data module of the optimal neural network to place the image under test. This method has at least the following advantages: the hyperparameter module is mainly used to adjust the output of the data module and the prior module. The first hyperparameter is set in the data module and the second hyperparameter is set in the prior module. This allows the noise level and scaling parameters of the image to be preset and adjusted, so that the iterative output images of the first target image and the third target image are clearer.

[0057] According to an embodiment of the present invention, an image processing apparatus is provided, comprising: a global enhancement and denoising module for performing global enhancement and global denoising on an original image to obtain a first target image; a local enhancement module for performing local enhancement on a pre-defined target foreground region in the first target image to obtain a second target image; a local denoising module for performing local denoising on a pre-defined target background region in the second target image to obtain a third target image; a neural network training module for training an original neural network based on the original image and the third target image to obtain an optimal neural network; and a processing module for processing a test image based on the optimal neural network.

[0058] This embodiment describes in detail an image processing apparatus, which mainly includes a global enhancement and denoising module, a local enhancement module, a local denoising module, an image training module, and an image processing module. This apparatus performs global enhancement and denoising, as well as local enhancement and denoising, on the original image to obtain a third target image. Based on the original image and the third target image, it trains an original neural network to obtain an optimal neural network. Finally, it processes the image to be tested. Unlike ordinary apparatuses, this apparatus can perform local enhancement and local denoising on specific regions of the image, improving the recognition accuracy of the target region in the image to be tested.

[0059] The implementation process of the embodiments of the present invention will be described in detail below with reference to examples. Furthermore, any content not described in detail in this specification is prior art known to those skilled in the art.

[0060] In industrial informatics, to improve the treatment outcomes of Coronavirus Disease 2019 (COVID-19), continuous development of COVID-19 diagnostic systems is necessary. COVID-19 includes lung lesions of varying degrees, such as single or multiple patchy ground-glass opacities and interlobular septal thickening. High-resolution datasets of computed tomography (CT) images can provide clear image texture for identifying lesion areas. Typical COVID-19 lesions primarily exhibit a gray, snow-like characteristic or a crescent-shaped distribution. Compared to other types of COVID-19, mild COVID-19 only shows a few scattered lesion areas, which appear as transparent, small, and irregular ground-glass opacities, easily overlooked during diagnosis.

[0061] Therefore, after obtaining the original COVID-19 CT image, the first step is to perform global enhancement and denoising on the original CT image. In this embodiment, global enhancement is performed on the high-frequency regions (edges and corners) of the original CT image, and low-pass filtering is used to filter and denoise the image. Based on the mean of the image grayscale value m and the original grayscale value O, the grayscale value y is obtained as follows:

[0062]

[0063] The `round` function transforms the input tuple into the nearest integer tuple, and `f` is a factor used to increase the comparison metric. The frequency division is determined by the size of the filter matrix. The larger the matrix, the smaller the frequency division.

[0064] Then, according to the formula: The first target image was obtained.

[0065] According to an embodiment of the present invention, local enhancement is performed on the target foreground region of the first target image. Based on the grayscale values ​​of the target foreground region, multiple connected regions contained within the target foreground region are determined. The formula for calculating an eight-connected region is as follows:

[0066] Where N8 represents an octagonal region of grayscale values, N4 represents a quadrature region of grayscale values, p represents the pixel position of the target foreground region, x represents the x-coordinate of the pixel position of the target foreground region, and y represents the y-coordinate of the pixel position of the target foreground region.

[0067] According to an embodiment of the present invention, among a plurality of connected regions, a connected region whose area is greater than the area of ​​the target foreground region by a specific percentage is determined as a first target connected region; wherein, the specific percentage may be 20%-30%.

[0068] According to an embodiment of the present invention, the grayscale values ​​of the first target connected region are enhanced to obtain a second target image. The distribution range of the grayscale values ​​is as follows: , where 0≤a1, b1≤255; and a1 is the minimum value of the distribution range, and b1 is the maximum value of the distribution range.

[0069] According to an embodiment of the present invention, the grayscale value of the first target connected region is: .

[0070] According to an embodiment of the present invention, local denoising is performed on the target background region of the second target image. Based on the grayscale values ​​of the target background region, multiple connected regions contained in the target foreground region are determined. The calculation formula for an eight-connected region is as follows:

[0071] Where N8 represents an octagonal region of grayscale values, N4 represents a quadrature region of grayscale values, p represents the pixel position of the target foreground region, x represents the x-coordinate of the pixel position of the target foreground region, and y represents the y-coordinate of the pixel position of the target foreground region.

[0072] According to an embodiment of the present invention, among a plurality of connected regions, a connected region whose area is smaller than the area of ​​the target background region by a specific percentage is determined as a second target connected region; wherein, the specific percentage may be 30%-50%.

[0073] According to an embodiment of the present invention, the grayscale values ​​of the connected regions of the second target are enhanced to obtain a second target image. The distribution range of the grayscale values ​​is as follows: , where 0≤a1, b1≤255; and a1 is the minimum value of the distribution range, and b1 is the maximum value of the distribution range.

[0074] According to an embodiment of the present invention, the gray values ​​of the lesion area are mainly distributed in Between, among them, It is the average gray value of the image.

[0075] Figure 2 This is a schematic diagram of a neural network according to an embodiment of the present invention. According to the embodiment of the present invention, the network used is an end-to-end network based on UNet, which is trained by pairing the original image and the third target image to obtain the optimal UNet end-to-end network. The UNet end-to-end network mainly includes a data module, a prior module, and a hyperparameter module.

[0076] In the optimal neural network, hyperparameter modules are pre-defined, and the formula for the hyperparameter modules is as follows: Where v represents the first hyperparameter, ω represents the second hyperparameter, and H represents the hyperparameter module. The parameter represents the noise level of the optimal neural network, and s represents the scaling parameter of the optimal neural network.

[0077] To balance speed and accuracy, the number of iterations k is set to 8. The number of hidden nodes per layer is set to 64. The noise level is set to [0, 3).

[0078] After setting the hyperparameter modules, the image to be tested is fed into the UNet end-to-end network for processing.

[0079] First, the original image enters the data module, which is mainly used for training to obtain high-quality augmented intermediate images. This module not only minimizes the data terms but also includes hyperparameters v. Additionally, the data module can also represent the degradation model.

[0080] The formula for the data module is as follows: ; y represents the intermediate image, k represents the number of iterations of the optimal neural network, D represents the data module, x represents the x-coordinate of the pixel position of the target foreground region, s represents the scale factor of the intermediate image, F represents the blur kernel of the intermediate image, and v represents the first hyperparameter.

[0081] According to an embodiment of the present invention, the data module is specifically expressed as follows:

[0082] Where β is the penalty parameter and y is an auxiliary variable.

[0083] Next, the intermediate image enters the prior module, which is used to obtain the final image based on local enhancement and local denoising. The prior module mainly includes the UNet network and the local enhancement and denoising modules.

[0084] The formula for the prior module is: Where x represents the final image, k represents the number of iterations of the optimal neural network, P represents the prior module, y represents the intermediate image, and ω represents the second hyperparameter.

[0085] According to an embodiment of the present invention, the data module is specifically expressed as follows:

[0086] Where β is the penalty parameter.

[0087] According to an embodiment of the present invention, the images output by the data module and the prior module can be iterated multiple times. That is, if the image output by the prior module fails to meet the target requirements, the final image obtained after the first iteration can be used as the image to be tested for the second iteration and then input into the data module and the prior module until the target requirements are met.

[0088] According to an embodiment of the present invention, the loss function of the UNet end-to-end network mainly includes L1 loss, perceptual loss, and generative adversarial network loss. Their weights are set to 1:1:0.005. L1 loss is suitable for general network training, while perceptual loss is often used to enhance training networks and has good convergence; therefore, they are used as the main losses, with a weight of 1. Since the UNet end-to-end network involves end-to-end training, similar to generative adversarial network loss, it is used as a fine-tuning loss, with a weight of 0.005.

[0089] According to an embodiment of the present invention, an evaluation method is also provided to evaluate the results of end-to-end network training of UNet. The evaluation metrics are accuracy, precision, and sensitivity.

[0090] Accuracy is generally used to evaluate the overall accuracy of a model; it is the proportion of correct predictions out of all predictions. The formula is: .

[0091] Precision refers to the probability of correctly detecting a positive sample. Its calculation formula is: .

[0092] Sensitive refers to the proportion of correctly identified positive samples. In other words, it's the accuracy rate of correctly identifying lesion areas in CT images of mild COVID-19 cases. The calculation formula is: .

[0093] The experimental results show that the images enhanced by this method have a high recognition accuracy.

[0094] In addition, this embodiment also provides an image processing device, such as... Figure 4 As shown, it includes: a global enhancement and denoising module for performing global enhancement and global denoising on the original image to obtain a first target image; a local enhancement module for performing local enhancement on a pre-defined target foreground region in the first target image to obtain a second target image; a local denoising module for performing local denoising on a pre-defined target background region in the second target image to obtain a third target image; a neural network training module for training the original neural network based on the original image and the third target image to obtain an optimal neural network; and a processing module for processing the test image based on the optimal neural network.

[0095] In summary, this invention, through local image enhancement and denoising, can train an optimal neural network, which is then used to process the image under test. Unlike existing technologies, this invention can perform local enhancement and denoising on specific regions of an image, significantly improving the recognition accuracy of the target region in the image under test.

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

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

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

[0099] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0100] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. An image processing method, characterized in that, include: The original image is globally enhanced and globally denoised to obtain the first target image; Based on the grayscale value of the target foreground region in the first target image, determine the multiple connected regions contained in the target foreground region; Among the plurality of connected regions, a connected region whose area is greater than the area of ​​the target foreground region by a specific percentage is determined as the first target connected region; Enhance the grayscale value of the first target connected region to obtain the second target image; Based on the grayscale value of the target background region in the second target image, determine the multiple connected regions contained in the target foreground region; Among the plurality of connected regions, a connected region whose area is smaller than the area of ​​the target background region by a specific percentage is determined as a second target connected region; Enhance the grayscale value of the connected region of the second target to obtain the third target image; The original neural network is trained based on the original image and the third target image to obtain the optimal neural network; The image to be tested is processed according to the optimal neural network.

2. The method according to claim 1, characterized in that, Based on the grayscale values ​​of the target foreground region, and according to the following formula, the multiple connected regions contained in the target foreground region are determined: ; Wherein, N8 represents the octagonal region of the grayscale value, N4 represents the quaternary region of the grayscale value, p represents the pixel position of the target foreground region, x represents the horizontal coordinate of the pixel position of the target foreground region, and y represents the vertical coordinate of the pixel position of the target foreground region. The distribution range of the grayscale values ​​is: Where 0 ≤ a1, b1 ≤ 255; and a1 is the minimum value of the distribution range, and b1 is the maximum value of the distribution range.

3. The method according to claim 1, characterized in that, Based on the grayscale values ​​of the target background region, and according to the following formula, determine the multiple connected regions contained in the target foreground region: ; Wherein, N8 represents the octagonal region of the grayscale value, N4 represents the quaternary region of the grayscale value, p represents the pixel position of the target foreground region, x represents the horizontal coordinate of the pixel position of the target foreground region, and y represents the vertical coordinate of the pixel position of the target foreground region. The distribution range of the grayscale values ​​is: Where 0 ≤ a1, b1 ≤ 255; and a1 is the minimum value of the distribution range, and b1 is the maximum value of the distribution range.

4. The method according to claim 1, characterized in that, Based on the optimal neural network, the image to be tested is processed, including: The image to be tested is input into the data module of the optimal neural network to obtain an intermediate image corresponding to the first target image; The intermediate image is input into the prior module of the optimal neural network to obtain the final image corresponding to the third target image.

5. The method according to claim 4, characterized in that, The image to be tested is input into the data module of the optimal neural network, and an intermediate image corresponding to the first target image is obtained according to the following formula: The formula for the data module is: ; Where y represents the intermediate image, k represents the number of iterations of the optimal neural network, D represents the data module, x represents the x-coordinate of the pixel position of the target foreground region, s represents the scale factor of the intermediate image, F represents the blur kernel of the intermediate image, and v represents the first hyperparameter.

6. The method according to claim 5, characterized in that, The intermediate image is input into the prior module of the optimal neural network, and the final image corresponding to the third target image is obtained according to the following formula: The formula for the prior module: ; Where x represents the final image, k represents the number of iterations of the optimal neural network, P represents the prior module, y represents the intermediate image, and ω represents the second hyperparameter.

7. The method according to claim 6, characterized in that, Before placing the image to be tested into the data module of the optimal neural network, the process includes: Hyperparameter modules are pre-defined in the optimal neural network; The formulas for the hyperparameter module include: ; Where v represents the first hyperparameter, ω represents the second hyperparameter, and H represents the hyperparameter module. The parameter represents the noise level of the optimal neural network, and s represents the scaling parameter of the optimal neural network.

8. An image processing apparatus, characterized in that, include: The global enhancement and denoising module is used to perform global enhancement and global denoising on the original image to obtain the first target image; The local enhancement module is used to determine multiple connected regions contained in the target foreground region based on the grayscale value of the target foreground region in the first target image. Among the plurality of connected regions, a connected region whose area is greater than the area of ​​the target foreground region by a specific percentage is determined as the first target connected region; Enhance the grayscale value of the first target connected region to obtain the second target image; A local denoising module is used to determine multiple connected regions contained in the target foreground region based on the grayscale value of a pre-set target background region in the second target image; among the multiple connected regions, a connected region with an area smaller than the area of ​​the target background region by a specific percentage is determined as a second target connected region; the grayscale value of the second target connected region is enhanced to obtain a third target image; The neural network training module is used to train the original neural network based on the original image and the third target image to obtain the optimal neural network; The image processing module is used to process the image to be tested according to the optimal neural network.