Dynamic image processing method and device, electronic equipment and storage medium

By dynamically adjusting the camera and fill light array parameters, the problem that a single fill light is difficult to dynamically adjust according to the camera and ambient light parameters is solved, and high-quality image output and better adaptability are achieved.

CN119767129APending Publication Date: 2025-04-04SHENZHEN FENGZEXIN INFORMATION TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411986650.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the prior art, a single fill light is difficult to dynamically adjust according to the camera and ambient light parameters, resulting in poor image processing effect.

Method used

By calling the preset fill light array, the matching relationship between the output image and the camera parameters and ambient light parameters is determined according to the camera and ambient light parameters, and the camera and fill light array parameters are dynamically adjusted until the difference between the image parameters and the shooting requirement parameter meets the preset threshold.

Benefits of technology

Improve image output quality, enhance adaptability and flexibility, better meet the needs of high-quality images in multiple fields, and reduce image flaws and post-processing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119767129A_ABST
    Figure CN119767129A_ABST
Patent Text Reader

Abstract

The invention provides a dynamic image processing method and device, and the method comprises the steps: calling a preset light supplement lamp array according to a current camera parameter and an ambient light parameter; according to the camera parameter and the ambient light parameter, determining a matching relationship between the output image required by shooting and the camera parameter and the ambient light parameter through a relationship between the image and the optical parameter; and starting the camera and the light supplement lamp array, and dynamically adjusting the camera parameters and the light supplement lamp array parameters according to the matching relationship until the difference value between the output image parameters and the shooting demand parameters meets a preset threshold value. The image output quality can be improved, the adaptability and flexibility can be enhanced, various complex and changeable shooting environments can be handled, and the application range is expanded; and the shooting efficiency can be improved, an ideal image effect can be automatically and quickly achieved, and post-processing and manual intervention costs are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of camera technology, and in particular to a dynamic image processing method, device, electronic equipment and storage medium. Background Art

[0002] With the continuous development of electronic technology, the images of cameras are becoming more and more high-definition and dynamic, playing an important role in applications such as image recognition, vehicle, pedestrian and license plate recognition, robot navigation, and special scene photography. In many applications, fill lights are generally required to fill in the light so that terminal devices such as computers can better process the dynamic images output by the camera, making the output image effect better.

[0003] However, in the prior art, a single fill light is generally used for fill light. When processing an image, the image can only be processed according to the single fill light effect, and the output image cannot be adjusted according to the fill light effect, making it difficult to achieve a better image output effect. Therefore, the present invention proposes a dynamic image processing method, device, electronic device and storage medium to at least solve some of the above problems. Summary of the invention

[0004] In view of the above problems, the present invention is proposed to provide a dynamic image processing method, device, electronic device and storage medium that overcome the above problems or at least partially solve the above problems.

[0005] In order to solve the above problems, the present invention discloses a dynamic image processing method, comprising: According to the current camera parameters and ambient light parameters, call the preset fill light array; According to the camera parameters and the ambient light parameters, and through the relationship between the image and the optical parameters, determine the matching relationship between the output image required for shooting and the camera parameters and the ambient light parameters; The camera and the fill light array are started, and the camera parameters and the fill light array parameters are dynamically adjusted according to the matching relationship until the difference between the output image parameters and the shooting requirement parameters meets the preset threshold.

[0006] Optionally, before calling a preset fill light array according to current camera parameters and ambient light parameters, the method further includes: Get camera parameters and ambient light parameters.

[0007] Optionally, obtaining camera parameters and ambient light parameters includes: The camera parameters including the aperture factor f, shutter speed t, sensitivity ISO, color correction parameter M and sharpening parameter L are obtained; the ambient light parameters including the color temperature parameter and ambient light illumination parameter are obtained in the current environment.

[0008] Optionally, calling a preset fill light array according to current camera parameters and ambient light parameters includes: Determine the camera parameter value range according to the sensor and lens parameters of the current camera; According to the camera parameter value range, the fill light array is called, and the ambient light parameter range of the ambient fill light array combined with natural light is determined.

[0009] Optionally, determining the matching relationship between the output image required for shooting and the camera parameters and the ambient light parameters according to the camera parameters and the ambient light parameters and through the relationship between the image and the optical parameters includes: According to the aperture factor f, shutter speed t, sensitivity ISO, current camera parameters including color correction parameter M and sharpening parameter L of the camera, and the matching relationship between the ambient light parameters including color temperature and ambient light illumination and the output image.

