Image processing method, device and equipment and computer readable storage medium
By using the previous frame image filtered by time domain as a reference image, the image to be processed is fused with area filtering and single-point pixel points, which solves the problem of high time domain noise in image processing and improves the accuracy and efficiency of time domain filtering.
Patent Information
- Application Number
- CN202510165060.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-05-27
AI Technical Summary
During the image processing process, the time domain noise is high, resulting in large image fluctuations. The existing technology lacks mature image processing methods, resulting in poor accuracy and efficiency of time domain filtering.
The previous frame image filtered in the time domain is used as the reference image of the latest frame to be processed. The pixel points in the preset image area are filtered by determining the area filter value, and the reference pixel points of the target pixel point are fused to the target pixel point, thereby fully using the internal information of the previous frame image for time domain filtering.
It improves the accuracy and efficiency of time domain filtering, can better filter out time domain noise and improve image quality.
Smart Images

Figure CN120047319A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular, to an image processing method, apparatus, device, and computer-readable storage medium. Background Art
[0002] During the image processing, the temporal noise in the image sensing data output by the sensor is very large. After being converted into an image, it is manifested as large fluctuations in the image. Therefore, it is required to perform temporal filtering on the image to filter out the temporal noise therein. However, in the related art, there is a lack of a mature image processing method, resulting in poor accuracy and efficiency of temporal filtering.
[0003] Therefore, how to provide a solution to the above technical problems is an issue that those skilled in the art need to solve currently. Summary of the Invention
[0004] The purpose of the present invention is to provide an image processing method, apparatus, device, and computer-readable storage medium. The previous frame of image after temporal filtering is used as the reference image for the latest frame of the image to be processed. First, for any preset image region, according to the pixel values in the preset image region of the reference image and the pixel values in the preset image region of the image to be processed, the region filtering value corresponding to the preset image region is determined. Then, according to the region filtering value, the pixel points in the corresponding preset image region are filtered. Next, for any target pixel point in the image to be processed, the reference pixel point of the target pixel point can be fused to the target pixel point, so as to perform temporal filtering on the image to be processed comprehensively using the internal information of the previous frame of image from two dimensions of regional influence and single-point pixel influence, and only the previous frame of image is used, improving the accuracy and efficiency of temporal filtering.
[0005] To solve the above technical problems, the present invention provides an image processing method, including:
[0006] Obtain the previous frame of image after temporal filtering and use it as the reference image for the latest frame of the image to be processed;
[0007] For any preset image region, according to the pixel values in the preset image region of the reference image and the pixel values in the preset image region of the image to be processed, determine the region filtering value corresponding to the preset image region, where the image to be processed and the reference image have the same size, and the image to be processed and the reference image are divided into multiple preset image regions;
[0008] For any preset image region in the image to be processed, filter each pixel point in the preset image region according to the region filtering value corresponding to the preset image region;
[0009] For any target pixel point in the image to be processed, fuse the pixel value of the target pixel point with the pixel value of the reference pixel point of the target pixel point, and use the fused pixel value as the latest pixel value of the target pixel point, where each pixel point in the image to be processed is a target pixel point, and the reference pixel point of the target pixel point is: the pixel point at the same position as the target pixel point in the reference image.
[0010] On the other hand, for any preset image region, determining the region filtering value corresponding to the preset image region according to the pixel values in the preset image region of the reference image and the pixel values in the preset image region of the image to be processed includes:
[0011] For any preset image region, determine the reference difference of each target pixel point in the preset image region of the image to be processed, where the reference difference of the target pixel point is: the difference between the pixel values of the target pixel point and its reference pixel point;
[0012] For any preset image region, determine the region filtering value corresponding to the preset image region according to the average value of the reference differences of each target pixel point in the preset image region of the image to be processed.
[0013] On the other hand, for any preset image region, determining the region filtering value corresponding to the preset image region according to the average value of the reference differences of each target pixel point in the preset image region of the image to be processed includes:
[0014] For any preset image region, use the product of the average value of the reference differences of each target pixel point in the preset image region of the image to be processed and the first preset coefficient as the region filtering value corresponding to the preset image region;
[0015] For any preset image region in the image to be processed, filtering each pixel point in the preset image region according to the region filtering value corresponding to the preset image region includes:
[0016] For any preset image region in the image to be processed, add the region filtering value corresponding to the preset image region to the pixel value of each pixel point in the preset image region respectively to implement filtering of each pixel point in the preset image region.
[0017] On the other hand, the image processing method further includes:
[0018] In response to a modification instruction, modify the first preset coefficient.
[0019] On the other hand, obtaining the previous frame of image that has undergone time-domain filtering and using it as the reference image of the latest frame of the image to be processed includes:
[0020] Determine whether the image to be processed in the latest frame is the first frame image;
[0021] If so, skip the temporal filtering of the image to be processed, and use the image to be processed as the image after temporal filtering;
[0022] If not, obtain the previous frame image after temporal filtering, and use it as the reference image of the image to be processed in the latest frame.
[0023] On the other hand, for any target pixel point in the image to be processed, fusing the pixel value of the target pixel point and the pixel value of the reference pixel point of the target pixel point, and using the fused pixel value as the latest pixel value of the target pixel point includes:
[0024] For any target pixel point in the image to be processed, according to the second preset coefficient corresponding to the target pixel point and the third preset coefficient corresponding to the reference pixel point of the target pixel point, fuse the pixel value of the target pixel point and the pixel value of the reference pixel point of the target pixel point, and use the fused pixel value as the latest pixel value of the target pixel point.
[0025] On the other hand, for any target pixel point in the image to be processed, according to the second preset coefficient corresponding to the target pixel point and the third preset coefficient corresponding to the reference pixel point of the target pixel point, fusing the pixel value of the target pixel point and the pixel value of the reference pixel point of the target pixel point, and using the fused pixel value as the latest pixel value of the target pixel point includes:
[0026] For any target pixel point in the image to be processed, based on the second preset coefficient corresponding to the target pixel point and the third preset coefficient corresponding to the reference pixel point of the target pixel point, fuse the pixel value of the target pixel point and the pixel value of the reference pixel point of the target pixel point according to the first relational expression, and use the fused pixel value as the latest pixel value of the target pixel point;
[0027] The first relational expression includes:
[0028] A = (B * K2 + C * K3) / (K2 + K3);
[0029] Wherein, A is the fused pixel value, B is the pixel value of the target pixel point, C is the pixel value of the reference pixel point of the target pixel point, K2 is the second preset coefficient, and K3 is the third preset coefficient;
[0030] The image processing method further includes:
[0031] In response to a modification instruction, determine a target coefficient combination from a plurality of pre-stored coefficient combinations, where any coefficient combination includes a second preset coefficient and a third preset coefficient;
[0032] Use the second preset coefficient and the third preset coefficient in the target coefficient combination as the latest second preset coefficient and third preset coefficient.
[0033] To solve the above technical problems, the present invention provides an image processing apparatus, including:
[0034] A first acquisition module, configured to acquire the previous frame of image that has been filtered in the time domain and use it as a reference image for the latest frame of image to be processed;
[0035] A first determination module, configured to, for any preset image region, determine a region filtering value corresponding to the preset image region according to the pixel values in the preset image region of the reference image and the pixel values in the preset image region of the image to be processed, where the image to be processed and the reference image have the same size, and the image to be processed and the reference image are divided into a plurality of preset image regions;
[0036] A first filtering module, configured to, for any preset image region in the image to be processed, filter each pixel point in the preset image region according to the region filtering value corresponding to the preset image region;
[0037] A first action module, configured to, for any target pixel point in the image to be processed, fuse the pixel value of the target pixel point and the pixel value of the reference pixel point of the target pixel point, and use the fused pixel value as the latest pixel value of the target pixel point, where each pixel point in the image to be processed is a target pixel point, and the reference pixel point of the target pixel point is: the pixel point at the same position as the target pixel point in the reference image.
[0038] To solve the above technical problems, the present invention provides an image processing device, including:
[0039] A memory, configured to store a computer program;
[0040] A processor, configured to implement the steps of the above image processing method when executing the computer program.
[0041] To solve the above technical problems, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above image processing method are implemented.
[0042] Beneficial effects: The present invention provides an image processing method. Considering that (1) there is a strong correlation between the latest frame of the image to be processed and the previous frame of the image that has been processed by time-domain filtering, and (2) the internal information of the previous frame of the image can be comprehensively referred to from the aspects of regional influence and single-point pixel influence, the present invention uses the previous frame of the image that has been processed by time-domain filtering as the reference image for the latest frame of the image to be processed. First, for any preset image region, according to the pixel values in the preset image region of the reference image and the pixel values in the preset image region of the image to be processed, the regional filtering value corresponding to the preset image region is determined. Then, the pixel points in the corresponding preset image region are filtered according to the regional filtering value. Next, for any target pixel point in the image to be processed, the reference pixel point of the target pixel point can be fused to the target pixel point, so as to comprehensively utilize the internal information of the previous frame of the image to perform time-domain filtering on the image to be processed from the two dimensions of regional influence and single-point pixel influence, and only the previous frame of the image is used, which improves the accuracy and efficiency of time-domain filtering.
[0043] The present invention also provides an image processing apparatus, device, and computer-readable storage medium, which have the same beneficial effects as the above image processing method. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the related technologies and embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0045] Figure 1 It is a schematic flowchart of an image processing method provided by the present invention;
[0046] Figure 2 It is a schematic flowchart of the second image processing method provided by the present invention;
[0047] Figure 3 It is a schematic flowchart of the third image processing method provided by the present invention;
[0048] Figure 4 It is a schematic flowchart of the fourth image processing method provided by the present invention;
[0049] Figure 5 It is a schematic structural diagram of an image to be processed provided by the present invention;
[0050] Figure 6 It is a schematic structural diagram of a reference image provided by the present invention;
[0051] Figure 7Structural schematic diagram of the image to be processed after regional filtering provided by the present invention;
[0052] Figure 8 Structural schematic diagram of the image to be processed after single-point filtering provided by the present invention;
[0053] Figure 9 Structural schematic diagram of an image processing device provided by the present invention;
[0054] Figure 10 Structural schematic diagram of an image processing device provided by the present invention;
[0055] Figure 11 Structural schematic diagram of a computer-readable storage medium provided by the present invention. Specific embodiments
[0056] The core of the present invention is to provide an image processing method, device, equipment and computer-readable storage medium. The previous frame of image after time-domain filtering is used as the reference image of the latest frame of the image to be processed. First, for any preset image area, according to the pixel values in the preset image area of the reference image and the pixel values in the preset image area of the image to be processed, the regional filtering value corresponding to the preset image area is determined. Then, the pixel points in the corresponding preset image area are filtered according to the regional filtering value. Next, for any target pixel point in the image to be processed, the reference pixel point of the target pixel point can be fused to the target pixel point, so as to comprehensively use the internal information of the previous frame of image to perform time-domain filtering on the image to be processed from two dimensions of regional influence and single-point pixel influence, and only the previous frame of image is used, improving the accuracy and efficiency of time-domain filtering.
[0057] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0058] Please refer to Figure 1 , Figure 1 Flow schematic diagram of an image processing method provided by the present invention. The image processing method includes:
[0059] S101: Obtain the previous frame of image after time-domain filtering and use it as the reference image of the latest frame of the image to be processed;
[0060] Specifically, considering the technical problems in the background art as described above, and also considering that (1) there is a strong correlation between the to-be-processed image of the latest frame and the previous frame image processed by time-domain filtering, and (2) the internal information of the previous frame image can be comprehensively referred to from the regional influence and the influence of single-point pixels, therefore, in the embodiments of the present invention, for the to-be-processed image of the latest frame, regional filtering and single-point pixel filtering in two dimensions are performed on the to-be-processed image through the previous frame image, so as to complete the time-domain filtering of the to-be-processed image. Therefore, in this step, first, the previous frame image that has undergone time-domain filtering is obtained and used as the reference image for the to-be-processed image of the latest frame, so as to obtain the data basis for the subsequent steps.
[0061] S102: For any preset image region, determine the region filtering value corresponding to the preset image region according to the pixel values in the preset image region of the reference image and the pixel values in the preset image region of the to-be-processed image, where the to-be-processed image and the reference image have the same size, and the to-be-processed image and the reference image are divided into multiple preset image regions;
[0062] Specifically, considering that the pixels in a single region of the reference image have strong correlation, therefore, in the embodiments of the present invention, the image is pre-divided into regions, and the to-be-processed image and the reference image are divided into multiple preset image regions. In order to utilize the regional information in each preset image region of the reference image and retain the regional information of the to-be-processed image in the preset image region, in this step, for any preset image region, the region filtering value corresponding to the preset image region can be determined according to the pixel values in the preset image region of the reference image and the pixel values in the preset image region of the to-be-processed image, so as to use it as the data basis for the subsequent steps.
[0063] Among them, the regional division of the to-be-processed image can be understood as the regional division of the pixel point matrix of the to-be-processed image, and the division result is applicable to any image processed by this image processing method. There can be multiple regional division schemes, and two specific examples are provided here:
[0064] The first regional division scheme: When both the number of row pixels and the number of column pixels of the to-be-processed image can be divided evenly, the to-be-processed image is divided into multiple preset image regions of the same size. The size of the three preset image regions is M*N, where M is the number of row pixels of the preset image region and N is the number of column pixels of the preset image region. The number of row pixels of the to-be-processed image can be divided evenly by M, and the number of column pixels of the to-be-processed image can be divided evenly by N.
[0065] Specifically, in the first region division scheme, since the image to be processed is evenly divided into multiple preset image regions with a size of M*N, the regularity and efficiency of region division are improved. Since each preset image region is rectangular, it can better reflect the regional characteristics of the image.
[0066] Second region division scheme: Each row of the image to be processed is used as a preset image region. For example, when the image has X rows, each row is used as a preset image region, then the image has X preset image regions. This region division scheme is simpler and more efficient, and can also reflect the regional characteristics of the image.
[0067] Of course, in addition to the above two region division schemes, the region division scheme can also be of other multiple types, which are not limited in the embodiments of the present invention.
[0068] S103: For any preset image region in the image to be processed, filter each pixel point in the preset image region according to the region filter value corresponding to the preset image region;
[0069] Specifically, after having the region filter values of each preset image region, for any preset image region in the image to be processed, filter each pixel point in the preset image region according to the region filter value corresponding to the preset image region, that is, the region filtering of the image to be processed is realized, so that the pixel points of the image to be processed incorporate the regional information of the previous frame of image.
[0070] S104: For any target pixel point in the image to be processed, fuse the pixel value of the target pixel point and the pixel value of the reference pixel point of the target pixel point, and use the fused pixel value as the latest pixel value of the target pixel point, where each pixel point in the image to be processed is a target pixel point, and the reference pixel point of the target pixel point is: the pixel point at the same position as the target pixel point in the reference image.
[0071] Specifically, considering that there is a strong correlation between pixel points at the same position in two adjacent frames of images, in order to be able to incorporate the characteristics of single pixel points of each pixel point in the previous frame of image, in this step, for any target pixel point in the image to be processed, fuse the pixel value of the target pixel point and the pixel value of the reference pixel point of the target pixel point, and use the fused pixel value as the latest pixel value of the target pixel point, thereby realizing the combination of the single pixel characteristics of the image to be processed, which can be called single-point filtering.
[0072] Specifically, for better illustration of the embodiments of the present invention, please refer to Figures 2 to 4 , Figure 2 which is a schematic flowchart of the second image processing method provided by the present invention, Figure 3Schematic flowchart of the third image processing method provided by the present invention Figure 4 Schematic flowchart of the fourth image processing method provided by the present invention. S102 and S103 can be referred to as region filtering, S104 can be referred to as single-point filtering, and the overall region filtering and single-point filtering can be regarded as time-domain filtering. As shown by Figure 3 shown, the filtered image after time-domain filtering can be directly used as the reference image for the next frame of the image to be processed. As shown by Figure 4 shown, assuming that "each row of the image to be processed is regarded as a preset image region", then in order to improve the processing efficiency of single-point filtering, when performing region filtering on a certain row of the image to be processed, the pixel values of the pixel points in this row of the reference image can be cached (that is, the row cache in Figure 4 ), so as to improve the working efficiency when performing single-point filtering on this row subsequently.
[0073] The present invention provides an image processing method. Considering that (1) there is a strong correlation between the latest frame of the image to be processed and the previous frame of the image processed by time-domain filtering, and (2) the internal information of the previous frame of the image can be comprehensively referred to from the regional influence and the influence of single pixel points, the present invention uses the previous frame of the image processed by time-domain filtering as the reference image for the latest frame of the image to be processed. First, for any preset image region, according to the pixel values in the preset image region of the reference image and the pixel values in the preset image region of the image to be processed, the region filtering value corresponding to the preset image region is determined. Then, the pixel points in the corresponding preset image region are filtered according to the region filtering value. Next, for any target pixel point in the image to be processed, the reference pixel point of the target pixel point can be fused into the target pixel point, so as to comprehensively utilize the internal information of the previous frame of the image from two dimensions of regional influence and single pixel point influence to perform time-domain filtering on the image to be processed, and only the previous frame of the image is used, improving the accuracy and efficiency of time-domain filtering.
[0074] Based on the above embodiments:
[0075] As an optional embodiment, for any preset image region, determining the region filtering value corresponding to the preset image region according to the pixel values in the preset image region of the reference image and the pixel values in the preset image region of the image to be processed includes:
[0076] For any preset image region, determine the reference difference of each target pixel point in the preset image region of the image to be processed, where the reference difference of the target pixel point is the difference between the pixel values of the target pixel point and its reference pixel point;
[0077] For any preset image region, determine the region filtering value corresponding to the preset image region according to the average value of the reference differences of each target pixel point in the preset image region of the image to be processed.
[0078] Specifically, considering that in a single preset image region, the difference between the corresponding pixels at the same positions of the image to be processed and the reference image can intuitively reflect the information association between the image to be processed and the reference image within the preset image region. Therefore, in the embodiments of the present invention, for any preset image region, the reference difference of each target pixel in the preset image region of the image to be processed can be determined, and then according to the average value of the reference differences of each target pixel in the preset image region of the image to be processed, the region filtering value corresponding to the preset image region can be determined and used as the data basis for subsequent steps.
[0079] To better illustrate the embodiments of the present invention, please refer to Figure 5 and Figure 6 , Figure 5 which is a schematic structural diagram of an image to be processed provided by the present invention, Figure 6 and Figure 5 which is a schematic structural diagram of a reference image provided by the present invention. In , a[m][n] represents the pixel value of a single pixel of the image to be processed, m is the serial number of the pixel in the row, and n is the serial number of the pixel in the column. Figure 6 Similarly, in , b[m][n] represents the pixel value of a single pixel of the reference image, m is the serial number of the pixel in the row, and n is the serial number of the pixel in the column. Assuming that each row is used as a preset image region, then the average value of the reference differences of each target pixel in the first row, delta_avr_1 = ((b11 - a11) + (b12 - a12) + (b13 - a13) +... + (b1[n] - a1[n])) / n, and the average value of the reference differences of each target pixel in the m-th row, delta_avr_m = ((b[m]1 - a[m]1) + (b[m]2 - a[m]2) + (b[m]3 - a[m]3) +... + (b[m][n] - a[m][n])) / n.
[0080] As an optional embodiment, for any preset image region, determining the region filtering value corresponding to the preset image region according to the average value of the reference differences of each target pixel in the preset image region of the image to be processed includes:
[0081] For any preset image region, taking the product of the average value of the reference differences of each target pixel in the preset image region of the image to be processed and a first preset coefficient as the region filtering value corresponding to the preset image region;
[0082] For any preset image region in the image to be processed, filtering each pixel in the preset image region according to the region filtering value corresponding to the preset image region includes:
[0083] For any preset image region in the image to be processed, the region filtering value corresponding to the preset image region is respectively superimposed on the pixel values of each pixel point in the preset image region, so as to filter each pixel point in the preset image region.
[0084] Specifically, considering that although the average value of the reference differences of each target pixel point in the preset image region can reflect the regional characteristics of the reference image for the image to be processed, adjusting the "average value of the reference differences of each target pixel point in the preset image region" proportionally can further improve the accuracy of the "regional characteristics". Therefore, in the embodiments of the present invention, a first preset coefficient is set, and for any preset image region, the product of the average value of the reference differences of each target pixel point in the preset image region of the image to be processed and the first preset coefficient is used as the region filtering value corresponding to the preset image region.
[0085] Specifically, considering that the regional filtering of each target pixel point can be efficiently and accurately performed by means of numerical superposition, in the embodiments of the present invention, for any preset image region in the image to be processed, the region filtering value corresponding to the preset image region can be respectively superimposed on the pixel values of each pixel point in the preset image region, so as to filter each pixel point in the preset image region.
[0086] Among them, in order to better illustrate the embodiments of the present invention, please refer to Figure 7 , Figure 7 FIG.
[0087] As an alternative embodiment, the image processing method further includes:
[0088] In response to a modification instruction, modify the first preset coefficient.
[0089] Specifically, considering that the user has a need to modify the first preset coefficient, for the convenience of modification, a modification interface is provided in the embodiments of the present invention, that is, the first preset coefficient can be modified in response to a modification instruction.
[0090] As an alternative embodiment, obtaining the previous frame of image that has undergone time-domain filtering and using it as the reference image for the latest frame of the image to be processed includes:
[0091] Determine whether the latest frame of the image to be processed is the first frame of the image;
[0092] If so, skip the time-domain filtering of the image to be processed and use the image to be processed as the image that has undergone time-domain filtering;
[0093] If not, obtain the previous frame of image that has undergone time-domain filtering and use it as the reference image for the latest frame of the image to be processed.
[0094] Specifically, considering that there is no previous frame of image when processing the first frame of the image, in order to smoothly and efficiently complete the time-domain filtering of the first frame of the image, when obtaining the previous frame of image that has undergone time-domain filtering, it can be determined whether the latest frame of the image to be processed is the first frame of the image. If so, the time-domain filtering of the image to be processed can be skipped and the image to be processed can be used as the image that has undergone time-domain filtering.
[0095] Of course, in addition to this specific method, the processing methods for the first frame of the image to be processed can also be of many other types, which are not limited in the embodiments of the present invention.
[0096] As an alternative embodiment, for any target pixel point in the image to be processed, fusing the pixel value of the target pixel point with the pixel value of the reference pixel point of the target pixel point and using the fused pixel value as the latest pixel value of the target pixel point includes:
[0097] For any target pixel point in the image to be processed, according to the second preset coefficient corresponding to the target pixel point and the third preset coefficient corresponding to the reference pixel point of the target pixel point, fuse the pixel value of the target pixel point with the pixel value of the reference pixel point of the target pixel point and use the fused pixel value as the latest pixel value of the target pixel point.
[0098] Specifically, considering that when fusing the pixel values of the same-position pixel points of the image to be processed and the reference image, by setting corresponding coefficients for the two pixel values, the ratio between the two in the fusion process can be flexibly adjusted, so as to more flexibly and accurately achieve single-point filtering of pixel points. Therefore, in the embodiments of the present invention, for any target pixel point in the image to be processed, according to the second preset coefficient corresponding to the target pixel point and the third preset coefficient corresponding to the reference pixel point of the target pixel point, the pixel value of the target pixel point is fused with the pixel value of the reference pixel point of the target pixel point, and the fused pixel value is used as the latest pixel value of the target pixel point.
[0099] As an optional embodiment, for any target pixel point in the image to be processed, according to the second preset coefficient corresponding to the target pixel point and the third preset coefficient corresponding to the reference pixel point of the target pixel point, fusing the pixel value of the target pixel point with the pixel value of the reference pixel point of the target pixel point, and using the fused pixel value as the latest pixel value of the target pixel point includes:
[0100] For any target pixel point in the image to be processed, based on the second preset coefficient corresponding to the target pixel point and the third preset coefficient corresponding to the reference pixel point of the target pixel point, the pixel value of the target pixel point is fused with the pixel value of the reference pixel point of the target pixel point according to the first relational expression, and the fused pixel value is used as the latest pixel value of the target pixel point;
[0101] The first relational expression includes:
[0102] A = (B * K2 + C * K3) / (K2 + K3);
[0103] Wherein, A is the fused pixel value, B is the pixel value of the target pixel point, C is the pixel value of the reference pixel point of the target pixel point, K2 is the second preset coefficient, and K3 is the third preset coefficient;
[0104] The image processing method further includes:
[0105] In response to a modification instruction, a target coefficient combination is determined from a plurality of pre-stored coefficient combinations, wherein any coefficient combination includes a second preset coefficient and a third preset coefficient;
[0106] The second preset coefficient and the third preset coefficient in the target coefficient combination are used as the latest second preset coefficient and third preset coefficient.
[0107] Specifically, on the one hand, the embodiments of the present invention provide the first relational expression used in the single-point filtering process. Through this first relational expression, single-point filtering can be efficiently and accurately performed on each target pixel point of the image to be processed. For better illustration of the embodiments of the present invention, please refer to Figure 8 , Figure 8Schematic diagram of the image to be processed after single-point filtering provided by the present invention. d[m][n] represents the pixel value of a single pixel point of the image to be processed after single-point filtering. The single-point filtering process for each pixel point in the first row of the image to be processed is as follows:
[0108] d11 = (b11 * K2 + c11 * K3) / (K2 + K3), d12 = (b12 * K2 + c12 * K3) / (K2 + K3), d[m][n] = (b[m][n] * K2 + c[m][n] * K3) / (K2 + K3).
[0109] Specifically, considering that there may be a need to adjust the combination of the second preset coefficient and the third preset coefficient, in order to improve the flexibility of adjusting the "second preset coefficient and the third preset coefficient", multiple coefficient combinations are pre-stored in the embodiments of the present invention, and a target coefficient combination can be determined from the pre-stored multiple coefficient combinations in response to a modification instruction, and then the second preset coefficient and the third preset coefficient in the target coefficient combination are used as the latest second preset coefficient and the third preset coefficient.
[0110] Of course, in addition to this specific form, the second preset coefficient and the third preset coefficient can also be adjusted in other ways, which are not limited in the embodiments of the present invention.
[0111] Please refer to Figure 9 , Figure 9 Schematic diagram of a structure of an image processing device provided by the present invention. The image processing device includes:
[0112] A first acquisition module 91, configured to acquire the previous frame of image after time-domain filtering and use it as a reference image for the latest frame of the image to be processed;
[0113] A first determination module 92, configured to determine a region filtering value corresponding to a preset image region for any preset image region according to the pixel values in the preset image region of the reference image and the pixel values in the preset image region of the image to be processed, where the image to be processed and the reference image have the same size, and the image to be processed and the reference image are divided into multiple preset image regions;
[0114] A first filtering module 93, configured to filter each pixel point in a preset image region of the image to be processed according to the region filtering value corresponding to the preset image region.
[0115] The first action module 94 is configured to, for any target pixel point in the image to be processed, fuse the pixel value of the target pixel point with the pixel value of the reference pixel point of the target pixel point, and use the fused pixel value as the latest pixel value of the target pixel point. Herein, each pixel point in the image to be processed is a target pixel point, and the reference pixel point of the target pixel point is: the pixel point at the same position as the target pixel point in the reference image.
[0116] Based on the above embodiments:
[0117] As an optional embodiment, the first determination module 92 includes:
[0118] The first determination sub-module is configured to, for any preset image region, determine the reference difference of each target pixel point in the preset image region of the image to be processed. Herein, the reference difference of the target pixel point is: the difference between the pixel value of the target pixel point and the pixel value of its reference pixel point;
[0119] The second determination sub-module is configured to, for any preset image region, determine the region filtering value corresponding to the preset image region according to the average value of the reference differences of each target pixel point in the preset image region of the image to be processed.
[0120] As an optional embodiment, the second determination sub-module is specifically configured to:
[0121] For any preset image region, use the product of the average value of the reference differences of each target pixel point in the preset image region of the image to be processed and the first preset coefficient as the region filtering value corresponding to the preset image region;
[0122] The first filtering module 93 is specifically configured to:
[0123] For any preset image region in the image to be processed, respectively superimpose the region filtering value corresponding to the preset image region onto the pixel values of each pixel point in the preset image region to implement filtering of each pixel point in the preset image region.
[0124] As an optional embodiment, the image processing device further includes:
[0125] The first modification module is configured to modify the first preset coefficient in response to a modification instruction.
[0126] As an optional embodiment, the first acquisition module 91 includes:
[0127] The first judgment module is configured to judge whether the latest frame of the image to be processed is the first frame image. If so, trigger the second action module; if not, trigger the first acquisition sub-module;
[0128] The second action module is used to skip the time-domain filtering of the image to be processed and use the image to be processed as the image after time-domain filtering;
[0129] The first acquisition sub-module is used to acquire the previous frame image after time-domain filtering and use it as the reference image of the latest frame of the image to be processed.
[0130] As an optional embodiment, the first action module 94 is specifically configured to:
[0131] For any target pixel point in the image to be processed, according to the second preset coefficient corresponding to the target pixel point and the third preset coefficient corresponding to the reference pixel point of the target pixel point, fuse the pixel value of the target pixel point and the pixel value of the reference pixel point of the target pixel point, and use the fused pixel value as the latest pixel value of the target pixel point.
[0132] As an optional embodiment, the first action module 94 is specifically configured to:
[0133] For any target pixel point in the image to be processed, based on the second preset coefficient corresponding to the target pixel point and the third preset coefficient corresponding to the reference pixel point of the target pixel point, fuse the pixel value of the target pixel point and the pixel value of the reference pixel point of the target pixel point according to the first relational expression, and use the fused pixel value as the latest pixel value of the target pixel point;
[0134] The first relational expression includes:
[0135] A = (B * K2 + C * K3) / (K2 + K3);
[0136] Wherein, A is the fused pixel value, B is the pixel value of the target pixel point, C is the pixel value of the reference pixel point of the target pixel point, K2 is the second preset coefficient, and K3 is the third preset coefficient;
[0137] The image processing device further includes:
[0138] The second modification module is used to determine the target coefficient combination from a plurality of pre-stored coefficient combinations in response to a modification instruction, wherein any coefficient combination includes a second preset coefficient and a third preset coefficient;
[0139] The third modification module is used to use the second preset coefficient and the third preset coefficient in the target coefficient combination as the latest second preset coefficient and third preset coefficient.
[0140] For the introduction of the image processing device provided in the embodiments of the present invention, please refer to the embodiments of the foregoing image processing method, and the embodiments of the present invention will not be described in detail herein.
[0141] Please refer to Figure 10 , Figure 10Schematic structural diagram of an image processing device provided by the present invention. The image processing device includes:
[0142] A memory 101 for storing a computer program;
[0143] A processor 102 for implementing the steps of the above image processing method when executing the computer program.
[0144] For the introduction of the image processing device provided by the embodiments of the present invention, please refer to the embodiments of the foregoing image processing method, and the embodiments of the present invention will not be described herein again.
[0145] Please refer to Figure 11 , Figure 11 Schematic structural diagram of a computer-readable storage medium provided by the present invention. A computer program 112 is stored on the computer-readable storage medium 111, and when the computer program 112 is executed by a processor, the steps of the above image processing method are implemented.
[0146] For the introduction of the computer-readable storage medium provided by the embodiments of the present invention, please refer to the embodiments of the foregoing image processing method, and the embodiments of the present invention will not be described herein again.
[0147] The present invention also provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the steps of the image processing method in the foregoing embodiments are implemented.
[0148] For the introduction of the computer program product provided by the embodiments of the present invention, please refer to the embodiments of the foregoing image processing method, and the embodiments of the present invention will not be described herein again.
[0149] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description in the method part. It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0150] The foregoing description of the disclosed embodiments enables those skilled in the art to practice or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An image processing method, characterized in that: include: Obtain the previous frame of image after time domain filtering, and use it as a reference image for the latest frame of image to be processed; For any preset image area, determining a regional filtering value corresponding to the preset image area according to pixel values in the preset image area of the reference image and pixel values in the preset image area of the image to be processed, wherein the image to be processed and the reference image have the same size, and the image to be processed and the reference image are divided into a plurality of preset image areas; For any preset image area in the image to be processed, filtering each pixel point in the preset image area according to the regional filtering value corresponding to the preset image area; For any target pixel in the image to be processed, the pixel value of the target pixel is fused with the pixel value of the reference pixel of the target pixel, and the fused pixel value is used as the latest pixel value of the target pixel, wherein each pixel in the image to be processed is a target pixel, and the reference pixel of the target pixel is: the pixel in the reference image that has the same position as the target pixel.
2. The image processing method according to claim 1, characterized in that: For any preset image area, determining the regional filtering value corresponding to the preset image area according to the pixel values in the preset image area of the reference image and the pixel values in the preset image area of the image to be processed includes: For any preset image area, determining a reference difference value of each target pixel point in the preset image area of the image to be processed, wherein the reference difference value of the target pixel point is: a difference between the pixel values of the target pixel point and its reference pixel point; For any preset image area, a regional filtering value corresponding to the preset image area is determined according to an average value of reference difference values of each target pixel point in the preset image area of the image to be processed.
3. The image processing method according to claim 2, characterized in that: For any preset image area, determining the regional filtering value corresponding to the preset image area according to the average value of the reference difference values of each target pixel point in the preset image area of the image to be processed includes: For any preset image area, the product of the average value of the reference difference values of each target pixel point in the preset image area of the image to be processed and the first preset coefficient is used as the regional filtering value corresponding to the preset image area; For any preset image area in the image to be processed, filtering each pixel point in the preset image area according to the regional filtering value corresponding to the preset image area includes: For any preset image area in the image to be processed, the regional filtering value corresponding to the preset image area is superimposed on the pixel value of each pixel point in the preset image area to achieve filtering of each pixel point in the preset image area.
4. The image processing method according to claim 3, characterized in that: The image processing method further comprises: In response to the modification instruction, the first preset coefficient is modified.
5. The image processing method according to claim 1, characterized in that: Obtaining the previous frame of image after time domain filtering and using it as a reference image for the latest frame of image to be processed includes: Determine whether the latest frame of the image to be processed is the first frame; If yes, skip the time domain filtering of the image to be processed, and use the image to be processed as the image after the time domain filtering; If not, then the last frame of image that has been filtered in the time domain is obtained and used as a reference image for the latest frame of image to be processed.
6. The image processing method according to any one of claims 1 to 5, characterized in that: For any target pixel in the image to be processed, fusing the pixel value of the target pixel with the pixel value of the reference pixel of the target pixel, and using the fused pixel value as the latest pixel value of the target pixel includes: For any target pixel in the image to be processed, the pixel value of the target pixel and the pixel value of the reference pixel of the target pixel are fused according to the second preset coefficient corresponding to the target pixel and the third preset coefficient corresponding to the reference pixel of the target pixel, and the fused pixel value is used as the latest pixel value of the target pixel.
7. The image processing method according to claim 6, characterized in that: For any target pixel in the image to be processed, according to the second preset coefficient corresponding to the target pixel and the third preset coefficient corresponding to the reference pixel of the target pixel, fusing the pixel value of the target pixel with the pixel value of the reference pixel of the target pixel, and using the fused pixel value as the latest pixel value of the target pixel includes: For any target pixel in the image to be processed, based on the second preset coefficient corresponding to the target pixel and the third preset coefficient corresponding to the reference pixel of the target pixel, the pixel value of the target pixel and the pixel value of the reference pixel of the target pixel are fused according to the first relationship, and the fused pixel value is used as the latest pixel value of the target pixel; The first relational expression includes: A=(B*K2+C*K3) / (K2+K3); Wherein, A is the pixel value obtained by fusion, B is the pixel value of the target pixel, C is the pixel value of the reference pixel of the target pixel, K2 is the second preset coefficient, and K3 is the third preset coefficient; The image processing method further comprises: In response to the modification instruction, determining a target coefficient combination from a plurality of pre-stored coefficient combinations, wherein any coefficient combination includes a second preset coefficient and a third preset coefficient; The second preset coefficient and the third preset coefficient in the target coefficient combination are used as the latest second preset coefficient and the third preset coefficient.
8. An image processing device, characterized in that: include: A first acquisition module is used to acquire the previous frame of image that has been time-domain filtered and use it as a reference image for the latest frame of image to be processed; A first determination module is used to determine, for any preset image area, a regional filtering value corresponding to the preset image area according to pixel values in the preset image area of the reference image and pixel values in the preset image area of the image to be processed, wherein the image to be processed and the reference image have the same size, and the image to be processed and the reference image are divided into a plurality of preset image areas; A first filtering module, configured to filter each pixel point in any preset image area in the image to be processed according to a regional filtering value corresponding to the preset image area; The first action module is used to fuse the pixel value of any target pixel in the image to be processed with the pixel value of the reference pixel of the target pixel, and use the fused pixel value as the latest pixel value of the target pixel, wherein each pixel in the image to be processed is a target pixel, and the reference pixel of the target pixel is: the pixel in the reference image that has the same position as the target pixel.
9. An image processing device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the image processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the image processing method according to any one of claims 1 to 7 are implemented.