Image processing method, image processing device and computer storage medium

By calculating the motion values ​​of long and short frame images of the image sensor, distinguishing the strobe area and motion area, and selecting the appropriate frame image to generate the final image, the problem of CMOS image sensor strobeing under a specific light source is solved, and the image is improved quality.

CN118761937BActive Publication Date: 2024-12-06ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411249619.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-06
Estimated Expiration
2044-09-06

AI Technical Summary

Technical Problem

When CMOS image sensors use fluorescent lamps, LED lamps or fluorescent lamps, the image will have light and dark stripes and stripes rolling due to the alternation of the light source, which will affect the image quality.

Method used

By collecting long frame images and short frame images, the motion value of each pixel point is calculated, the motion area, strobe area and stationary area are determined, and the final image is selected based on these areas to generate the final image to suppress the strobe phenomenon.

Benefits of technology

Effectively distinguish and suppress strobe areas and moving areas, improve image quality, eliminate strobe phenomena in the image, and improve signal-to-noise ratio and visual perception.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118761937B_ABST
    Figure CN118761937B_ABST
Patent Text Reader

Abstract

The present application proposes an image processing method, an image processing device and a computer storage medium. The image processing method includes: acquiring a current long-frame image and a current short-frame image used to generate a current image, and acquiring a previous long-frame image; acquiring a first image motion degree based on the current long-frame image and the previous long-frame image; acquiring a second image motion degree based on the current long-frame image and the current short-frame image; acquiring a motion cumulative value of each pixel of the current image based on a first motion value and a second motion value of each pixel; determining a motion area, a stroboscopic area and a static area of ​​the current image according to the motion cumulative values ​​of all pixels of the current image; using the current short-frame image for the motion area and using the current long-frame image for the stroboscopic area to generate the final current image. Through the above-mentioned image processing method, the stroboscopic area and the motion area are distinguished, and the stroboscopic phenomenon of the image is suppressed through the characteristics of the long frame and the short frame, thereby improving the image quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, an image processing device and a computer storage medium. Background Art

[0002] Generally, the intensity change of natural light in nature can be regarded as basically stable in a short period of time, and the commonly used image acquisition sensor is CMOS (Complementary Metal Oxide Semiconductor) line-by-line exposure mode. When the CMOS image sensor acquires images or videos under natural light, the average exposure of two adjacent lines is basically the same, so there is basically no flicker phenomenon. However, for some commonly used fluorescent lamps, LED (light-emitting diode) lamps or fluorescent lamps, the power supply method is AC power supply and there is no rectifier inside the lamp. The output light source presents a sinusoidal AC conversion in a short period of time.

[0003] If the exposure time of the CMOS sensor is not an integer multiple of the light intensity cycle of the light source, the average exposure of two adjacent lines of the image will be different, which will be reflected in the image as light and dark stripes from top to bottom. And because the starting exposure time of two adjacent frames of images is not fixed, the stripes may roll in multiple consecutive frames, which has a great impact on the image effect. Summary of the invention

[0004] In order to solve the above technical problems, the present application proposes an image processing method, an image processing device and a computer storage medium.

[0005] In order to solve the above technical problems, the present application proposes an image processing method, which includes:

[0006] Acquiring a current long frame image and a current short frame image used to generate a current image, and acquiring a previous long frame image;

[0007] Based on the current long frame image and the previous long frame image, obtaining a first image motion degree, wherein the first image motion degree includes a first motion value of each pixel;

[0008] Based on the current long frame image and the current short frame image, acquiring a second image motion degree, wherein the second image motion degree includes a second motion value of each pixel;

[0009] Traversing each pixel of the current image, and acquiring a motion cumulative value of each pixel of the current image based on a first motion value and a second motion value of each pixel;

[0010] Determine a motion region, a stroboscopic region, and a static region of the current image according to the motion cumulative values ​​of all pixels of the current image;

[0011] The current short frame image is used for the motion area, and the current long frame image is used for the stroboscopic area and the static area to generate a final current image.

[0012] Wherein, acquiring the first image motion degree based on the current long frame image and the previous long frame image includes:

[0013] Acquire a first brightness image of the current long frame image and a second brightness image of the previous long frame image;