[0010] Optionally, the matching relationship between the current camera parameters according to the camera's aperture factor f, shutter speed t, sensitivity ISO, color correction parameter M and sharpening parameter L, and the ambient light parameters including color temperature and ambient light illumination and the output image includes: According to the current camera parameters and ambient light parameters, the exposure compensation algorithm, color correction algorithm and white level algorithm are used to determine the exposure compensation, color and white level matching relationship between the output image and the output image; Wherein, the white level algorithm is: , , , , , , , , In the formula, I(x, y) represents the pixel with coordinates (x, y) in the image, and the subscripts R, G, and B of I represent the pixel values ​​of the red, green, and blue channels, respectively. , , , are the average pixel values ​​of the red, green, and blue channels in the image, N is the total number of pixels in the image, K is the grayscale value, , , are the gain coefficients of the red, green, and blue channels respectively; The color correction algorithm formula is: , ,M=[m ij], where T represents transpose, M is the color correction matrix, and m ij is the element in the i-th row and j-th column of the matrix M; is the color vector of the original image pixel, The pixel color vector after color correction; The exposure compensation algorithm formula is: In the formula, E is the exposure, f is the aperture coefficient, t is the shutter speed, ISO sensitivity, and EV is the exposure value.

[0011] Optionally, the matching relationship between the current camera parameters including the aperture factor f, shutter speed t, sensitivity ISO, color correction parameter M and sharpening parameter L of the camera, and the ambient light parameters including color temperature and ambient light illumination and the output image further includes: According to the current camera parameters and the ambient light parameters, through the noise reduction algorithm and the image sharpening algorithm, it is determined that there is a noise reduction matching relationship and a sharpening matching relationship with the output image; Wherein, the noise reduction algorithm formula is: , , where I(x, y) represents the pixel value at coordinate (x, y) in the image, I'(x, y) represents the pixel value at coordinate (x, y) in the image after mean filtering, n and m are used to define the radius of the filter window in the x and y directions respectively, and S is the set of pixel values ​​in the window; The specific formula of the image sharpening algorithm is: , In the formula, I(x, y) represents the pixel value with coordinates (x, y) in the image, I'(x, y) represents the pixel value after sharpening, L is the Laplacian operator matrix, k is the sharpening intensity coefficient, and L*I represents the convolution operation of the Laplacian operator L and the image I.

[0012] A dynamic image processing device, used in a dynamic image processing method, comprising: A fill light calling module is used to call a preset fill light array according to current camera parameters and ambient light parameters; A parameter matching module is used to determine the matching relationship between the output image required for shooting and the camera parameters and the ambient light parameters according to the camera parameters and the ambient light parameters and through the relationship between the image and the optical parameters; The parameter adjustment module is used to start the camera and the fill light array, and dynamically adjust the camera parameters and the fill light array parameters according to the matching relationship until the difference between the output image parameters and the shooting requirement parameters meets the preset threshold.

[0013] An embodiment of the present invention further discloses an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of the dynamic image processing method when executed by the processor.

[0014] The embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the dynamic image processing method are implemented.

[0015] The present invention has the following advantages: by calling the preset fill light array according to the current camera parameters and ambient light parameters; according to the camera parameters and ambient light parameters, and through the relationship between the image and the optical parameters, determining the matching relationship between the output image of the shooting requirement and the camera parameters and the ambient light parameters; starting the camera and the fill light array, and dynamically adjusting the camera parameters and the fill light array parameters according to the matching relationship, until the difference between the output image parameters and the shooting requirement parameters meets the preset threshold. It can improve the image output quality, make the brightness, contrast and color reproduction better, reduce image defects, and meet the needs of multiple fields for high-quality images; it can enhance adaptability and flexibility, cope with various complex and changeable shooting environments, and expand the scope of application; it can also improve shooting efficiency, automatically and quickly achieve ideal image effects, reduce the cost of post-processing and manual intervention, and has significant advantages in batch or time-sensitive shooting tasks, and has high application and innovation value. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 is a flow chart of steps of a dynamic image processing method provided in one embodiment of the present invention; Figure 2 It is a structural schematic diagram of a dynamic image processing device provided in one embodiment of the present invention; Figure 3 It is a structural schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] Please refer to Figure 1 As shown, an embodiment of the present invention provides a step flow chart of a dynamic image processing method, including: S100, calling a preset fill light array according to current camera parameters and ambient light parameters; S200, determining a matching relationship between an output image required for shooting and the camera parameters and the ambient light parameters according to the camera parameters and the ambient light parameters and through a relationship between the image and the optical parameters; S300, starting the camera and the fill light array, and dynamically adjusting the camera parameters and the fill light array parameters according to the matching relationship until the difference between the output image parameters and the shooting requirement parameters meets a preset threshold.

