Image processing method, device, electronic device and storage medium
Through frequency domain transformation processing and discrete cosine transform technology, the low-frequency area of the image is identified to improve the recognition accuracy of the moving area, solving the problem of inaccurate identification of the moving area in the existing technology and achieving a clearer image processing effect.
Patent Information
- Application Number
- CN202110989348.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-26
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2041-08-26
AI Technical Summary
Existing image denoising technology does not have high recognition accuracy in moving areas, especially due to the similarity between image edges and noise, which results in poor denoising effects in moving areas.
By dividing the image to be processed into image blocks and performing frequency domain transformation processing, the low-frequency area of the discrete cosine transform result is used to identify the moving area, avoiding edge and noise interference, and improving the recognition accuracy.
It effectively improves the recognition accuracy of moving areas, reduces noise interference, and enhances image clarity.
Smart Images

Figure CN113643210B
Abstract
Description
Technical Field
[0001] The present application relates to image processing technology, and in particular to an image processing method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the development of electronic equipment technology, people have higher and higher requirements for image clarity. Image denoising technology has become a key research direction in the field of computer vision, and a variety of image denoising technologies have emerged, such as spatial fusion denoising and transform domain fusion denoising. However, since some image denoising technologies rely on the similarity between images, the denoising effect on moving areas is not good. At present, moving areas are identified from images and targeted denoising is performed on moving areas. However, the current recognition accuracy of moving areas is not high. Therefore, improving the accuracy of identifying moving areas from images has become a problem that needs to be solved urgently. Summary of the invention
[0003] The embodiments of the present application provide an image processing method, device, electronic device and computer-readable storage medium, which can improve the accuracy of identifying motion areas from images.
[0004] An image processing method, comprising:
[0005] Acquire more than one image to be processed; the more than one image to be processed includes the target moving object;
[0006] Dividing more than one image to be processed into more than one image block respectively, performing frequency domain transformation processing on the image block of each image to be processed, and obtaining each frequency domain transformation image composed of the frequency domain transformation image blocks; each frequency domain transformation image corresponds to each image to be processed one by one;
[0007] Determine the position of the target image block located in the predetermined low-frequency area in each frequency domain transformed image;
[0008] For each target image block position, determining the correlation degree of the motion region corresponding to the target image block position according to the difference between the frequency domain transformation data corresponding to each frequency domain transformation image at the target image block position;
[0009] According to the correlation degree of the motion regions respectively corresponding to the target image block positions, the target motion region corresponding to the target motion object is obtained from the image regions respectively corresponding to the target image block positions in the images to be processed.
[0010] An image processing device, comprising:
[0011] An acquisition module, used for acquiring more than one image to be processed; the more than one image to be processed includes a target moving object;
[0012] A frequency domain transformation module, used for dividing more than one image to be processed into more than one image block, performing frequency domain transformation processing on the image block of each image to be processed, and obtaining each frequency domain transformation image composed of the frequency domain transformation image blocks; each of the frequency domain transformation images corresponds to each of the images to be processed one by one;
[0013] A determination module, used to determine the position of a target image block located in a predetermined low-frequency area in each frequency domain transformed image;
[0014] A calculation module, for determining, for each target image block position, a correlation degree of a motion region corresponding to the target image block position according to a difference between frequency domain transformation data corresponding to each frequency domain transformation image at the target image block position;
[0015] The identification module is used to obtain the target motion area corresponding to the target motion object from the image areas corresponding to the target image block positions in the images to be processed according to the correlation degree of the motion areas corresponding to the target image block positions.
[0016] An electronic device includes a memory and a processor, wherein a computer program is stored in the memory, and wherein when the computer program is executed by the processor, the processor executes the steps of the above-mentioned image processing method.
[0017] A computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the above-mentioned image processing method when executed by a processor.
[0018] The above-mentioned image processing method, device, electronic device and computer-readable storage medium divide more than one image to be processed into more than one image block respectively, perform frequency domain transformation processing on the image block of each image to be processed, obtain each frequency domain transformation image composed of frequency domain transformation image blocks, determine the target image block position located in a predetermined low-frequency area in each frequency domain transformation image, for each target image block position, determine the correlation degree of the motion area corresponding to the target image block position according to the difference between each frequency domain transformation data corresponding to each frequency domain transformation image at the target image block position, and obtain the target motion area corresponding to the target motion object from the image area corresponding to each target image block position in each image to be processed according to the correlation degree of the motion area respectively corresponding to each target image block position. Since the frequency domain transformation result can be distinguished into a low-frequency area and a medium-high frequency area, the edge and noise of the image are concentrated in the medium-high frequency area, and most of the information of the image is concentrated in the low-frequency area, identifying the motion area from the low-frequency area can avoid the interference of the edge and noise of the image on the motion area identification, and improve the accuracy of the motion area identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 is a schematic flow chart of an image processing method in one embodiment;
[0021] Figure 2 A schematic diagram of dividing more than one image to be processed in one embodiment;
[0022] Figure 3 is a schematic diagram of more than one frequency domain transformed image in one embodiment;
[0023] Figure 4 is a schematic diagram of an image processing method in one embodiment;
[0024] Figure 5 is a schematic diagram of an image processing method in another embodiment;
[0025] Figure 6 A schematic diagram of a process of obtaining a mask image in one embodiment;
[0026] Figure 7 is a schematic flow chart of an image processing method in another embodiment;
[0027] Figure 8 A schematic diagram of a process for obtaining a mask image in another embodiment;
[0028] Fig. 9 is a structural block diagram of an image processing device in one embodiment;
[0029] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] In one embodiment, Figure 1As shown, an image processing method is provided. This embodiment takes the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0032] Step 102, obtaining more than one image to be processed; the more than one image to be processed includes a target moving object.
[0033] Among them, the image to be processed is an image processed by the method provided in the embodiment of the present application. Specifically, the target motion area corresponding to the target motion object is identified from more than one image to be processed, so that the target motion area can be targetedly denoised to reduce the noise existing in the motion area of the image.
[0034] In one embodiment, the terminal shoots the target moving object in the real scene to obtain more than one image to be processed containing the target moving object. The terminal can shoot the target moving object in the real scene, or can shoot a video containing the target moving object in the real scene. In other embodiments, the terminal reads more than one image to be processed containing the target moving object from the local storage, or extracts more than one image to be processed containing the target moving object from the video, and so on.
[0035] In one embodiment, the terminal continuously shoots a target moving object in a real scene for multiple times, and uses each shot image as an image to be processed. Through the method provided in the embodiment of the present application, the terminal respectively identifies the target motion area corresponding to the target moving object from more than one image to be processed, and performs targeted denoising processing on the target motion area in each image to be processed to obtain more than one denoised image, and uses each denoised image as the final output captured image, thereby reducing the noise existing in the target motion area and improving the clarity of multiple captured images.
[0036] In one embodiment, the terminal shoots a target moving object in a real scene once to obtain more than one original image, and the more than one original image is used to generate a captured image corresponding to this shooting, and the original image is used as an image to be processed. Specifically, the terminal continuously transmits more than one light spot signal to the target moving object, receives more than one light spot signal reflected by the target moving object, and obtains more than one image to be processed corresponding to this shooting according to the more than one light spot signal reflected by the target moving object. Through the method provided in the embodiment of the present application, the terminal respectively identifies the target motion area corresponding to the target moving object from more than one image to be processed, performs targeted denoising on the target motion area in each image to be processed, obtains more than one denoised image, and determines the final output captured image according to each denoised image, thereby reducing the noise in the target motion area and improving the clarity of the captured image this time.
[0037] In one embodiment, the terminal takes a photo of a target moving object in a real scene, obtains more than one original image, performs fusion denoising on the more than one original image, and uses the original image after fusion denoising as the image to be processed. Through the method provided in the embodiment of the present application, the terminal identifies the target motion area corresponding to the target moving object from more than one image to be processed, performs secondary denoising on the target motion area in each image to be processed, reduces the residual noise in the target motion area in each image to be processed, and improves the clarity of the image captured this time.
[0038] In one embodiment, more than one to-be-processed image includes target moving objects, and the number of the target moving objects may be one or at least two.
[0039] Step 104, divide more than one image to be processed into more than one image block respectively, perform frequency domain transformation processing on the image block of each image to be processed, and obtain each frequency domain transformed image composed of the frequency domain transformed image blocks; each of the frequency domain transformed images corresponds to each of the images to be processed one by one.
[0040] The image block of the image to be processed is a collection of more than one pixel. The frequency domain transformation processing can adopt a general frequency domain transformation strategy. The frequency domain transformation image is the result obtained after the frequency domain transformation processing is performed on the image to be processed.
[0041] In one embodiment, the frequency domain transform process may be a discrete cosine transform process. Discrete cosine transform (DCT) is used to transform a spatial domain signal into a frequency domain. The frequency domain transform image is the result obtained after performing discrete cosine transform on the image to be processed, and is used to show the distribution of discrete cosine transform coefficient energy in the image to be processed.
[0042] Since the edges and noise of an image are similar to those of a moving area, they will interfere with the identification of a moving area. Considering that the edges and noise of an image are concentrated in the mid-high frequency area of a discrete cosine transform result, most of the information of the image is concentrated in the low frequency area of a discrete cosine transform result, and the low frequency area of a discrete cosine transform result has a specific position, the present application identifies a moving area from the low frequency area of a discrete cosine transform result, thereby avoiding the interference of the edges and noise of an image on the identification of a moving area and improving the accuracy of the identification of a moving area.
[0043] In one embodiment, the terminal divides more than one image to be processed into image blocks of the same number and size, for example, each image to be processed is divided into 8*8 image blocks, 16*16 image blocks, etc. After dividing more than one image to be processed into image blocks of the same number and size, the positions of the image blocks of each image to be processed correspond to each other. Figure 2 , Figure 2 A schematic diagram of dividing more than one image to be processed in one embodiment is shown. It can be seen that the terminal divides each image to be processed A1, A2, ...An into 8*8 image blocks, and for one of the image block positions 202, each image to be processed A1, A2, ...An has a corresponding image block at the image block position 202.
[0044] In one embodiment, the terminal divides more than one image to be processed into image blocks of the same number and size, and the image contents corresponding to the same image block positions in the images to be processed match. It can be understood that the image contents corresponding to the same image block positions in the images to be processed match, which means that the image contents corresponding to the same image block positions in the images to be processed are the same, or the image content differences are within a specified difference range.
[0045] In one embodiment, the terminal obtains more than one image to be processed, extracts a reference image from each image to be processed, and uses the images other than the reference image in each image to be processed as the remaining images. The terminal uses the reference image as a basis to perform image alignment processing on each remaining image, and divides each processed image to be processed into more than one image block. The image alignment processing is used to align more than one image according to the image content. The terminal can use a general image alignment strategy to perform local alignment processing and / or global alignment processing on each image to be processed, and the general image alignment strategy is, for example, a scale-invariant feature transform (SIFT) algorithm.
[0046] In one embodiment, the terminal obtains more than one image to be processed, screens each image to be processed, and divides the screened images to be processed into more than one image block. Optionally, the terminal obtains image parameters corresponding to each image to be processed, and screens images whose image parameters meet predetermined image parameter conditions from each image to be processed. The image parameters may be brightness and / or sharpness, etc., so as to eliminate images to be processed with abnormal brightness and / or sharpness.
[0047] In one embodiment, the terminal divides each image to be processed into more than one image block, performs discrete cosine transform processing on the image block of each image to be processed, and obtains each frequency domain transform image composed of frequency domain transform image blocks, and each frequency domain transform image corresponds to each image to be processed one by one. It can be understood that each frequency domain transform image matches the number of image blocks of the corresponding image to be processed. For example, if the image to be processed is divided into 8*8 image blocks, the frequency domain transform image corresponding to the image to be processed is also an 8*8 frequency domain transform image block.
[0048] In one embodiment, the image blocks of the frequency domain transformation images corresponding to the images to be processed correspond to each other. Figure 3 , Figure 3 A schematic diagram showing more than one frequency domain transformed image in one embodiment is shown, Figure 3 Each frequency domain transformed image can be Figure 2 The images to be processed are obtained by performing discrete cosine transform processing. It can be seen that each frequency domain transform image B1, B2, ... Bn has an 8*8 frequency domain transform image block, and for one of the image block positions 302, each frequency domain transform image B1, B2, ... Bn has a corresponding frequency domain transform image block at the image block position 302.
[0049] It should be noted that the image block content of each frequency domain transform image is different from that of the corresponding image to be processed. For example, the image block content of the frequency domain transform image can be the energy of discrete cosine transform coefficients, and the image block content of the image to be processed is image information. In addition, although the number of image blocks of each frequency domain transform image matches that of the corresponding image to be processed, the corresponding relationship between the image block positions of the frequency domain transform image and the corresponding image to be processed is not limited in this application. Figure 2 and Figure 3, taking the image A1 to be processed and the frequency domain transformed image B1 corresponding to the image A1 to be processed as an example, the corresponding relationship between the image block position 202 in the image A1 to be processed and the image block position 302 of the frequency domain transformed image B1 is not limited in this application. Therefore, the image area corresponding to the image block position 302 of the frequency domain transformed image B1 mentioned below in the image A1 to be processed is not the image block corresponding to the image block position 202 of the image A1 to be processed, but the image area obtained by performing inverse discrete cosine transform (IDCT, Inverse Discrete Cosine Transform) on the image block corresponding to the image block position 302 of the frequency domain transformed image B1. Inverse discrete cosine transform is to restore the discrete cosine transform result.
[0050] Step 106: determine the position of the target image block located in the predetermined low-frequency area in each frequency domain transformed image.
[0051] Since the low-frequency area of the discrete cosine transform result is usually concentrated in the upper left corner, the terminal can obtain the target image block position located in the predetermined low-frequency area in each frequency domain transform image according to the position information of each image block position in each frequency domain transform image. Figure 3 , assuming that the predetermined low-frequency area is area 304, then the image block position falling into area 304 is the target image block position.
[0052] Step 108 : for each target image block position, determine the correlation degree of the motion region corresponding to the target image block position according to the difference between the frequency domain transformation data corresponding to each frequency domain transformation image at the target image block position.
[0053] The frequency domain transformation data may be discrete cosine transform coefficient energy. The motion region correlation degree is used to describe the possibility that the image region corresponding to the position of the target image block in the image to be processed is a motion region.
[0054] In one embodiment, for each target image block position, the terminal determines the correlation degree of the motion region corresponding to the target image block position according to the difference between the frequency domain transformation data corresponding to each frequency domain transformation image at the target image block position. Figure 3 Taking the target image block position b1 as an example, the terminal obtains the correlation degree of the motion area corresponding to the target image block position b1 according to the difference between the frequency domain transformation data of each frequency domain transformation image B1, B2, ...Bn corresponding to the target image block position b1.
[0055] In one embodiment, for each target image block position, the difference between each frequency domain transformation data corresponding to each frequency domain transformation image at the target image block position can reflect, to a certain extent, the possibility that the image region corresponding to the target image block position in each to-be-processed image is a motion region. In an ideal case, the greater the difference between each frequency domain transformation data corresponding to each frequency domain transformation image at the target image block position, the greater the difference between the image regions corresponding to the target image block position in each to-be-processed image, and the higher the possibility that the image region corresponding to the target image block position in each to-be-processed image belongs to a motion region.
[0056] In one embodiment, a correlation relationship between the difference between frequency domain transformation data and the degree of correlation of motion regions is preset, and the terminal obtains the difference between each frequency domain transformation data corresponding to each frequency domain transformation image at the target image block position, and determines the degree of correlation of motion regions corresponding to the target image block position according to the preset correlation relationship.
[0057] In one embodiment, the terminal extracts a reference image from more than one image to be processed, and uses the images other than the reference image in the more than one image to be processed as the residual images. The terminal obtains the difference between the frequency domain transformation data of the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to each residual image at the target image block position, and uses the mean value or the sum of the differences between the reference image and each residual image as the difference between each frequency domain transformation data corresponding to each frequency domain transformation image at the target image block position.
[0058] Step 110 , according to the correlation degree of the motion regions respectively corresponding to the target image block positions, a target motion region corresponding to the target motion object is obtained from the image regions respectively corresponding to the target image block positions in the images to be processed.
[0059] The target motion area is at least a part of the motion area where the target motion object is located.
[0060] In one embodiment, the target motion region is used to indicate denoising. The terminal can identify the target motion region corresponding to the target motion object from the image regions corresponding to the target image block positions in the images to be processed, according to the correlation between the motion regions corresponding to the target image block positions, thereby performing targeted denoising on the target motion region.
[0061] In one embodiment, for one of the target image block positions, the terminal performs inverse discrete cosine transform processing on the image blocks corresponding to the target image block position of each frequency domain transformed image to obtain image regions corresponding to the target image block position in each to-be-processed image. Figure 2 and Figure 3For the target image block position b1, the terminal performs inverse discrete cosine transform processing on the image block of the frequency domain transformed image B1 corresponding to the target image block position b1, and can obtain the image area corresponding to the target image block position b1 in the image to be processed A1.
[0062] The image processing method in this embodiment divides more than one image to be processed into more than one image block, performs frequency domain transformation processing on the image blocks of each image to be processed, obtains each frequency domain transformation image composed of frequency domain transformation image blocks, determines the target image block position located in a predetermined low-frequency area in each frequency domain transformation image, and for each target image block position, determines the correlation degree of the motion area corresponding to the target image block position according to the difference between each frequency domain transformation data corresponding to each frequency domain transformation image at the target image block position, and obtains the target motion area corresponding to the target motion object from the image area corresponding to each target image block position in each image to be processed according to the correlation degree of the motion area corresponding to each target image block position. Since the frequency domain transformation result can be distinguished into a low-frequency area and a medium-high frequency area, the edge and noise of the image are concentrated in the medium-high frequency area, and most of the information of the image is concentrated in the low-frequency area, identifying the motion area from the low-frequency area can avoid the interference of the edge and noise of the image on the motion area identification, and improve the accuracy of the motion area identification.
[0063] In one embodiment, the correlation degree of the motion area is a mask value; the method further includes: generating mask images corresponding to each target image block position according to the mask values corresponding to each target image block position; marking the image area corresponding to the corresponding target image block position in each image to be processed through the mask image; and denoising the image area marked by each mask image in each image to be processed according to the mask values corresponding to each mask image.
[0064] Among them, the mask image is used to mark a specific image area in the image to be processed so as to isolate the image area marked by the mask image. For example, when the image to be processed is input as a whole, the terminal only processes the image area marked by the mask image, and does not process the image area not marked by the mask image.
[0065] In one embodiment, for each target image block position, the terminal determines the mask value corresponding to the target image block position based on the difference between the frequency domain transformation data corresponding to the target image block position of each frequency domain transformation image, generates mask images corresponding to each target image block position according to the mask values corresponding to each target image block position, annotates the image area corresponding to the corresponding target image block position in each image to be processed through the mask image, and performs denoising on the image area annotated by each mask image in each image to be processed according to the mask values corresponding to each mask image.
[0066] In one embodiment, the terminal determines the denoising strength corresponding to each mask image according to the mask value corresponding to each mask image, and performs denoising on the image area marked by each mask image in each image to be processed according to the denoising strength corresponding to each mask image. Optionally, the mask value is proportional to the denoising strength.
[0067] For example, see Figure 4 , Figure 4 : is a schematic diagram of an image processing method in an embodiment. Taking the image A1 to be processed and the frequency domain transformation image B1 corresponding to the image A1 to be processed as examples, the terminal determines each target image block position 402 located in a predetermined low-frequency area from the frequency domain transformation image B1, generates a mask image corresponding to each target image block position 402 according to the mask value corresponding to each target image block position 402, and marks the image area 404 corresponding to each target image block position 402 in the image A1 to be processed through the mask image. The denoising intensity corresponding to each image area 404 is different. It can be understood that since the denoising intensity corresponding to each image area 404 is determined by the mask value corresponding to each mask image, and the mask value can reflect the possibility that the image area is a motion area, the denoising intensity of the motion area is higher than the denoising intensity of the non-motion area.
[0068] In this embodiment, mask images corresponding to the target image block positions are generated according to the mask values corresponding to the target image block positions, so that when denoising is performed on the image areas marked by each mask image in each image to be processed according to the mask values corresponding to each mask image, a denoising intensity higher than that of the non-moving area can be provided for the moving area, thereby reducing the noise existing in the moving area and improving the clarity of the image.
[0069] In one embodiment, according to the correlation degree of the motion regions corresponding to the target image block positions, the target motion region corresponding to the target motion object is obtained from the image regions corresponding to the target image block positions in the images to be processed, including: according to the correlation degree of the motion regions corresponding to the target image block positions, the motion region image block positions are extracted from the target image block positions; and the image regions corresponding to the motion region image block positions in the images to be processed are used as the target motion region corresponding to the target motion object.
[0070] In one embodiment, the terminal selects target image block positions whose motion region correlations satisfy a predetermined condition from the target image block positions according to the motion region correlations corresponding to the target image block positions, and uses the motion region image block positions in the image regions corresponding to the images to be processed as the target motion regions corresponding to the target motion objects. Optionally, when the motion region correlation is greater than a predetermined threshold, it is determined that the motion region correlation satisfies the predetermined condition.
[0071] In one embodiment, the terminal screens out motion area image block positions whose motion area correlation degrees meet predetermined conditions from each target image block position according to the motion area correlation degrees corresponding to each target image block position, and performs targeted denoising on the target motion area by marking the corresponding motion area image block positions in the target motion area corresponding to each image to be processed through a mask image.
[0072] For example, see Figure 5 , Figure 5 Schematic diagram of an image processing method in an embodiment. Taking the image A1 to be processed and the frequency domain transformation image B1 corresponding to the image A1 to be processed as examples, the terminal screens out each motion region image block position 502 from the frequency domain transformation image B1, and annotates the corresponding motion region image block position 502 in the target motion region 504 corresponding to the image A1 to be processed through the mask image, so as to perform targeted denoising on each target motion region 504.
[0073] It can be understood that the terminal can use a general denoising strategy to perform denoising on the target motion area, such as spatial denoising, temporal denoising, fusion denoising, etc.
[0074] In this embodiment, the motion area image block positions whose motion area correlation degree meets the predetermined conditions are extracted from each target image block position, and the corresponding motion area image block positions are marked in the target motion area corresponding to each image to be processed through the mask image, so as to perform targeted denoising on the motion area, reduce the noise existing in the motion area, and improve the clarity of the image.
[0075] In one embodiment, the method further includes: determining the denoising strength corresponding to each motion area image block position according to the motion area correlation degree corresponding to each motion area image block position; the motion area correlation degree is proportional to the denoising strength; and denoising the target motion area obtained from each image to be processed according to the denoising strength corresponding to each motion area image block position.
[0076] In one embodiment, the terminal selects the motion region image block positions whose motion region correlations meet the predetermined conditions from the target image block positions according to the motion region correlations corresponding to the target image block positions, and generates the mask images corresponding to the motion region image block positions according to the motion region correlations corresponding to the motion region image block positions. Optionally, the motion region correlations corresponding to the motion region image block positions are used as the mask values corresponding to the motion region image block positions.
[0077] In one embodiment, the terminal marks the position of the corresponding motion region image block in the target motion region corresponding to each to-be-processed image through the mask image, determines the denoising intensity corresponding to the mask image according to the mask value of the mask image, and performs denoising on the target motion region marked by the mask image according to the denoising intensity corresponding to the mask image. Optionally, the mask value is proportional to the denoising intensity.
[0078] In this embodiment, motion region image block positions whose motion region correlation degrees meet predetermined conditions are extracted from each target image block position, and mask images corresponding to each motion region image block position are generated according to the motion region correlation degrees corresponding to each motion region image block position. The corresponding motion region image block positions are annotated in the target motion region corresponding to each image to be processed through the mask image, so that denoising processes of different denoising degrees are performed on the target motion regions annotated by each mask image according to the mask values corresponding to each mask image, thereby reducing the noise existing in the motion region and improving the clarity of the image.
[0079] The following is an introduction to the steps of obtaining the correlation degree of the motion region corresponding to each target image block position. Optionally, the correlation degree of the motion region corresponding to each target image block position may be a mask value corresponding to each target image block position, and a mask image corresponding to each target image block position may be generated based on the mask value corresponding to each target image block position.
[0080] In one embodiment, for each target image block position, the correlation degree of the motion region corresponding to the target image block position is determined based on the difference between each frequency domain transformation data corresponding to each frequency domain transformation image at the target image block position, including: extracting a reference image from more than one image to be processed, and using images other than the reference image in the more than one image to be processed as residual images; for each target image block position, obtaining the difference between the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to each residual image at each frequency domain transformation data corresponding to the target image block position; and determining the correlation degree of the motion region corresponding to the target image block position based on the difference.
[0081] In one embodiment, the terminal extracts a reference image from more than one image to be processed, uses the images other than the reference image in the more than one image to be processed as the remaining images, obtains the difference between the frequency domain transformation data corresponding to the target image block position of the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to the remaining images, and determines the correlation degree of the motion region corresponding to the target image block position according to the difference. Optionally, the difference is proportional to the correlation degree of the motion region corresponding to the target image block position.
[0082] In one embodiment, for each target image block position, the terminal obtains the difference between the frequency domain transformation data of the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to each remaining image at the target image block position, and determines the degree of correlation of the motion area corresponding to the target image block position based on the mean value or the sum of the differences.
[0083] For example, continue to refer to Figure 2 and Figure 3 Taking the target image block position b1 as an example, the terminal uses the image A1 to be processed as a reference image, and sequentially obtains the difference between the frequency domain transformation image B1 corresponding to the image A1 to be processed and the frequency domain transformation images corresponding to the remaining images (i.e., the image A2 to be processed...the image An to be processed) at the target image block position b1, and determines the correlation degree of the motion area corresponding to the target image block position b1 according to the mean value or the sum of the differences.
[0084] In one embodiment, determining the correlation degree of the motion region corresponding to the target image block position based on the difference includes: determining the correlation degree of the motion region corresponding to the target image block position between the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to the residual images based on the difference between the frequency domain transformation data corresponding to the target image block position at the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to the residual images; determining the correlation degree of the motion region corresponding to the target image block position based on the correlation degree of the motion region corresponding to the target image block position between the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to the residual images.
[0085] In one embodiment, the terminal determines the degree of correlation between the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to each residual image at the target image block position based on the difference between the frequency domain transformation data corresponding to the target image block position and the frequency domain transformation image corresponding to each residual image; determines the degree of correlation between the motion area corresponding to the target image block position based on the degree of correlation between the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to each residual image at the target image block position.
[0086] For example, continue to refer to Figure 2 and Figure 3Taking the target image block position b1 as an example, the terminal uses the image A1 to be processed as a reference image, obtains the difference between the frequency domain transformation data of the frequency domain transformation image B1 corresponding to the image A1 to be processed and the frequency domain transformation image B2 corresponding to the image A2 to be processed at the target image block position b1, and determines the correlation degree of the motion region corresponding to the target image block position b1 between the frequency domain transformation image B1 and the frequency domain transformation image B2 according to the difference; determines the correlation degree of the motion region corresponding to the target image block position b1 according to the correlation degree of the motion region corresponding to the frequency domain transformation image B1 and the frequency domain transformation images corresponding to each of the remaining images (i.e., the image A2 to be processed...the image An to be processed) at the target image block position b1.
[0087] In one embodiment, determining the correlation degree of the motion region between the frequency domain transform image corresponding to the reference image and the frequency domain transform images corresponding to the residual images at the target image block position according to the difference between the frequency domain transform image corresponding to the reference image and the frequency domain transform images corresponding to the residual images at the target image block position comprises: determining the motion region correlation weight between the frequency domain transform image corresponding to the reference image and the frequency domain transform images corresponding to the residual images at the target image block position according to the difference between the frequency domain transform image corresponding to the reference image and the frequency domain transform images corresponding to the residual images at the target image block position; determining the motion region correlation degree between the frequency domain transform image corresponding to the reference image and the frequency domain transform images corresponding to the residual images at the target image block position according to the motion region correlation weight between the frequency domain transform image corresponding to the reference image and the frequency domain transform images corresponding to the residual images at the target image block position.
[0088] In one embodiment, the correlation degree of the motion region corresponding to the target image block position of any two frequency domain transformed images can be calculated by the following formula:
[0089]
[0090] Among them, mask represents the correlation degree of the motion area corresponding to the position of the target image block between any two frequency domain transformed images; weight represents the correlation weight of the motion area corresponding to the position of the target image block between any two frequency domain transformed images; Indicates the stretching factor, which is used to describe the degree of stretching of the data size and can be 32.
[0091] In one embodiment, the motion region correlation weights of any two frequency domain transformed images corresponding to the target image block position can be calculated by the following formula:
[0092]
[0093] Among them, weight represents the relevant weight of the motion area corresponding to any two frequency domain transform images at the target image block position; diff represents the difference in frequency domain transform data corresponding to any two frequency domain transform images at the target image block position; γ represents the noise level of any two frequency domain transform images. Optionally, the terminal determines the amount of noise contained in any two frequency domain transform images according to a general noise evaluation strategy, and determines the noise level of any two frequency domain transform images according to the mapping relationship between the noise amount and a preset noise amount and noise level.
[0094] In one embodiment, determining the correlation degree of the motion region corresponding to the target image block position according to the correlation degree of the motion region corresponding to the target image block position between the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to each residual image, includes: summing the correlation degrees of the motion region corresponding to the target image block position between the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to each residual image, to obtain the correlation degree of the motion region corresponding to the target image block position.
[0095] In one embodiment, referring to Figure 6 , Figure 6 This is a flow chart of obtaining a mask image in one embodiment. It can be seen that the terminal determines the target image block position located in a predetermined low-frequency area. For each target image block position, the terminal obtains the mask value corresponding to the frequency domain transformation image corresponding to the reference image and the frequency domain transformation image corresponding to the first residual image at the target image block position, and then obtains the mask value corresponding to the frequency domain transformation image corresponding to the reference image and the frequency domain transformation image corresponding to the next residual image at the target image block position, until the mask value corresponding to the frequency domain transformation image corresponding to the reference image and the frequency domain transformation image corresponding to each residual image at the target image block position is obtained, and the sum of the mask values corresponding to the frequency domain transformation image corresponding to the reference image and the frequency domain transformation image corresponding to each residual image at the target image block position is used as the mask value corresponding to the target image block position. According to the mask values corresponding to each target image block position, a mask image corresponding to each target image block position is generated.
[0096] In this embodiment, the correlation degree of the motion area corresponding to the target image block position is determined based on the difference between the frequency domain transformation data corresponding to the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to the remaining images at the target image block position, which can accurately reflect the possibility that the image area corresponding to the target image block position in the image to be processed is a motion area.
[0097] In one embodiment, determining the target image block position in each frequency domain transformed image that is located in a predetermined low-frequency area includes: determining position information of an image block position that corresponds to each frequency domain transformed image; determining predetermined position information corresponding to the predetermined low-frequency area; and when the position information of the image block position belongs to the predetermined position information, determining that the image block position belongs to the target image block position.
[0098] Since the low-frequency area of the discrete cosine transform result is usually concentrated in the upper left corner, the terminal can obtain the target image block position located in the predetermined low-frequency area in each frequency domain transform image according to the position information of each image block in each frequency domain transform image.
[0099] For example, continue to refer to Figure 3 Assuming that the predetermined low-frequency region is region 304, the terminal obtains the position information of each image block position in region 304, determines the predetermined position information corresponding to the predetermined low-frequency region, and when the position information of the image block position belongs to the predetermined position information, determines that the image block position belongs to the target image block position. Optionally, the position information may be coordinate values in the x direction and the y direction.
[0100] In one embodiment, the terminal sets a predetermined image block position, obtains the distance between the position information of the image block position in each frequency domain transformed image and the position information of the predetermined image block position, and uses the image block position whose distance is less than the predetermined threshold as the target image block position. The predetermined image block position may be the lowest frequency image block position. For example, assuming that the position information of the predetermined image block position is (0,0), the predetermined threshold is 3, the distance between the image block position (0,1) and the image block position (1,0) and the predetermined image block position (0,0) is 1, the image block position (0,1) and the image block position (1,0) are the target image block positions, and the distance between the image block position (4,0) and the predetermined image block position (0,0) is 4, and the image block position (4,0) is not the target image block position. In this embodiment, since the low-frequency region of the discrete cosine transform result has a specific position, identifying the motion region from the low-frequency region of the discrete cosine transform result can avoid the interference of the edge and noise of the image on the motion region identification, and improve the accuracy of the motion region identification.
[0101] In one embodiment, obtaining more than one image to be processed includes: obtaining more than one image to be processed from the fusion denoising processing result; the method also includes: according to the correlation degree of the motion areas corresponding to the target image block positions, obtaining the target motion area corresponding to the target motion object from the image areas corresponding to the target image block positions in the preprocessed images; performing secondary denoising on each target motion area.
[0102] In one embodiment, the terminal takes a picture of a target moving object in a real scene, obtains more than one original image, performs fusion denoising on the more than one original image, and uses the original image after fusion denoising as the image to be processed. Through the method provided in the embodiment of the present application, the terminal identifies the target motion area corresponding to the target moving object from more than one image to be processed, performs secondary denoising on the target motion area in each image to be processed, obtains the denoised image corresponding to each image to be processed, and determines the final output captured image based on each denoised image, thereby reducing the residual noise in the target motion area and improving the clarity of the captured image.
[0103] In one embodiment, Figure 7 As shown, an image processing method is provided. This embodiment takes the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0104] Step 702, obtaining more than one image to be processed after fusion denoising, wherein the more than one image to be processed includes the target moving object; extracting a reference image from the more than one image to be processed, and using the images other than the reference image in the more than one image to be processed as the remaining images.
[0105] In one embodiment, the terminal shoots a target moving object in a real scene once to obtain more than one original image, performs fusion denoising on the more than one original image, and uses the original image after fusion denoising as the image to be processed.
[0106] Step 704, divide more than one image to be processed into more than one image block respectively, perform discrete cosine transform processing on the image block of each image to be processed, and obtain each frequency domain transformed image composed of frequency domain transformed image blocks; each of the frequency domain transformed images corresponds to each of the images to be processed one by one.
[0107] Step 706, determining the position information of the image block position corresponding to each frequency domain transformed image; determining the predetermined position information corresponding to the predetermined low-frequency area; when the position information of the image block position belongs to the predetermined position information, determining that the image block position belongs to the target image block position.
[0108] Step 708, for each target image block position, obtain the difference between the frequency domain transformation data corresponding to the target image block position of the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to the residual images; determine the motion region correlation weights of the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to the residual images at the target image block position according to the difference between the frequency domain transformation data corresponding to the target image block position of the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to the residual images; determine the mask values corresponding to the target image block position of the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to the residual images according to the motion region correlation weights corresponding to the target image block position of the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to the residual images.
[0109] Step 710, summing up the mask values corresponding to the target image block positions of the frequency domain transform image corresponding to the reference image and the frequency domain transform images corresponding to each residual image, to obtain the mask values corresponding to the target image block positions; and generating mask images corresponding to each target image block position according to the mask values corresponding to each target image block position.
[0110] Step 712: annotate the corresponding target image block position in the image area corresponding to each image to be processed by the mask image; and perform secondary denoising on the image area annotated by each mask image in each image to be processed according to the mask value corresponding to each mask image. Figure 8 , Figure 8 The figure is a flow chart of obtaining a mask image in an embodiment. It can be seen that the terminal extracts a reference image from more than one image to be processed, uses the image other than the reference image in the more than one image to be processed as the remaining image, performs image alignment processing on each remaining image based on the reference image, divides each processed image to be processed into more than one image block, performs discrete cosine transform processing on the image block of each image to be processed, obtains the frequency domain transformation image corresponding to each image to be processed, determines the target image block position located in the predetermined low-frequency area in each frequency domain transformation image, determines the mask value corresponding to the target image block position according to the difference between each frequency domain transformation data corresponding to each frequency domain transformation image at the target image block position, and generates the mask image corresponding to each target image block position according to the mask value corresponding to each target image block position.
[0111] Specifically, after performing secondary denoising on the image areas marked by each mask image in each image to be processed, denoised images corresponding to each image to be processed are obtained, and the final output captured image is determined based on each denoised image, thereby reducing the residual noise in the target motion area and improving the clarity of the captured image.
[0112] This embodiment can not only identify the motion area, but also avoid the phenomenon of ghosting in the motion area, thereby improving the noise reduction uniformity and noise reduction strength in the motion area. This embodiment is applied to an independent image processing chip of a shooting device and has an obvious positive effect.
[0113] In the image processing method of the present embodiment, more than one image to be processed is divided into more than one image block respectively, and the image blocks of each image to be processed are subjected to frequency domain transformation processing to obtain each frequency domain transformation image composed of frequency domain transformation image blocks, and the target image block position located in the predetermined low-frequency area in each frequency domain transformation image is determined. For each target image block position, the correlation degree of the motion area corresponding to the target image block position is determined according to the difference between the frequency domain transformation data corresponding to the target image block position of each frequency domain transformation image, and the target motion area corresponding to the target motion object is obtained from the image area corresponding to each target image block position in each image to be processed according to the correlation degree of the motion area respectively corresponding to each target image block position. Since the frequency domain transformation result can be distinguished into a low-frequency area and a medium-high frequency area, the edge and noise of the image are concentrated in the medium-high frequency area, and most of the information of the image is concentrated in the low-frequency area, the motion area is identified from the low-frequency area, which can avoid the interference of the edge and noise of the image on the motion area identification, and improve the accuracy of the motion area identification, and the target motion area is used to indicate the denoising process, and the targeted denoising process is performed on the motion area, which can reduce the noise in the motion area and improve the clarity of the image.
[0114] It should be understood that although Figure 2 , Figure 7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 , Figure 7 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0115] Fig. 9 FIG. 1 is a structural block diagram of an image processing device according to an embodiment. Fig. 9As shown, an image processing device is provided. The device can adopt a software module or a hardware module, or a combination of the two to become a part of a computer device. The device specifically includes: an acquisition module 902, a frequency domain transformation module 904, a determination module 906, a calculation module 908 and an identification module 910, wherein:
[0116] An acquisition module 902 is used to acquire more than one image to be processed; the more than one image to be processed includes a target moving object;
[0117] The frequency domain transformation module 904 is used to divide more than one image to be processed into more than one image block, perform frequency domain transformation processing on the image block of each image to be processed, and obtain each frequency domain transformation image composed of the frequency domain transformation image blocks; each frequency domain transformation image corresponds to each image to be processed one by one;
[0118] A determination module 906, configured to determine a position of a target image block located in a predetermined low-frequency region in each frequency domain transformed image;
[0119] A calculation module 908, for determining, for each target image block position, a correlation degree of a motion region corresponding to the target image block position according to a difference between frequency domain transformation data corresponding to each frequency domain transformation image at the target image block position;
[0120] The identification module 910 is used to obtain the target motion region corresponding to the target motion object from the image regions corresponding to the target image block positions in the images to be processed.
[0121] In one embodiment, the correlation degree of the motion area is a mask value; the image processing device also includes a mask image generation module, a mask image annotation module and a denoising module, the mask image generation module is used to: generate mask images corresponding to each target image block position according to the mask values corresponding to each target image block position; the mask image annotation module is used to: annotate the image area corresponding to the corresponding target image block position in each image to be processed through the mask image; the denoising module is used to: perform denoising on the image area annotated by each mask image in each image to be processed according to the mask values corresponding to each mask image.
[0122] In one embodiment, the identification module 910 is also used to: extract the motion area image block position from each target image block position according to the correlation degree of the motion area corresponding to each target image block position; and use the image area corresponding to the motion area image block position in each image to be processed as the target motion area corresponding to the target motion object.
[0123] In one embodiment, the denoising module is also used to: determine the denoising strength corresponding to each motion area image block position according to the motion area correlation degree corresponding to each motion area image block position; the motion area correlation degree is proportional to the denoising strength; according to the denoising strength corresponding to each motion area image block position, denoising is performed on the target motion area obtained from each image to be processed.
[0124] In one embodiment, the calculation module 908 is further used to: extract a reference image from more than one image to be processed, and use the images other than the reference image in the more than one image to be processed as residual images; for each target image block position, obtain the difference between the frequency domain transformation image corresponding to the reference image and the frequency domain transformation image corresponding to each residual image at each frequency domain transformation data corresponding to the target image block position; and determine the correlation degree of the motion area corresponding to the target image block position based on the difference.
[0125] In one embodiment, the calculation module 908 is further used to: determine the degree of correlation between the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to each residual image at the target image block position according to the difference between each frequency domain transformation data corresponding to the target image block position at the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to each residual image; determine the degree of correlation between the motion area corresponding to the target image block position according to the degree of correlation between the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to each residual image at the target image block position.
[0126] In one embodiment, the calculation module 908 is further used to: determine the motion region correlation weights of the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to the residual images at the target image block position according to the differences between the frequency domain transformation data corresponding to the target image block position of the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to the residual images; determine the degree of correlation of the motion region of the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to the residual images at the target image block position according to the motion region correlation weights of the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to the residual images at the target image block position.
[0127] In one embodiment, the calculation module 908 is further used to: sum the correlation degrees of the motion regions corresponding to the target image block positions of the frequency domain transformation images corresponding to the reference image and the frequency domain transformation images corresponding to the residual images, to obtain the correlation degrees of the motion regions corresponding to the target image block positions.
[0128] In one embodiment, the determination module 906 is further used to: determine the position information of the image block position corresponding to each frequency domain transformed image; determine the predetermined position information corresponding to the predetermined low-frequency area; when the position information of the image block position belongs to the predetermined position information, determine that the image block position belongs to the target image block position.
[0129] In one embodiment, the acquisition module 902 is also used to: acquire more than one image to be processed from the fusion denoising processing result; the denoising module is also used to: obtain the target motion area corresponding to the target motion object from the image areas corresponding to each target image block position in each preprocessed image according to the correlation degree of the motion areas corresponding to each target image block position; and perform secondary denoising on each target motion area.
[0130] For the specific definition of the image processing device, please refer to the definition of the image processing method above, which will not be repeated here. Each module in the above image processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0131] The image processing device in this embodiment divides more than one image to be processed into more than one image block, performs frequency domain transformation processing on the image blocks of each image to be processed, obtains each frequency domain transformation image composed of frequency domain transformation image blocks, determines the target image block position located in a predetermined low-frequency area in each frequency domain transformation image, and for each target image block position, determines the correlation degree of the motion area corresponding to the target image block position according to the difference between each frequency domain transformation data corresponding to each frequency domain transformation image at the target image block position, and obtains the target motion area corresponding to the target motion object from the image area corresponding to each target image block position in each image to be processed according to the correlation degree of the motion area corresponding to each target image block position. Since the frequency domain transformation result can be distinguished into a low-frequency area and a medium-high frequency area, the edge and noise of the image are concentrated in the medium-high frequency area, and most of the information of the image is concentrated in the low-frequency area, identifying the motion area from the low-frequency area can avoid the interference of the edge and noise of the image on the motion area identification, and improve the accuracy of the motion area identification.
[0132] The division of the modules in the above-mentioned image processing device is only for illustration. In other embodiments, the image processing device may be divided into different modules as needed to complete all or part of the functions of the above-mentioned image processing device.
[0133] Fig.10 FIG. 1 is a schematic diagram of the internal structure of an electronic device in one embodiment. Fig.10As shown, the electronic device includes a processor and a memory connected via a system bus. The processor is used to provide computing and control capabilities to support the operation of the entire electronic device. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement an image processing method provided in each of the following embodiments. The internal memory provides a cached operating environment for the operating system computer program in the non-volatile storage medium. The electronic device can be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, etc.
[0134] The implementation of each module in the image processing device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. The program module constituted by the computer program may be stored in a memory of an electronic device. When the computer program is executed by a processor, the steps of the method described in the embodiment of the present application are implemented.
[0135] The embodiment of the present application further provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, enable the processors to perform the steps of the image processing method.
[0136] A computer program product comprising instructions, when executed on a computer, causes the computer to perform an image processing method.
[0137] Any reference to memory, storage, database or other medium used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0138] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An image processing method, characterized in that: include: Obtain more than one image to be processed; The more than one images to be processed include a target moving object; Dividing the more than one image to be processed into more than one image block respectively, performing frequency domain transformation processing on the image block of each image to be processed, and obtaining each frequency domain transformation image composed of the frequency domain transformation image blocks; each frequency domain transformation image corresponds to each image to be processed one by one; Determining the position of the target image block located in the predetermined low-frequency area in each of the frequency domain transformed images; Extract a reference image from the more than one image to be processed, and use the images other than the reference image in the more than one image to be processed as residual images; for each target image block position, obtain the difference between the frequency domain transformation image corresponding to the reference image and the frequency domain transformation image corresponding to each residual image at each frequency domain transformation data corresponding to the target image block position; Determine the correlation degree of the motion region corresponding to the position of the target image block according to the difference; According to the correlation degree of the motion regions respectively corresponding to the target image block positions, the target motion region corresponding to the target motion object is obtained from the image regions respectively corresponding to the target image block positions in the images to be processed.
2. The method according to claim 1, characterized in that The motion region correlation degree is a mask value; the method further includes: Generating mask images corresponding to the positions of the target image blocks according to the mask values corresponding to the positions of the target image blocks; Marking the position of the corresponding target image block in the image area corresponding to each of the images to be processed by using the mask image; According to the mask values respectively corresponding to the mask images, denoising processing is performed on the image regions marked by the mask images in the images to be processed.
3. The method according to claim 1, characterized in that The step of obtaining the target motion region corresponding to the target motion object from the image regions corresponding to the target image block positions in the images to be processed includes: Extracting the motion region image block position from each of the target image block positions according to the correlation degree of the motion regions respectively corresponding to each of the target image block positions; The image area corresponding to each of the to-be-processed images is located at the motion area image block as the target motion area corresponding to the target motion object.
4. The method according to claim 3, characterized in that The method further comprises: Determining the denoising strength corresponding to each of the motion region image block positions according to the motion region correlation degree corresponding to each of the motion region image block positions; the motion region correlation degree is proportional to the denoising strength; According to the denoising strengths respectively corresponding to the positions of the image blocks in the motion regions, denoising processing is performed on the target motion regions obtained from the images to be processed.
5. The method according to claim 1, characterized in that The step of determining the correlation degree of the motion region corresponding to the position of the target image block according to the difference comprises: Determine the degree of correlation between the motion region corresponding to the target image block position between the frequency domain transform image corresponding to the reference image and the frequency domain transform image corresponding to each of the residual images according to differences between the frequency domain transform data corresponding to the target image block position between the frequency domain transform image corresponding to the reference image and the frequency domain transform image corresponding to each of the residual images; The correlation degree of the motion region corresponding to the target image block position is determined according to the correlation degree of the motion region corresponding to the target image block position between the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to each of the residual images.
6. The method according to claim 5, characterized in that The determining, based on differences between the frequency domain transformation data corresponding to the target image block position and the frequency domain transformation images corresponding to the reference image, respectively, and the frequency domain transformation images corresponding to the residual images, respectively, the degree of correlation between the motion regions corresponding to the target image block position and the frequency domain transformation images corresponding to the residual images, respectively, comprises: Determine the motion region correlation weights of the frequency domain transform image corresponding to the reference image and the frequency domain transform images corresponding to the residual images at the target image block position according to differences between the frequency domain transform data corresponding to the target image block and the frequency domain transform images corresponding to the residual images; The degree of correlation between the frequency domain transformed image corresponding to the reference image and the frequency domain transformed images corresponding to each of the residual images and the motion region corresponding to the target image block position is determined according to the correlation weights between the frequency domain transformed image corresponding to the reference image and the motion region corresponding to the target image block position with the frequency domain transformed images corresponding to each of the residual images.
7. The method according to claim 5, characterized in that Determining the correlation degree of the motion region corresponding to the target image block position according to the correlation degree of the frequency domain transformation image corresponding to the reference image and the frequency domain transformation images corresponding to each of the residual images at the motion region corresponding to the target image block position comprises: The correlation degree of the motion region corresponding to the target image block position is obtained by summing the correlation degree of the frequency domain transformed image corresponding to the reference image and the frequency domain transformed image corresponding to each of the residual images.
8. The method according to claim 1, characterized in that: The determining the position of the target image block located in the predetermined low-frequency area in each of the frequency domain transformed images comprises: Determine the position information of the image block position commonly corresponding to each of the frequency domain transformed images; Determining predetermined position information corresponding to the predetermined low-frequency area; When the position information of the image block position belongs to the predetermined position information, it is determined that the image block position belongs to the target image block position.
9. The method according to claim 1, characterized in that: The acquiring more than one image to be processed comprises: Obtaining more than one image to be processed from the fused denoising process result; The method further comprises: According to the correlation degree of the motion regions respectively corresponding to the target image block positions, obtaining the target motion region corresponding to the target motion object from the image regions respectively corresponding to the target image block positions in the images to be processed; A secondary denoising process is performed on each of the target motion regions.
10. The method according to claim 1, characterized in that The target motion area is used to indicate that a denoising process is to be performed.
11. An image processing device, characterized in that: include: An acquisition module, used for acquiring more than one image to be processed; The more than one images to be processed include a target moving object; A frequency domain transformation module, used for dividing the more than one image to be processed into more than one image block respectively, performing frequency domain transformation processing on the image block of each of the images to be processed, and obtaining each frequency domain transformation image composed of the frequency domain transformation image blocks; each of the frequency domain transformation images corresponds to each of the images to be processed one by one; A determination module, used to determine the position of a target image block located in a predetermined low-frequency area in each of the frequency domain transformed images; A calculation module, configured to extract a reference image from the more than one image to be processed, and use the images other than the reference image in the more than one image to be processed as residual images; for each target image block position, obtain the difference between the frequency domain transformation image corresponding to the reference image and the frequency domain transformation image corresponding to each residual image at each frequency domain transformation data corresponding to the target image block position; Determine the correlation degree of the motion region corresponding to the position of the target image block according to the difference; The identification module is used to obtain the target motion area corresponding to the target motion object from the image areas corresponding to the target image block positions in the images to be processed according to the correlation degree of the motion areas corresponding to the target image block positions.
12. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the image processing method according to any one of claims 1 to 10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the image processing method according to any one of claims 1 to 10 are implemented.
14. A computer program product comprising instructions, characterized in that: When the computer program product is executed on a computer, the computer is caused to execute the steps of the image processing method according to any one of claims 1 to 10.