[0014] Acquire a first frame difference image based on a difference between the first brightness image and the second brightness image;

[0015] Based on the first frame difference map, the motion degree of the first image is obtained.

[0016] The acquiring the motion degree of the first image based on the first frame difference map includes:

[0017] Perform at least one scale of filtering on the first frame difference image to obtain a second frame difference image;

[0018] Performing weighted fusion on the first frame difference image and the second frame difference image to obtain a third frame difference image;

[0019] Based on the third frame difference map, the motion degree of the first image is obtained.

[0020] Wherein, the image processing method further includes:

[0021] Processing the first frame difference image using a first barycentric convolution kernel to obtain a first barycentric enhanced image;

[0022] Processing the first frame difference image using a second barycentric convolution kernel to obtain a second barycentric enhanced image;

[0023] Merging the first center-of-gravity enhanced image and the second center-of-gravity enhanced image to obtain an enhanced frame difference image;

[0024] Wherein, the weight change directions of the first barycentric convolution kernel and the second barycentric convolution kernel are different;

[0025] The acquiring the motion degree of the first image based on the third frame difference map includes:

[0026] Weightedly fusing the third frame difference image and the enhanced frame difference image to obtain a fourth frame difference image;

[0027] The step of obtaining the first image motion degree is based on the fourth frame difference map.

[0028] The traversing each pixel of the current image and acquiring the motion cumulative value of each pixel of the current image based on the first motion value and the second motion value of each pixel includes:

[0029] Acquire a plurality of continuous frames of historical images before the current image;

[0030] Obtaining the historical motion cumulative value of each pixel in the continuous multiple frames of historical images;

[0031] Traversing each pixel of the current image, traversing each pixel of the current image, and determining a motion detection value of each pixel based on a first motion value and a second motion value of each pixel;

[0032] The motion detection value is accumulated based on the historical motion accumulation value to obtain the motion accumulation value of each pixel point of the current image.

[0033] The step of determining the motion detection value of each pixel based on the first motion value and the second motion value of each pixel includes:

[0034] In response to the pixel point meeting a preset condition, determining a first motion detection value, wherein the first motion value is greater than a first threshold value, and the second motion value is less than a second threshold value;

[0035] In response to the pixel not meeting the preset condition, determining a second motion detection value;

[0036] The first motion detection value is an increasing value, and the second motion detection value is a decreasing value.

[0037] The absolute value of the first motion detection value is greater than the absolute value of the second motion detection value.

[0038] The step of determining the motion region, the stroboscopic region, and the static region of the current image according to the motion cumulative values ​​of all pixels of the current image includes:

[0039] In response to the motion cumulative value of the pixel point of the current image being greater than a preset cumulative threshold, performing an erosion operation based on the pixel point to expand and generate the stroboscopic area;

[0040] In response to the motion cumulative value of the pixel points of the current image being less than or equal to the preset cumulative threshold, taking the area formed by the pixel points as the motion area;

[0041] The area outside the stroboscopic area and the motion area in the current image is used as the static area.

[0042] In order to solve the above technical problems, the present application also proposes an image processing device, which includes a memory and a processor coupled to the memory; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the image processing method as described above.

[0043] In order to solve the above technical problems, the present application also proposes a computer storage medium, which is used to store program data. When the program data is executed by a computer, it is used to implement the above image processing method.

[0044] Compared with the prior art, the beneficial effects of the present application are as follows: the image processing device collects the current long frame image and the current short frame image used to generate the current image, and obtains the previous long frame image; based on the current long frame image and the previous long frame image, obtains the first image motion degree, wherein the first image motion degree includes the first motion value of each pixel; based on the current long frame image and the current short frame image, obtains the second image motion degree, wherein the second image motion degree includes the second motion value of each pixel; traverses each pixel of the current image, and based on the first motion value and the second motion value of each pixel, obtains the motion cumulative value of each pixel of the current image; according to the motion cumulative values ​​of all pixels of the current image, determines the motion area, stroboscopic area and static area of ​​the current image; uses the current short frame image for the motion area, and uses the current long frame image for the stroboscopic area and the static area to generate the final current image. Through the above-mentioned image processing method, the stroboscopic area and the motion area are distinguished, and the stroboscopic phenomenon of the image is suppressed by the characteristics of the long frame and the short frame, thereby improving the image quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work. Among them:

[0046] Figure 1 It is a flowchart of an embodiment of an image processing method provided by the present application;

[0047] Figure 2 It is a flowchart of the wide dynamic fusion local flicker detection and elimination technology provided by this application;

[0048] Figure 3 yes Figure 1The specific flow chart of step S12 of the image processing method shown;

[0049] Figure 4 is a functional schematic diagram of the motion detection algorithm module provided by this application;

[0050] Figure 5 yes Figure 1 The specific flow chart of step S14 of the image processing method shown;

[0051] Figure 6 is a functional schematic diagram of the flicker detection module provided by this application;

[0052] Figure 7 yes Figure 1 The specific flow chart of step S15 of the image processing method shown;

[0053] Figure 8 is a structural schematic diagram of an embodiment of an image processing device provided by the present application;

[0054] Fig. 9 It is a structural diagram of an embodiment of a computer storage medium provided by the present application. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0056] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0057] The image processing method of the present application is applied to the wide dynamic mode, which requires the cooperation of a digital image processor. For example, multiple exposure wide dynamic (also called multi-frame imaging wide dynamic) is to use an image sensor to expose the image multiple times (3 or 4 times), and then transmit it to the image processor for wide dynamic calculation and output of a bright and balanced image.

[0058] The wide dynamic mode needs to obtain reasonable long frames and short frames, and fuse the long frames and short frames according to the brightness. Since there is a displacement deviation between the long frames and the short frames, the long frames and short frames are fused according to the degree of movement to generate the final image.

[0059] The present application provides a method for detecting global and local flicker phenomena through a motion detection algorithm in a two-frame wide dynamic mode. Because there are moving objects in the wide dynamic mode, motion blur will occur if long frames are used for the moving objects. Therefore, short frames need to be used in the moving area to improve clarity and then the signal-to-noise ratio is improved through noise reduction. Short frames are usually prone to flicker phenomena due to short exposure time, and ordinary motion detection under wide dynamic cannot distinguish between real motion and flicker motion. Therefore, short frames will be used at flicker locations, resulting in flicker phenomena on the screen. Therefore, flicker and real motion are distinguished through flicker detection technology, and short frames are still used at real object motion locations, while long frames are used in flicker areas to eliminate flicker. This can detect global and local flicker phenomena and eliminate flicker.

[0060] Please refer to Figure 1 and Figure 2 , Figure 1 is a flow chart of an embodiment of an image processing method provided by the present application, Figure 2 It is a flowchart of the wide dynamic fusion local flicker detection and elimination technology provided by this application.

[0061] The camera-based image processing method of the present application is applied to an image processing device, wherein the image processing device of the present application can be a server, a terminal device, or a system in which a server and a terminal device cooperate with each other. Accordingly, the various parts included in the image processing device, such as various units, subunits, modules, and submodules, can all be set in the server, can all be set in the terminal device, or can be set in the server and the terminal device respectively.

[0062] Furthermore, the above-mentioned server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules, such as software or software modules used to provide distributed servers, or it can be implemented as a single software or software module, which is not specifically limited here.

[0063] like Figure 1 As shown, the specific steps are as follows:

[0064] Step S11: Acquire a current long frame image and a current short frame image used to generate a current image, and obtain a previous long frame image.

[0065] In the embodiments of the present application, Figure 2 As shown in the acquisition of image frame information, the image processing device collects the current long frame image and the current short frame image of the current image in the current wide dynamic mode. Among them, the current long frame image guarantees the details of the dark area and has a good signal-to-noise ratio, and the current short frame image guarantees the details of the long frame overexposed area. The exposure time length of the current long frame image is greater than the exposure time length of the current short frame image.

[0066] Furthermore, the image processing device obtains the previous long frame image of the current long frame image, and the two are captured images with adjacent time stamps. If the current long frame image is the first frame image, the previous long frame image of the present application is the same as the current long frame image.

[0067] Step S12: Based on the current long frame image and the previous long frame image, a first image motion degree is obtained, wherein the first image motion degree includes a first motion value of each pixel.