[0020] In this embodiment, the above-mentioned dynamic image processing method solves the problem of fill light and poor output image in the prior art by using a fill light. Specifically, in this application, by calling a preset fill light array, a more flexible and diversified fill light method can be provided compared with a single fill light. Through the combination of multiple fill lights, the fill light effect can be adjusted from multiple dimensions such as different angles and different intensities, avoiding the problems of uneven lighting and inability to meet the fill light requirements of complex scenes that may exist in the fill light of a single fill light, enriching the possibility of fill light, and laying the foundation for subsequent high-quality output images; then, according to the camera parameters and ambient light parameters, the matching relationship between the output image required for shooting and the camera parameters and ambient light parameters is determined through the relationship between the image and the optical parameters. It is no longer limited to processing images with a fixed single fill light effect, but comprehensively considers multiple factors to determine the association between the ideal output image and each parameter in advance.

[0021] Furthermore, after starting the camera and the fill light array, the camera parameters and the fill light array parameters are dynamically adjusted according to the determined matching relationship until the difference between the output image parameters and the shooting requirement parameters meets the preset threshold. Through this dynamic adjustment mechanism, the fill light effect and camera-related settings can be changed in real time according to the actual situation. The image is no longer processed rigidly according to the fixed fill light situation, but the fill light and camera parameters can be adjusted flexibly according to the desired shooting requirement output image, thereby effectively overcoming the previous limitation that the output image could not be adjusted according to the fill light effect.

[0022] In one embodiment of the present invention, before calling the preset fill light array according to the current camera parameters and ambient light parameters, the method further includes: obtaining the camera parameters and ambient light parameters, specifically, obtaining the camera parameters including the aperture factor f, shutter speed t, sensitivity ISO, and color correction parameter M and sharpening parameter L; obtaining the ambient light parameters including the color temperature parameter and the ambient light illumination parameter in the current environment.

[0023] Since the camera's own parameters and ambient light parameters will affect the image, and the ambient light parameters captured by the camera will change when the ambient light parameters are supplemented, the ambient light parameters must take into account the ambient light parameters affected by the current natural light and supplementary light. For example, the aperture factor f determines the amount of light entering the lens, while the shutter speed t controls the time for the light to enter. ISO determines the sensitivity of the sensor to light. The exposure compensation value (usually in EV units, such as +1EV, -0.5EV) is a parameter set by the user or the camera automatically to adjust the exposure. When the exposure compensation (such as +1EV) is increased, the algorithm will brighten the image by increasing the aperture, slowing down the shutter speed, or increasing the ISO. This may cause the highlights to be overexposed and lose details, but it can make the dark areas brighter and show more details. The color temperature parameter is used to measure the color characteristics of the light source. The light emitted by light sources with different color temperatures has different spectral distributions. For example, the light with low color temperature (such as tungsten lamps) is reddish-yellow, and the light with high color temperature (such as fluorescent lamps) is bluish-white, that is, the white balance of the camera.

[0024] In an embodiment of the present invention, step S100 may include the following sub-steps: Determine the camera parameter value range according to the sensor and lens parameters of the current camera; According to the camera parameter value range, the fill light array is called, and the ambient light parameter range of the ambient fill light array combined with natural light is determined.

[0025] Since the camera sensor, such as CMOS or CCD, is an important component of the camera, its parameters will directly affect the image output. For example, CMOS size and lens parameters as well as lens size and focal length will have a certain impact on the image. The parameter value range of the camera can be determined by the sensor and lens parameters. The range of camera parameter values ​​and ambient light constitute the necessary conditions for imaging.

[0026] In an embodiment of the present invention, step S200 may include: matching the output image with the current camera parameters including the aperture factor f, shutter speed t, sensitivity ISO, color correction parameter M and sharpening parameter L of the camera, and ambient light parameters including color temperature and ambient light illumination.

[0027] As an example, the matching relationship between the current camera parameters according to the camera's aperture factor f, shutter speed t, sensitivity ISO, color correction parameter M and sharpening parameter L, and the ambient light parameters including color temperature and ambient light illumination and the output image includes: According to the current camera parameters and ambient light parameters, the exposure compensation algorithm, color correction algorithm and white level algorithm are used to determine the exposure compensation, color and white level matching relationship between the output image and the output image; Wherein, the white level algorithm is: , , , , , , , , In the formula, I(x, y) represents the pixel with coordinates (x, y) in the image, where x and y represent the coordinate position of the pixel in the image, and the image is color with three channels R, G, and B. The subscripts R, G, and B of I (i.e., I R ,I G ,I B ) represent the pixel values ​​of the red, green and blue channels respectively, , , , are the pixel averages of the red, green, and blue channels in the image, respectively. These averages reflect the overall brightness level of the image in each color channel; N is the total number of pixels in the image, which is used to calculate the channel average and is a fixed value that depends on the resolution of the image; K is the grayscale value, , , They are the gain coefficients of the red, green, and blue channels, respectively. According to the grayscale world hypothesis, ideally, these three average values ​​should be equal, that is, they are all equal to a hypothetical grayscale value K. The grayscale value K is the target value used to balance the color channels in the algorithm. For example, it can be set to 128 (for 8-bit image channels); I(x, y) represents the pixel with coordinates (x, y) in the image, which is a pixel value containing information of the three channels R, G, and B. For example, in an RGB image, each pixel position (x, y) has corresponding red, green, and blue intensity values; The color correction algorithm formula is: , ,M=[m ij ], where T represents transposition, which converts row vectors into column vectors to facilitate matrix multiplication, M is the color correction matrix, and m ij is the element in the i-th row and j-th column of the matrix M; is the color vector of the original image pixel, The pixel color vector after color correction, including the color-corrected red (R'), green (G'), and blue (B') channel values; Specifically, the color correction matrix M can be set to a 3×3 matrix, where the element m ij (i,j=1,2,3) determines how the components of the original color vector are transformed. These coefficients are determined based on the spectral response characteristics of the camera sensor and the conversion relationship between the target color space (such as sRGB); , the pixel color vector after color correction is , then ,Right now: , the expanded calculation formula is: , , These coefficients m ij Determined based on the camera sensor characteristics and the target color space, it is used to adjust the saturation, hue, and brightness of the color.

[0028] For example, the coefficients related to the red channel in the color matrix M can be increased, such as m 11 , to increase the red saturation of the image. For example, suppose the color vector of a pixel in the original image is , if m 11 From 1 to 1.5, other coefficients remain unchanged, according to the calculation formula , then the corrected red channel value R' will change from 100 to 1.5×100+m 12 ×100+m 13 ×100, the red channel value increases, thereby increasing the red saturation.

[0029] The exposure compensation algorithm formula is: , The exposure E is related to the aperture size f, shutter speed t and sensitivity ISO; Assume the initial exposure is E 1 , the corresponding aperture factor is f 1 , shutter speed is t 1 , ISO sensitivity 1 When the fill light array fills in the light, it is assumed that the exposure after compensation is E 2 , the corresponding aperture factor is f 2 , shutter speed is t 2 , ISO sensitivity2 According to the relationship between aperture, shutter speed and ISO, in practical applications, when only the aperture is changed for compensation, according to E 2 、f 2 and t 2 , ISO sensitivity 2 In practical applications, exposure compensation can be achieved by adjusting these three parameters comprehensively; refer to the following formula for details: , , , In the formula, E is the exposure, which is a physical quantity that comprehensively measures the degree of exposure of light on the camera sensor. It is related to the aperture, shutter speed and sensitivity; f is the aperture coefficient, the square of its reciprocal is proportional to the amount of light entering the lens. The smaller the aperture coefficient (the larger the aperture), the more light (also called luminous flux) enters; t is the shutter speed, which indicates the length of time for light to enter the sensor, where the slower the shutter speed, the more light enters; ISO sensitivity, which indicates the sensitivity of the sensor to light. The higher the ISO value, the more sensitive the sensor is to light. At the same aperture and shutter speed, the greater the exposure; EV exposure value, which is used to indicate the degree of exposure compensation, is a relative quantity, where a positive EV indicates an increase in exposure, and a negative EV indicates a decrease in exposure.