[0068] In the embodiment of the present application, the image processing device inputs the images acquired in step S11 into the motion detection algorithm module in pairs to detect the motion of the current image.

[0069] Specifically, the image processing device inputs the current long frame image and the previous long frame image into the motion detection algorithm module, and detects and obtains the first image motion degree, and the first image motion degree is a data matrix of the same size as the current image, and the data matrix includes the first motion value of each pixel. Similarly, the image processing device inputs the current long frame image and the current short frame image into the motion detection algorithm module to obtain the second image motion degree.

[0070] The method for obtaining the degree of image motion in this application can be through motion detection algorithms such as optical flow method. In addition, this application provides a specific motion detection method, please refer to Figure 3 and Figure 4 , Figure 3 yes Figure 1The specific flow chart of step S12 of the image processing method shown is as follows, Figure 4 It is a functional schematic diagram of the motion detection algorithm module provided in this application.

[0071] like Figure 3 As shown, the specific steps are as follows:

[0072] Step S121: Acquire a first brightness image of a current long-frame image and a second brightness image of a previous long-frame image.

[0073] In the embodiments of the present application, Figure 4 As shown, the image processing device performs frame brightness statistics on two frames of data input to the motion detection algorithm module, such as the current long frame image and the previous long frame image, to obtain brightness information Y1 and Y2 of the two frames. The brightness information Y1 and Y2 of the two frames are obtained by converting the RGB data of the image, and the conversion formula is as follows:

[0074] Y=0.299*R+0.587*G+0.114*B

[0075] It should be noted that the above data conversion parameters can be adjusted according to business needs and are not specifically limited here.

[0076] Furthermore, the image processing device automatically estimates the noise of two frames of data input into the motion detection algorithm module, such as the current long frame image and the previous long frame image, to obtain an estimated noise level N. The noise level N is calculated based on a pre-configured noise histogram.

[0077] Step S122: obtaining a first frame difference image based on the difference between the first brightness image and the second brightness image.

[0078] In the embodiment of the present application, the image processing device performs a subtraction operation on the two frames of brightness information maps obtained in step S121 to obtain a first scale frame difference map D1.

[0079] Furthermore, in order to extract the detail features of the first scale frame difference image D1 and reduce noise, the image processing device can also use Figure 4 The frame difference multi-scale filtering shown performs at least one scale of Gaussian filtering on the first scale frame difference image D1. Taking the third scale Gaussian filtering as an example, the results of the Gaussian filtering include the second scale frame difference image D2, the third scale frame difference image D3 and the fourth scale frame difference image D4. Among them, the filter convolution kernel sizes of different scales used in the above three Gaussian filtering are 5×5, 9×9 and 13×13 respectively. In other embodiments, filter convolution kernels of other sizes can also be used, which are not listed here one by one. The filtering formula is as follows:

[0080] D=gaussian_filter(Y, [size, size])

[0081] Step S123: Based on the first frame difference image, obtain the first image motion degree.

[0082] In the embodiment of the present application, the image processing device uses the pixel difference information contained in the first frame difference map D1 to determine the motion degree Alpha of the two frames, that is, the motion degree of the first image. The larger the value of the motion degree Alpha, the closer it is to motion, and vice versa, the closer it is to stillness.

[0083] Furthermore, in order to improve the accuracy of motion detection, the image processing device may also perform weighted fusion on the second scale frame difference map D2, the third scale frame difference map D3, and the fourth scale frame difference map D4 obtained in step S122 with the first scale frame difference map D1 to obtain a weighted frame difference map D. The weight of the first scale frame difference map D1 is higher than the weights of the other scale frame difference maps, thereby increasing the influence of the original image. Then, the image processing device uses the pixel difference information contained in the frame difference map D to determine the degree of motion Alpha of the two frames.

[0084] Furthermore, in order to improve the accuracy of motion detection, the image processing device can also perform a center of gravity enhancement algorithm on the first-scale frame difference image D1 to enhance the integrity of object motion detection and avoid local motion from not being detected. The center of gravity enhancement algorithm extracts features from the first-scale frame difference image D1 through two center of gravity convolution kernels Kx and Ky, respectively, to obtain a first center of gravity enhancement image and a second center of gravity enhancement image. The image processing device fuses the first center of gravity enhancement image and the second center of gravity enhancement image to obtain an enhanced frame difference image C. The image processing device performs weighted fusion on the enhanced frame difference image C and the weighted frame difference image D to obtain a new frame difference image, and determines the degree of motion Alpha of the two frames.