[0030] For example, when taking a landscape photo, the initial exposure is normal. If you want to increase the brightness of the image (increase exposure), set EV = +1. If you only change the shutter speed to compensate, according to , the shutter speed t will become twice as fast as before, allowing more light to enter the camera and brightening the image. However, if there are highlights in the scene (such as reflections on the water), it may cause overexposure of the highlights and loss of details. On the contrary, if EV=-1, the image will become darker, the details of the dark parts may be richer, but the highlights may become darker, or even a dead black area may appear.

[0031] In an embodiment of the present invention, step S200 may further include: determining, based on current camera parameters and ambient light parameters, through a noise reduction algorithm and an image sharpening algorithm, whether there is a noise reduction matching relationship and a sharpening matching relationship with the output image; Wherein, the noise reduction algorithm formula is: , , where I(x, y) represents the pixel value at coordinate (x, y) in the image, I'(x, y) represents the pixel value at coordinate (x, y) in the image after mean filtering, n and m are used to define the radius of the filter window in the x and y directions respectively, and S represents the set of pixel values ​​in the window; Assume the original image is I(x, y), and for each pixel (x, y) in the image, perform mean filtering to reduce noise. Assume that the filter window size is (2n+1)×(2m+1), where n and m are positive integers, representing the radius of the window in the x and y directions; The image sharpening algorithm may use the Laplacian operator, and the specific formula is: , In the formula, I(x, y) represents the pixel value with coordinates (x, y) in the image, I'(x, y) represents the pixel value after sharpening, L is the Laplacian operator matrix, k is the sharpening intensity coefficient, and L*I represents the convolution operation of the Laplacian operator L and the image I.

[0032] For a two-dimensional image I(x, y), the Laplacian operator (in discrete form) is used to calculate the second-order derivative of the image, thereby highlighting the edges. The Laplacian operator is usually represented by a 3×3 template: , the sharpened image I'(x, y) can be obtained by convolving the original image with the Laplacian operator, assuming that appropriate boundary conditions are used for boundary pixel processing, such as zero padding, etc.: , where L*I represents the convolution operation of the Laplacian operator L and the image I , that is, slide the Laplacian operator template on the image, multiply and add the elements at corresponding positions to get the convolution result.

[0033] For example, suppose a noisy image has large fluctuations in pixel values ​​in a local area. When using mean filtering for noise reduction, increasing n and m, that is, expanding the filter window, will allow more pixels to participate in the average calculation. For example, when n=m=1, the filter window is 3×3, containing 9 pixels; when n=m=2, the filter window is 5×5, containing 25 pixels. The larger the window, the more obvious the noise reduction effect, but it will also blur the image details. Because in the details such as edges, a larger window will average the edge pixels and surrounding pixels together, causing the edges to become less sharp.

[0034] For a slightly blurred image, increasing the sharpening strength coefficient k will make the edges and details of the image more prominent. Assuming that there is an edge of an object in the original image, when k is small, the edge enhancement effect after sharpening is not obvious; when k increases, the difference between the edge pixel and the surrounding pixels will be magnified, making the edge clearer. However, if k is too large, it may cause "ringing" on the edge, such as unnatural halos around the edge of the object. At the same time, since the sharpening process will amplify the differences between pixels, it may also amplify the noise in the image.

[0035] In a specific implementation, the camera and fill light array are started, and based on the matching relationship, the camera parameters and fill light array parameters are dynamically adjusted until the difference between the output image parameters and the shooting requirement parameters meets a preset threshold, and the above parameters are set to meet the shooting requirements.