[0085] Among them, the weight change directions of the two centroidal convolution kernels Kx and Ky involved in this application are different, that is, the weight of the centroidal convolution kernel Kx increases or decreases from left to right, and is the same from top to bottom; the weight of the centroidal convolution kernel Kx increases or decreases from top to bottom, and is the same from left to right.

[0086] Furthermore, in order to improve the accuracy of motion detection, the image processing device may also perform weighted fusion on the enhanced frame difference image C and the weighted frame difference image D and then subtract the noise estimation result N to obtain the final motion degree Alpha.

[0087] In summary, the image processing device can obtain a first image motion degree between a current long frame image and a previous long frame image, and obtain a second image motion degree between a current long frame image and a current short frame image.

[0088] Step S13: Based on the current long frame image and the current short frame image, a second image motion degree is obtained, wherein the second image motion degree includes a second motion value of each pixel.

[0089] Step S14: traverse each pixel of the current image, and obtain the motion cumulative value of each pixel of the current image based on the first motion value and the second motion value of each pixel.

[0090] In the embodiments of the present application, Figure 2 In the flicker detection module shown, the image processing device determines the motion cumulative value of each pixel of the current image according to the first motion value and the second motion value of each pixel. The image processing device determines the motion detection value according to the first motion value and the second motion value of the current image, and then continues to accumulate the motion cumulative value of the historical image to obtain the motion cumulative value of the current image.

[0091] Please refer to Figure 5 and Figure 6 , Figure 5 yes Figure 1 The specific flow chart of step S14 of the image processing method shown is as follows, Figure 6 It is a functional schematic diagram of the flicker detection module provided in this application.

[0092] like Figure 5 As shown, the specific steps are as follows:

[0093] Step S141: Acquire multiple consecutive frames of historical images before the current image.

[0094] Step S142: Obtain the historical motion cumulative value of each pixel in multiple consecutive frames of historical images.

[0095] In the embodiment of the present application, the image processing device obtains the historical motion cumulative value sum of each pixel point in the continuous multiple frames of historical images before the current image.

[0096] Step S143: traverse each pixel of the current image, traverse each pixel of the current image, and determine the motion detection value of each pixel based on the first motion value and the second motion value of each pixel.

[0097] In the embodiment of the present application, the image processing device determines the motion detection value of each pixel point based on the motion value Alpha of each pixel point in the current image.

[0098] Specifically, Figure 6 As shown, the image processing device obtains the first motion value alpha_ll of the current long frame image and the previous long frame image, and the second motion value alpha_ls of the current long frame image and the current short frame image, and performs flicker detection and elimination.

[0099] like Figure 6As shown, the image processing device performs filtering and smoothing on alpha_ll and alpha_ls, and then performs threshold judgment on alpha. If the flicker exists at a location where there is basically no flicker phenomenon because the long frame shutter time is long, while the short frame shutter time has obvious flicker phenomenon, it will be detected as motion by the long and short frames, while the long frame and the previous long frame will be detected as still.

[0100] Step S144: Accumulate the motion detection value based on the historical motion accumulation value to obtain the motion accumulation value of each pixel point in the current image.

[0101] In the embodiment of the present application, if alpha_ll is greater than the first threshold TH1 and alpha_ls is less than the second threshold TH2, the sum value is increased by A. Otherwise, the sum value is decreased by M. The sum values ​​after several consecutive frames are counted, the initial value of sum is 0 and sum is a matrix of the image resolution size.

[0102] It should be noted that, in the present application, A is designed to be a value larger than M, so as to improve the detection accuracy of the flicker phenomenon.

[0103] Step S15: Determine the motion area, stroboscopic area and static area of ​​the current image according to the motion cumulative values ​​of all pixels of the current image.

[0104] In the embodiment of the present application, the image processing device determines that if the sum value of a certain pixel point of the current image is greater than 0, it is considered that the pixel point has a flicker phenomenon, otherwise it does not, thereby dividing the current image into different areas.