[0036] In a specific embodiment, in a portrait shooting scene, the RGB fill light array is first used. According to the distribution characteristics of skin color in the color space, the color matrix parameters in the color correction algorithm are adjusted to optimize the skin color presentation. Assuming that the skin color is mainly affected by the red and green channels in the RGB color space, the coefficients corresponding to the red and green channels in the color matrix can be appropriately increased (such as setting the sum to be slightly greater than 1), while keeping the blue channel coefficient stable. The overall color tone is adjusted using the white balance algorithm. Under different ambient lights (such as indoor tungsten lamps or outdoor sunlight), the color temperature of the current ambient light is calculated, and the gain coefficients of each channel are obtained by the gray world algorithm. For example, under tungsten lamps, the red channel gain coefficient will be relatively small, the green channel gain coefficient will be moderate, and the blue channel gain coefficient will be large to correct the yellowish tone, so that the white background or clothing will appear naturally white, and the skin color can also appear more natural and healthy in the adjusted color space. For fill light brightness, according to the exposure compensation algorithm, the exposure is controlled by adjusting the brightness of each lamp in the RGB fill light array. For example, when the ambient light is dim, the fill light brightness corresponding to the aperture coefficient can be increased (such as by increasing the influence coefficient of parameters related to the aperture on the fill light brightness), and the fill light brightness corresponding to the shutter speed can be appropriately increased (such as by increasing the influence coefficient of parameters related to the shutter on the fill light brightness). The fill light brightness corresponding to the ISO can be fine-tuned as needed (such as by adjusting the influence coefficient of parameters related to ISO on the fill light brightness) to achieve appropriate exposure and avoid loss of details due to heavy shadows or too bright faces.

[0037] In terms of color correction, the adjustment of the color matrix coefficients mentioned above will make the red and green channel values ​​of the skin color follow the formula and changes, thereby changing the hue and saturation of skin tones for a more natural and beautiful look.

[0038] The application of the white balance algorithm makes the overall color of the image balanced and avoids color cast caused by the color temperature of the ambient light. For example, adjusting the pixel value according to the gain coefficient calculated by the gray world algorithm can make the white and skin color in the image maintain relatively stable color performance under different light sources.

[0039] The exposure compensation algorithm controls the fill light brightness, which affects the overall brightness and detail presentation of the image. For example, increasing the fill light brightness parameter related to the aperture will allow more light to enter the lens. According to the exposure equation, when other parameters remain unchanged, the exposure will increase, making the image brighter and facial details more visible; but if it is increased too much, it may cause the highlight part (such as the reflection of the forehead) to be overexposed and lose details.

[0040] In some examples, in the application scenario of surveillance cameras, the RGB fill light array is mainly used for fill light during the day and combined with related algorithms. The white balance algorithm is used to calculate the channel gain coefficient according to the color temperature of natural sunlight (about 5500-6500K) to ensure the natural color of the image. The color correction algorithm is used to optimize the important target colors in the scene (such as the color of vehicles in traffic monitoring and the color of pedestrians' clothing) to determine the appropriate color matrix so that target features can be more accurately identified in subsequent video analysis.

[0041] When night falls, switch to infrared light fill mode and start shooting in black and white mode. At this time, use the exposure compensation algorithm to adjust the brightness of the infrared light, and control the exposure by changing the influence coefficient of the parameters related to aperture, shutter speed and ISO on the fill light brightness. For example, in low light and when a large range needs to be monitored, the fill light brightness parameter corresponding to the aperture can be increased, and the fill light brightness parameter corresponding to the shutter speed can be appropriately reduced to ensure that enough light enters the lens, while maintaining a suitable ISO to reduce noise, so that the monitoring screen can clearly see the outline and movement trajectory of the target object.

[0042] In black and white mode, the sharpening intensity coefficient can be adjusted according to the image sharpening algorithm to sharpen the image and highlight the edges of the target object, so that the target detection and recognition algorithms can work better.

[0043] The application of white balance and color correction algorithms makes the color of surveillance images accurate, which helps to quickly identify various elements in the scene when viewing the surveillance images manually, and also provides accurate data for subsequent video analysis based on color features. For example, the adjustment of color matrix parameters in the color correction algorithm will affect the presentation of different target colors in the image, making features such as vehicle color easier to distinguish. At night, infrared light fill light combined with exposure compensation algorithm affects the brightness and clarity of the surveillance image. For example, if the fill light brightness parameter corresponding to the aperture is increased, the exposure will be increased according to the exposure equation, allowing more light to enter the lens, so that the target object in the dark is more visible. However, if the parameters are not adjusted properly, the image may be too bright or too dark, affecting target recognition. In black and white mode, the image sharpening algorithm uses the sharpening intensity coefficient to sharpen the image according to the formula, highlighting the edge of the target object, making the outline of the target object clearer, reducing the misjudgment rate of the target recognition algorithm, and improving the accuracy and reliability of the surveillance system.

[0044] In one embodiment of the present invention, referring to Figure 2 As shown, a dynamic image processing device is also disclosed, comprising: The fill light calling module 100 is used to call a preset fill light array according to current camera parameters and ambient light parameters; The parameter matching module 200 is used to determine the matching relationship between the output image required for shooting and the camera parameters and the ambient light parameters according to the camera parameters and the ambient light parameters and through the relationship between the image and the optical parameters; The parameter adjustment module 300 is used to start the camera and the fill light array, and dynamically adjust the camera parameters and the fill light array parameters according to the matching relationship until the difference between the output image parameters and the shooting requirement parameters meets the preset threshold.

[0045] Reference Figure 3 In an embodiment of the present invention, the present invention further provides a computer device. The above-mentioned computer device 12 is in the form of a general computing device. The components of the computer device 12 may include but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).