[0105] Please refer to Figure 7 , Figure 7 yes Figure 1 A schematic diagram of a specific flow chart of step S15 of the image processing method is shown.

[0106] like Figure 7 As shown, the specific steps are as follows:

[0107] Step S151: in response to the motion cumulative value of the pixel points of the current image being greater than a preset cumulative threshold, an erosion operation is performed based on the pixel points to expand and generate a stroboscopic area.

[0108] In the embodiment of the present application, the image processing device performs an erosion operation on the pixel points with the flicker phenomenon to complete the area, and obtains the area with the flicker phenomenon in the final image, that is, the stroboscopic area.

[0109] Step S152: In response to the motion cumulative value of the pixels of the current image being less than or equal to a preset cumulative threshold, the area formed by the pixels is taken as a motion area.

[0110] Step S153: The area other than the stroboscopic area and the motion area in the current image is regarded as a static area.

[0111] Step S16: Use the current short frame image for the motion area, and use the current long frame image for the stroboscopic area and the static area to generate the final current image.

[0112] In the embodiment of the present application, Figure 2 In the subsequent wide dynamic fusion flicker elimination module, because the picture clarity needs to be improved, the image processing device uses long frames with high signal-to-noise ratio for the static area and short frames with high clarity for the motion area. However, the flicker area will be judged as motion and the use of short frames will cause flicker phenomenon. Therefore, long frames without flicker phenomenon are used for the flicker area in the final image, so as to distinguish the static objects, real moving objects, and flicker areas in the picture, and ensure that the three areas are normal. Finally, the local flicker phenomenon in the picture is eliminated without affecting the clarity of the real moving objects.

[0113] In the present application, an image processing device collects a current long-frame image and a current short-frame image for generating a current image, and obtains a previous long-frame image; based on the current long-frame image and the previous long-frame image, obtains a first image motion degree, wherein the first image motion degree includes a first motion value for each pixel; based on the current long-frame image and the current short-frame image, obtains a second image motion degree, wherein the second image motion degree includes a second motion value for each pixel; traverses each pixel of the current image, and based on the first motion value and the second motion value of each pixel, obtains a motion cumulative value for each pixel of the current image; according to the motion cumulative values ​​of all pixels of the current image, determines a motion area, a stroboscopic area, and a still area of ​​the current image; uses the current short-frame image for the motion area, and uses the current long-frame image for the stroboscopic area and the still area to generate a final current image. Through the above image processing method, the flicker area and the motion area are distinguished, and the flicker phenomenon of the image is suppressed by the characteristics of long frames and short frames, thereby improving the image quality; through the above image processing method, the global flicker and local flicker in the wide dynamic mode can be detected, and the real motion and flicker phenomenon can be distinguished without affecting the clarity of the real motion area, thereby effectively suppressing the flicker problem and improving the signal-to-noise ratio and viewing experience of the picture.

[0114] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0115] In order to implement the above image processing method, the present application also proposes an image processing device, for details, please refer to Figure 8 , Figure 8 It is a structural schematic diagram of an embodiment of an image processing device provided by the present application.

[0116] The image processing apparatus 400 of this embodiment includes a processor 41 , a memory 42 , an input / output device 43 , and a bus 44 .

[0117] The processor 41 , the memory 42 , and the input / output device 43 are respectively connected to the bus 44 . The memory 42 stores program data, and the processor 41 is used to execute the program data to implement the image processing method described in the above embodiment.

[0118] In the embodiment of the present application, the processor 41 may also be referred to as a CPU (Central Processing Unit). The processor 41 may be an integrated circuit chip having the ability to process signals. The processor 41 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or the processor 41 may also be any conventional processor, etc.

[0119] This application also provides a computer storage medium, please continue to refer to Fig. 9 , Fig. 9 It is a structural diagram of an embodiment of a computer storage medium provided in the present application. The computer storage medium 600 stores a computer program 61. When the computer program 61 is executed by a processor, it is used to implement the image processing method of the above embodiment.

[0120] When the embodiments of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0121] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. An image processing method, characterized in that: The image processing method comprises: Acquiring a current long frame image and a current short frame image used to generate a current image, and acquiring a previous long frame image; Based on the current long frame image and the previous long frame image, obtaining a first image motion degree, wherein the first image motion degree includes a first motion value of each pixel; Based on the current long frame image and the current short frame image, acquiring a second image motion degree, wherein the second image motion degree includes a second motion value of each pixel; Traversing each pixel of the current image, and acquiring a motion cumulative value of each pixel of the current image based on a first motion value and a second motion value of each pixel; Determine a motion region, a stroboscopic region, and a static region of the current image according to the motion cumulative values ​​of all pixels of the current image; The current short frame image is used for the motion area, and the current long frame image is used for the stroboscopic area and the static area to generate a final current image; The traversing each pixel of the current image and acquiring the motion cumulative value of each pixel of the current image based on the first motion value and the second motion value of each pixel includes: Acquire a plurality of continuous frames of historical images before the current image; Obtaining the historical motion cumulative value of each pixel in the continuous multiple frames of historical images; Traversing each pixel of the current image, and determining a motion detection value of each pixel based on the first motion value and the second motion value of each pixel; The motion detection value is accumulated based on the historical motion accumulation value to obtain the motion accumulation value of each pixel point of the current image.

2. The image processing method according to claim 1, characterized in that: The acquiring the first image motion degree based on the current long frame image and the previous long frame image includes: Acquire a first brightness image of the current long frame image and a second brightness image of the previous long frame image; Acquire a first frame difference image based on a difference between the first brightness image and the second brightness image; Based on the first frame difference map, the motion degree of the first image is obtained.

3. The image processing method according to claim 2, characterized in that: The acquiring the first image motion degree based on the first frame difference map includes: Perform at least one scale of filtering on the first frame difference image to obtain a second frame difference image; Performing weighted fusion on the first frame difference image and the second frame difference image to obtain a third frame difference image; Based on the third frame difference map, the motion degree of the first image is obtained.

4. The image processing method according to claim 3, characterized in that: The image processing method further includes: Processing the first frame difference image using a first barycentric convolution kernel to obtain a first barycentric enhanced image; Processing the first frame difference image using a second barycentric convolution kernel to obtain a second barycentric enhanced image; Merging the first center-of-gravity enhanced image and the second center-of-gravity enhanced image to obtain an enhanced frame difference image; Wherein, the weight change directions of the first barycentric convolution kernel and the second barycentric convolution kernel are different; The acquiring the motion degree of the first image based on the third frame difference map includes: Weightedly fusing the third frame difference image and the enhanced frame difference image to obtain a fourth frame difference image; The step of obtaining the first image motion degree is based on the fourth frame difference map.

5. The image processing method according to claim 1, characterized in that: The determining the motion detection value of each pixel based on the first motion value and the second motion value of each pixel includes: In response to the pixel point meeting a preset condition, determining a first motion detection value, wherein the first motion value is greater than a first threshold value, and the second motion value is less than a second threshold value; In response to the pixel not meeting the preset condition, determining a second motion detection value; The first motion detection value is an increasing value, and the second motion detection value is a decreasing value.

6. The image processing method according to claim 5, characterized in that: An absolute value of the first motion detection value is greater than an absolute value of the second motion detection value.

7. The image processing method according to claim 4, characterized in that: The step of determining the motion region, the stroboscopic region, and the static region of the current image according to the motion cumulative values ​​of all pixels of the current image includes: In response to the motion cumulative value of the pixel point of the current image being greater than a preset cumulative threshold, performing an erosion operation based on the pixel point to expand and generate the stroboscopic area; In response to the motion cumulative value of the pixel points of the current image being less than or equal to the preset cumulative threshold, taking the area formed by the pixel points as the motion area; The area outside the stroboscopic area and the motion area in the current image is used as the static area.

8. An image processing device, characterized in that: The image processing device includes a memory and a processor coupled to the memory; The memory is used to store program data, and the processor is used to execute the program data to implement the image processing method according to any one of claims 1 to 7.

9. A computer storage medium, characterized in that The computer storage medium is used to store program data, and when the program data is executed by a computer, it is used to implement the image processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for suppressing wide dynamic range image stroboflash

    CN114697558A

  • Image stroboscopic processing method and device, electronic equipment and storage medium

    CN116916164A