[0046] The bus 18 represents one or more of several types of bus 18 structures, including a memory bus 18 or memory controller, a peripheral bus 18, an accelerated graphics port, a processor, or a local bus 18 using any of a variety of bus 18 architectures. These architectures include, by way of example, but are not limited to, an Industry Standard Architecture (ISA) bus 18, a Micro Channel Architecture (MAC) bus 18, an Enhanced ISA bus 18, an Audio Video Electronics Standards Association (VESA) local bus 18, and a Peripheral Component Interconnect (PCI) bus 18.

[0047] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0048] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 31 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (commonly referred to as a "hard drive"). Although Figure 3Not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42, which are configured to perform the functions of various embodiments of the present invention.

[0049] A program / utility 41 having a set (at least one) of program modules 42 may be stored in, for example, a memory, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules 42, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0050] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, camera, etc.), may also communicate with one or more devices that enable a user to interact with the computer device 12, and / or communicate with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. In addition, the computer device 12 may also communicate with one or more networks (e.g., local area network (LAN)), wide area network (WAN) and / or public network (e.g., Internet) through a network adapter 20. As shown, the network adapter 21 communicates with other modules of the computer device 12 through a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the computer device 12, including but not limited to: microcode, device driver, redundant processing unit 16, external disk drive array, RAID system, tape drive, and data backup storage system 34, etc.

[0051] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the dynamic image processing method provided by the embodiment of the present invention.

[0052] That is, when the processing unit 16 executes the above program, it realizes: calling the preset fill light array according to the current camera parameters and ambient light parameters; determining the matching relationship between the output image required for shooting and the camera parameters and ambient light parameters according to the camera parameters and ambient light parameters and through the relationship between the image and the optical parameters; starting the camera and the fill light array, and dynamically adjusting the camera parameters and the fill light array parameters according to the matching relationship until the difference between the output image parameters and the shooting requirement parameters meets the preset threshold.

[0053] In an embodiment of the present invention, the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the dynamic image processing method provided in all embodiments of the present application is implemented.

[0054] That is, when the program is executed by the processor, it is implemented as follows: according to the current camera parameters and ambient light parameters, the preset fill light array is called; according to the camera parameters and ambient light parameters, and through the relationship between the image and the optical parameters, the matching relationship between the output image required for shooting and the camera parameters and the ambient light parameters is determined; the camera and the fill light array are started, and according to the matching relationship, the camera parameters and the fill light array parameters are dynamically adjusted until the difference between the output image parameters and the shooting requirement parameters meets the preset threshold.

[0055] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device or device.

[0056] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0057] Computer program code for performing the operation of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, Python, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0058] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0059] It should be understood by those skilled in the art that the embodiments of the present invention can be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0060] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0061] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0062] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0063] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0064] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0065] The above is a detailed introduction to a dynamic image processing method, device, electronic device and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A dynamic image processing method, characterized in that: include: S1. Call the preset fill light array according to the current camera parameters and ambient light parameters; S2, according to the camera parameters and the ambient light parameters, and through the relationship between the image and the optical parameters, determining the matching relationship between the output image required for shooting and the camera parameters and the ambient light parameters; S3, starting the camera and the fill light array, and dynamically adjusting the camera parameters and the fill light array parameters according to the matching relationship until the difference between the output image parameters and the shooting requirement parameters meets a preset threshold.

2. The dynamic image processing method according to claim 1, characterized in that: Before calling the preset fill light array according to the current camera parameters and the ambient light parameters, the method further includes: Get camera parameters and ambient light parameters.

3. The dynamic image processing method according to claim 2, characterized in that: The obtaining of camera parameters and ambient light parameters includes: The camera parameters including the aperture factor f, shutter speed t, sensitivity ISO, color correction parameter M and sharpening parameter L are obtained; the ambient light parameters including the color temperature parameter and ambient light illumination parameter are obtained in the current environment.

4. The dynamic image processing method according to claim 1, characterized in that: The step of calling a preset fill light array according to current camera parameters and ambient light parameters includes: Determine the camera parameter value range according to the sensor and lens parameters of the current camera; According to the camera parameter value range, the fill light array is called, and the ambient light parameter range of the ambient fill light array combined with natural light is determined.

5. The dynamic image processing method according to claim 1, characterized in that: The method of determining the matching relationship between the output image required for shooting and the camera parameters and the ambient light parameters according to the camera parameters and the ambient light parameters and through the relationship between the image and the optical parameters includes: According to the aperture factor f, shutter speed t, sensitivity ISO, current camera parameters including color correction parameter M and sharpening parameter L of the camera, and the matching relationship between the ambient light parameters including color temperature and ambient light illumination and the output image.

6. The dynamic image processing method according to claim 5, characterized in that: The matching relationship between the current camera parameters according to the camera's aperture factor f, shutter speed t, sensitivity ISO, color correction parameter M and sharpening parameter L, and the ambient light parameters including color temperature and ambient light illumination and the output image includes: According to the current camera parameters and ambient light parameters, the exposure compensation algorithm, color correction algorithm and white level algorithm are used to determine the exposure compensation, color and white level matching relationship between the output image and the output image; Wherein, the white level algorithm is: , , , , , , , , In the formula, I(x, y) represents the pixel with coordinates (x, y) in the image, and the subscripts R, G, and B of I represent the pixel values ​​of the red, green, and blue channels, respectively. , , , are the average pixel values ​​of the red, green, and blue channels in the image, N is the total number of pixels in the image, K is the grayscale value, , , are the gain coefficients of the red, green, and blue channels respectively; The color correction algorithm formula is: , ,M=[m ij ], where T represents transpose, M is the color correction matrix, and m ij is the element in the i-th row and j-th column of the matrix M; is the color vector of the original image pixel, The pixel color vector after color correction; The exposure compensation algorithm formula is: In the formula, E is the exposure, f is the aperture coefficient, t is the shutter speed, ISO sensitivity, and EV is the exposure value.

7. The dynamic image processing method according to claim 5, characterized in that: The matching relationship between the current camera parameters according to the camera's aperture factor f, shutter speed t, sensitivity ISO, color correction parameter M and sharpening parameter L, and the ambient light parameters including color temperature and ambient light illumination and the output image also includes: According to the current camera parameters and the ambient light parameters, through the noise reduction algorithm and the image sharpening algorithm, it is determined that there is a noise reduction matching relationship and a sharpening matching relationship with the output image; Wherein, the noise reduction algorithm formula is: , , where I(x, y) represents the pixel value at coordinate (x, y) in the image, I'(x, y) represents the pixel value at coordinate (x, y) in the image after mean filtering, n and m are used to define the radius of the filter window in the x and y directions respectively, and S is the set of pixel values ​​in the window; The specific formula of the image sharpening algorithm is: , In the formula, I(x, y) represents the pixel value with coordinates (x, y) in the image, I'(x, y) represents the pixel value after sharpening, L is the Laplacian operator matrix, k is the sharpening intensity coefficient, and L*I represents the convolution operation of the Laplacian operator L and the image I.

8. A dynamic image processing device, characterized in that: include: A fill light calling module is used to call a preset fill light array according to current camera parameters and ambient light parameters; A parameter matching module is used to determine the matching relationship between the output image required for shooting and the camera parameters and the ambient light parameters according to the camera parameters and the ambient light parameters and through the relationship between the image and the optical parameters; The parameter adjustment module is used to start the camera and the fill light array, and dynamically adjust the camera parameters and the fill light array parameters according to the matching relationship until the difference between the output image parameters and the shooting requirement parameters meets the preset threshold.

9. An electronic device, characterized in that: include: one or more processors; and one or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, enable the electronic device to perform the dynamic image processing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer program stored therein enables the processor to execute the dynamic image processing method as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image processing method, terminal and computer readable storage medium

    CN107846554A

  • Photographing method and device, computer readable storage medium and computer equipment

    CN108174172A

  • Image processing method and camera

    CN109151257A

  • Photographed picture light supplementing method, smart television and computer readable storage medium

    CN110809120A

  • Skin detection image acquisition method and device, equipment and storage medium

    CN113411507A