CN111369471A - Image processing method, device, equipment and storage medium - Google Patents

Image processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN111369471A
CN111369471A CN202010170504.3A CN202010170504A CN111369471A CN 111369471 A CN111369471 A CN 111369471A CN 202010170504 A CN202010170504 A CN 202010170504A CN 111369471 A CN111369471 A CN 111369471A
Authority
CN
China
Prior art keywords
dark
brightness
light
video image
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010170504.3A
Other languages
Chinese (zh)
Other versions
CN111369471B (en
Inventor
金时昱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Baiguoyuan Information Technology Co Ltd
Original Assignee
Guangzhou Baiguoyuan Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Baiguoyuan Information Technology Co Ltd filed Critical Guangzhou Baiguoyuan Information Technology Co Ltd
Priority to CN202010170504.3A priority Critical patent/CN111369471B/en
Publication of CN111369471A publication Critical patent/CN111369471A/en
Priority to PCT/CN2021/080203 priority patent/WO2021180173A1/en
Application granted granted Critical
Publication of CN111369471B publication Critical patent/CN111369471B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20208High dynamic range [HDR] image processing

Abstract

The invention discloses an image processing method, an image processing device, image processing equipment and a storage medium, wherein the method comprises the following steps: determining the light and dark distribution condition corresponding to the detection frame of the video image; determining the dark light enhancement intensity of the video image according to the light and dark distribution condition; and carrying out light-dark adjustment on the video image according to the dark light enhancement intensity. According to the invention, the dark light enhancement intensity is dynamically adjusted when the video image is subjected to the light and dark adjustment through detecting the light and dark distribution condition of the video image, so that the problem of poor display effect caused by processing the video image by using unmatched dark light enhancement intensity is solved, and the definition of the video image is enhanced.

Description

Image processing method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of image processing, in particular to an image processing method, an image processing device, image processing equipment and a storage medium.
Background
With the development of internet technology, online video services are the key point of research in the industry, but due to the influence of a video recording environment, the definition of a recorded video is low due to the restriction of light conditions when a video image is recorded, and in order to improve the video recording effect, a dark light enhancement technology is often adopted to process the image so as to improve the definition of the video image.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: the existing dim light enhancement technology often sets fixed dim light enhancement intensity in practical application, and because the illumination conditions in different video images are different, the fixedly set dim light enhancement intensity is not matched with the input video image, so that the video image enhancement effect is not ideal, for example, the dim light enhancement intensity used in the video image with better illumination conditions is higher, so that the video image is overexposed, and the definition of the video image is reduced on the contrary.
Disclosure of Invention
The invention provides an image processing method, an image processing device, image processing equipment and a storage medium, wherein the matching degree of dim light enhancement in the video image processing process is improved, the brightness of a video image is improved, and the definition of the video image can be enhanced by dynamically adjusting the dim light enhancement intensity according to the light and dark conditions of each video image.
In a first aspect, an embodiment of the present invention provides an image processing method, where the method includes:
determining the light and dark distribution condition corresponding to the detection frame of the video image;
determining the dark light enhancement intensity of the video image according to the light and dark distribution condition;
and carrying out light-dark adjustment on the video image according to the dark light enhancement intensity.
In a second aspect, an embodiment of the present invention further provides an image processing apparatus, including:
the distribution state module is used for determining the light and dark distribution condition corresponding to the detection frame of the video image;
the intensity determination module is used for determining the dim light enhancement intensity of the video image according to the light and dark distribution condition;
and the image adjusting module is used for carrying out light-dark adjustment on the video image according to the dark light enhancement intensity.
In a third aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement an image processing method as in any one of the embodiments of the present invention.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the image processing method according to any one of the embodiments of the present invention.
According to the invention, through detecting the light and dark distribution condition of the video image, after the actual light and dark distribution condition of the video image is matched with the proper dark light enhancement intensity, the light and dark adjustment is carried out on the video image, so that the problems of over-darkness or over-exposure and poor display effect after the video image is processed are solved, the dynamic adjustment of the dark light enhancement intensity during the video image processing is realized, and the effect of effectively enhancing the definition of the video image is realized.
Drawings
Fig. 1 is a flowchart of an image processing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of an image processing method according to a second embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a pixel block dividing method according to a second embodiment of the present invention;
FIG. 4 is a diagram illustrating a relationship between a luminance mean and a dim light enhancement intensity according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of an image processing apparatus according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only a part of the structures related to the present invention, not all of the structures, are shown in the drawings, and furthermore, embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
Example one
Fig. 1 is a flowchart of an image processing method according to an embodiment of the present invention, where the embodiment is applicable to a situation of improving video image definition, the method may be executed by an image processing apparatus, the apparatus may be implemented in a hardware and/or software manner, and may be generally integrated in an intelligent terminal, and specifically includes the following steps:
and step 110, determining the light and dark distribution condition corresponding to the detection frame of the video image.
When the image continuously changes more than 24 frames per second, human eyes cannot distinguish the static picture of a single image according to the persistence of vision principle, but see smooth and continuous dynamic pictures, and the continuous pictures are called videos. In the embodiment of the present invention, the detection frame may be understood as a certain frame image or a certain number of frame images in the video image, and may indirectly reflect the state of the entire video image. The light and dark distribution condition can be understood as the brightness condition of the detected frame image and the light and dark distribution thereof.
Specifically, after the video image is acquired, a plurality of frame images may be randomly extracted from the video image as the detection frame, or a plurality of previous frame images of the video image may be selected as the detection frame while the video image is acquired. And after the detection frame is determined, calculating and counting the light and dark distribution condition of the detection frame. The image format of the detection frame can be a YUV format, and the light and dark distribution condition of the detection frame can include the brightness condition of each pixel value of the detection frame, the number of the detection frames with higher overall brightness, and the like. The embodiment of the invention analyzes the light and dark distribution condition of the detection frame of the video image, can reduce the data processing quantity, improve the processing speed and realize the real-time property of image processing.
And step 120, determining the dark light enhancement intensity of the video image according to the light and dark distribution condition.
The dim light enhancement intensity can be understood as an intensity parameter when the dim light enhancement is performed on the video image, and the higher the dim light enhancement intensity is, the higher the brightness needs to be increased when the video image is processed.
Specifically, the light and dark distribution condition corresponding to the detection frame determined in step 110 may be regarded as the light and dark distribution condition of the whole video image, and the dark light enhancement intensity of the video image may be determined according to the corresponding relationship between the light and dark distribution condition and the dark light enhancement intensity. The correspondence between the light-dark distribution condition and the dark light enhancement intensity may be preset, for example, a linear relationship or a nonlinear relationship set according to practical experience, and the dark light enhancement intensity corresponding to the light-dark distribution condition may be determined through the linear relationship or the nonlinear relationship, for example, different light-dark distribution conditions correspond to different values of the dark light enhancement intensity, and the corresponding dark light enhancement intensity may be determined through the light-dark distribution condition.
And step 130, adjusting the light and the dark of the video image according to the dark light enhancement intensity.
The dimming may be understood as performing dimming enhancement on the video image to improve the sharpness of the video image.
Specifically, the video image is subjected to the dimming adjustment according to the dimming enhancement intensity determined in step 120, and any image dimming enhancement method can be used for processing, so that the brightness and the definition of the video image are improved, and the dimming enhancement effect is achieved.
According to the embodiment of the invention, the dim light enhancement intensity of the video image is obtained by determining the dim light distribution condition corresponding to the detection frame of the video image, and the dimming adjustment is performed on the video image according to the dim light enhancement intensity.
Example two
Fig. 2 is a flowchart of an image processing method according to a second embodiment of the present invention, and referring to fig. 2, the second embodiment of the present invention embodies the image processing method, and the image processing method according to the second embodiment of the present invention includes:
step 210, selecting at least one image frame in the video image as a detection frame.
The image frame may be understood as a certain frame image of the video image, and correspondingly, the detection frame may be one or more image frames in the video image.
Specifically, the method for determining the detection frame may be selected according to actual requirements, and after the whole video image is obtained, a plurality of image frames may be randomly extracted from the video image or extracted according to a certain rule as the detection frame; or selecting a plurality of previous image frames of the video image as detection frames while acquiring the video image. The real state of the video image can be more comprehensively reflected by selecting the detection frame from the whole video image, and the dim light enhancement intensity of the video image can be dynamically determined while the video image is obtained by selecting the first plurality of image frames of the video image as the detection frame, so that the real-time property of image processing is ensured.
Step 220, the detection frame is divided into at least one pixel block, and the brightness value of each pixel block is determined.
The dividing of the pixel blocks can be understood as grouping all the pixel points in the detection frame according to the positions, and one pixel block is composed of all the pixel points in a certain area of the detection frame. The brightness value can be understood as a parameter value representing the brightness degree of the image, and specifically can be a brightness component of a pixel point.
Specifically, each detection frame is divided into a plurality of pixel blocks, the pixel blocks can be divided in equal proportion or according to other preset rules, and the brightness value of each pixel block is calculated according to the numerical value of the pixel points in the divided pixel blocks. The main purpose of the step is to divide the detection frame into a plurality of pixel blocks to respectively calculate the brightness values, and the local mean value of the detection frame can highlight the brightness information of different areas of the image, so that the influence of mutual compensation of extreme brightness values during mean value calculation is reduced, and the state of the subsequent analysis detection frame is more accurate.
Further, on the basis of the above embodiment of the present invention, determining the luminance value of each pixel block may include: determining the sum of Y components of pixels included in each pixel block and the number of the pixels; and taking the ratio of the sum of the Y components to the number of the pixels as the brightness value of each pixel block.
When the image format of the detection frame is the YUV format, the Y component in the image pixel point can represent the brightness value of the pixel point.
Specifically, when the brightness value of a certain pixel block is determined, the number of pixel points included in the pixel block may be counted, the values of the Y components of all the pixel points in the pixel block are added to obtain the sum of the Y components of the pixel block, and then the sum of the Y components of the pixel block is divided by the number of the pixel points included in the pixel block, that is, the mean value of the Y components of the pixel points in the pixel block is calculated, and the value may be used as the brightness value of the pixel block. Similarly, the luminance values of all pixel blocks can be calculated.
Illustratively, as shown in fig. 3, a detection frame is divided into 12 pixel blocks in equal proportion, according to the formula:
Figure BDA0002409015000000071
the luminance value of each pixel block is calculated. Wherein p isiCan express the value of Y component of each pixel point in the pixel block, M can express the number of pixel points in the pixel block, lbMay represent the mean value of the luminance of a block of pixels.
Step 230, determining a target pixel block in the pixel blocks according to the brightness value and the preset brightness.
The target pixel block may be understood as a pixel block of the pixel blocks that has an influence on the parameter setting of the subsequent light-dark enhancement processing, for example, a too-dark pixel block or a too-bright pixel block.
Optionally, determining the target pixel block in the pixel blocks according to the brightness value and the preset brightness may include: taking the pixel block with the brightness value smaller than and/or equal to the preset brightness as a target pixel block; or, a pixel block with a brightness value greater than and/or equal to a preset brightness is taken as the target pixel block.
Specifically, the brightness value of each pixel block determined in step 220 is compared with the preset brightness, and if the brightness value of the pixel block is less than or equal to the preset brightness, the pixel block is a dark light block, and may be determined as the target pixel block. In another case, the brightness value of each pixel block determined in step 220 is compared with the preset brightness, and if the brightness value of the pixel block is greater than or equal to the preset brightness, the pixel block is a bright block, and may be determined as the target pixel block. In practical application, the determination condition of the target pixel block may be set according to specific needs, for example, when the bright light block is selected as the target pixel block, the brightness condition of the video image may be indirectly reflected through the number and distribution condition of the bright light block, and when the number of the bright light blocks is large, the video image may select a low dark light enhancement intensity to prevent the video image from having an overexposure problem when performing the dark enhancement processing; when the number of the bright blocks is small, the video image can be considered to be dark, so that the image light and dark enhancement processing can be performed by selecting high dark light enhancement intensity.
And 240, if the ratio of the total number of the target pixel blocks in the detection frame to the total number of the pixel blocks is greater than or equal to a preset ratio, taking the detection frame as a target frame, and counting the total number of the targets of the target frame in the detection frame.
The target frame may be understood as a detection frame that is specially marked for determining subsequent image processing parameters. The total number of targets may be understood as the number of target frames in the detection frame.
Specifically, for a certain detection frame, the number of pixel blocks in the detection frame may be obtained and recorded as the total number of pixel blocks, the number of target pixel blocks in all the pixel blocks of the detection frame is counted and recorded as the total number of target pixel blocks, and the ratio of the total number of target pixel blocks to the total number of pixel blocks is calculated. Similarly, the method can be used for judging all the detection frames, and counting the number of the target frames in the detection frames as the total target number.
And step 250, determining the brightness mean value of the detection frame according to the brightness value of each target pixel block, and taking the brightness mean value and the total number of targets as the light and dark distribution condition.
The luminance mean value can be understood as a reference value for detecting the luminance condition of the frame.
Specifically, a luminance reference value may be calculated as a luminance average value of the detection frame according to the luminance value of each target pixel block in the detection frame, and the calculation method may be an average value of the luminance values of each target pixel block or a weighted sum of the luminance values of each target pixel block. The brightness mean of the detection frame and the total number of targets determined in step 240 may be used as the light and dark distribution condition of the detection frame. Compared with the judgment condition that the global brightness mean value of the image is used as the image brightness, the local mean value calculation method of determining the brightness mean value of the detection frame according to the brightness value of each target pixel block can highlight the brightness information of different areas of the image, so that the influence of mutual compensation of extreme brightness values in the process of averaging is reduced. For example, in a backlight image, the ambient light brightness value is usually high and the target object brightness value is low, and the global brightness average value may not be low, and if the global brightness average value is used as the image brightness average value, the value reflects that the image brightness does not conform to the brightness of the human eye to the image attention point.
Further, on the basis of the foregoing embodiment of the present invention, determining a mean luminance value of the detection frame according to the luminance value of each target pixel block may include: determining a weighting coefficient according to the position of each target pixel block in the corresponding detection frame; taking the product of the corresponding brightness value and the corresponding weighting coefficient as a weighted brightness value for each target pixel block; and taking the ratio of the sum of the weighted brightness values of the target pixel blocks and the sum of the weighted coefficients of the target pixel blocks as the brightness mean value of the detection frame.
Specifically, when the human eye views the video image, the attention degrees of different positions of the image are different, so that the possible attention degree of the target pixel block can be judged according to the position of the target pixel block in the detection frame, and the weighting coefficient of the target pixel block can be determined according to the attention degree. After the weighting coefficients of the target pixel blocks are determined, the luminance values of the target pixel blocks and the corresponding weighting coefficients can be obtained, the luminance values of the target pixel blocks and the weighting coefficients are multiplied to be recorded as the weighted luminance values of the target pixel blocks, and after the weighted luminance values of all the target pixel blocks in the detection frame are calculated, the sum of all the weighted luminance values can be used as the luminance average value of the detection frame.
Generally, human eyes usually pay attention to the middle area of an image and ignore the edge area, and the brightness of the middle area can influence the judgment of the human eyes on the brightness of the image more visually, so when determining the weighting coefficient of a target pixel block, the weighting coefficient of the target pixel block at the middle position of a detection frame can be set higher, and the weighting coefficient of the target pixel block at the edge area is set lower.
For example, human eyes usually pay attention to the middle area of an image and ignore edges, and the brightness of the middle area can more visually influence the judgment of the brightness of the image by the human eyes, so as shown in fig. 3, the weighting coefficient of the brightness of the pixel blocks in the middle area in a detection frame is set to be higher than the weighting coefficient of the brightness of the pixel blocks in the edge area, and thus the determined image processing parameters are more in line with the actual requirements. According to the formula:
Figure BDA0002409015000000091
and determining the brightness mean value of the detection frame. Where DB may represent a target pixel block,/bMay represent the mean value of the luminance of the pixel block, w may represent the weighting coefficient of the corresponding position of the pixel block, wdbMay represent the sum of the weighting coefficients of the target pixel block,/dbMay represent the luminance mean of the detected frame and T may represent the number of target pixel blocks.
And step 260, acquiring the brightness mean value and the total number of targets in the light and dark distribution condition, and selecting the dark light enhancement intensity in a preset intensity value set according to the brightness mean value and the total number of targets.
The dim light enhancement intensity can be understood as an intensity parameter when performing dim light enhancement on a video image, and the intensity value set can be understood as a value set of selectable dim light enhancement intensity, which can be a value interval or a plurality of discrete values.
Specifically, after the light and dark distribution condition is obtained, the brightness mean value and the total target number are extracted from the light and dark distribution condition, and the matched dark light enhancement intensity is selected from the preset intensity value set according to the corresponding relation between the brightness mean value and the total target number and the dark light enhancement intensity. The correspondence between the brightness mean and the target total number and the dim light enhancement intensity can be preset according to experience and practical conditions, and the expression form of the correspondence can be a linear function, a piecewise function or other reasonable function forms, for example, the dim light enhancement intensity can be a linear function value with the brightness mean and the target total number as variables.
Further, on the basis of the above embodiment of the present invention, selecting the dim light enhancement intensity from the preset intensity value set according to the brightness mean and the target total number may include: if the total number of the targets is smaller than the product of the total number of the detection frames and the proportion of the adjustment threshold value, selecting the minimum intensity value in the preset intensity value set as the dim light enhancement intensity; otherwise, selecting the dim light enhancement intensity from the preset intensity value set according to the corresponding relation between the brightness mean value and the dim light enhancement intensity, wherein the corresponding relation between the brightness mean value and the dim light enhancement intensity can comprise a primary proportional relation, a secondary proportional relation and a sinusoidal proportional relation.
Specifically, the total number of the detection frames and the preset adjustment threshold ratio can be obtained, the two are multiplied, the product is compared with the total number of the targets, if the total number of the targets is smaller than the product of the total number of the detection frames and the adjustment threshold ratio, the proportion occupied by the target frames can be considered not to be high, and the overall brightness of the video image is higher at the moment, so that the minimum intensity value in the preset intensity value set can be selected as the dim light enhancement intensity; if the total number of the targets is not less than the product of the total number of the detection frames and the ratio of the adjustment threshold, it is indicated that the target frames reach a certain ratio in the detection frames, and at this time, the overall brightness of the video image is relatively low, and at this time, the dark light enhancement intensity may be selected according to the brightness mean value of the detection frames, for example, the dark light enhancement intensity may decrease at a constant speed as the brightness mean value increases, or the dark light enhancement intensity may decrease correspondingly as the brightness mean value increases or decreases correspondingly, or the dark light enhancement intensity may increase correspondingly as the brightness mean value decreases, and the dark light enhancement intensity may decrease rapidly as the brightness mean value increases.
Further, on the basis of the embodiment of the invention, a correction increment of the dim light enhancement intensity is determined, and the dim light enhancement intensity is corrected according to the correction increment.
The correction increment is understood to be a variation amount when the dim light enhancement intensity is appropriately adjusted.
Specifically, besides the parameters used for determining the dim light enhancement intensity, there are some parameters which have an influence on the dim light enhancement intensity, so that the intensity correction can be performed on the dim light enhancement intensity by determining the correction increment according to these parameters, for example, when the target pixel block is determined as a dim light block, the correction increment can be determined according to the number of bright light blocks and the brightness value to perform fine adjustment on the dim light enhancement intensity, and when the number of bright light blocks and the brightness value are higher, the operation can weaken the enhancement intensity without causing the problem of overexposure of the video image.
Illustratively, a maximum value E of the intensity of the increase of the dim light can be setmaxMinimum value EminThe corresponding set of intensity values is [ E ]min,Emax]Determining the dim light enhancement intensity according to the following correspondence:
Figure BDA0002409015000000111
wherein n isdfCan represent the total number of targets, RdarkMay indicate that the threshold is adjusted, ncheckframesMay represent the total number of detected frames, f (l)db) Can express the corresponding relation between the brightness mean value and the dark light enhancement intensity, RpenaltyMay be a penalty factor, wdbMay represent the sum of the weighting coefficients of the target pixel block, wlbMay represent the sum of the non-target pixel block weighting coefficients,
Figure BDA0002409015000000112
a modified increment of the dim light boost intensity may be indicated to attenuate the dim light boost intensity.
Correspondence f (l) between luminance mean and dim light enhancement intensitydb) There may be various expression forms, as shown in fig. 4, the first proportional relationship may be a first-order proportional relationship, a second-order proportional relationship, or a sinusoidal proportional relationship, and the first-order proportional relationship shown in fig. 4 may indicate that the value of the dim light enhancement intensity decreases at a constant speed with the increase of the brightness mean value; the quadratic proportion relationship shown in fig. 4 can indicate that the value of the dark light enhancement intensity is relatively small when the brightness mean value is higher or lower, and the value of the dark light enhancement intensity is relatively small when the brightness mean value is moderateThe value of the dark light enhancement intensity is relatively large; the sinusoidal scaling shown in fig. 4 may indicate that the dark enhancement intensity decreases rapidly with a lower luminance mean value and approaches the minimum value of the dark enhancement intensity with a higher luminance mean value. Other reasonable correspondences are also possible, and are not shown here too much.
And 270, performing light and dark adjustment on the video image according to the dark light enhancement intensity.
Specifically, an applicable dim light enhancement method can be adopted, and relevant parameter values in the dim light enhancement method are adjusted according to the dim light enhancement intensity determined in the above steps, so that the video image is processed, and the definition of the video image is improved.
According to the technical scheme of the embodiment of the invention, the detection frame is analyzed, the brightness value of the target pixel block in the detection frame is adopted to determine the brightness mean value of the detection frame, the brightness information of the image target area can be highlighted, and the influence of the extreme brightness value in the non-target area on the determination of the brightness mean value can be reduced; meanwhile, the brightness mean value of the detection frame and the total number of the targets of the target frame are used as the light-dark distribution condition, the matching degree of the dark light enhancement intensity of the video image is improved, the brightness and the definition of the video image are improved, the obtained video image cannot be too dark or too exposed, and the video image is more suitable for being watched by human eyes.
EXAMPLE III
Fig. 5 is a schematic structural diagram of an image processing apparatus according to a third embodiment of the present invention. The image processing device provided by the embodiment of the invention can execute the image processing method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. The device can be implemented by software and/or hardware, and specifically comprises: a distribution status module 310, an intensity determination module 320, and an image adjustment module 330.
The distribution status module 310 is configured to determine a light and dark distribution status corresponding to a detected frame of the video image.
An intensity determining module 320, configured to determine a dim light enhancement intensity of the video image according to the light and dark distribution condition.
And the image adjusting module 330 is configured to perform light-dark adjustment on the video image according to the dark-light enhancement intensity.
According to the embodiment of the invention, the dark light enhancement intensity is dynamically adjusted when the video image is subjected to the dark adjustment through detecting the dark distribution condition of the video image, so that the problem that the display effect is poor when different video images are processed by using the same dark light enhancement intensity is solved, the matching of the proper dark light enhancement intensity according to the actual dark distribution condition of the video image is realized, and the effect of effectively enhancing the definition of the video image is realized.
Example four
Fig. 6 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention, as shown in fig. 6, the apparatus includes a processor 40, a memory 41, an input device 42, and an output device 43; the number of processors 40 in the device may be one or more, and one processor 40 is taken as an example in fig. 6; the processor 40, the memory 41, the input device 42 and the output device 43 in the apparatus may be connected by a bus or other means, as exemplified by the bus connection in fig. 6.
The memory 41, which is a computer-readable storage medium, may be used to store software programs, computer-executable programs, and modules, such as program modules (e.g., the distribution state module 310, the intensity determination module 320, and the image adjustment module 330) corresponding to the image processing method in the embodiment of the present invention. The processor 40 executes various functional applications of the apparatus and data processing, i.e., implements the image processing method described above, by executing software programs, instructions, and modules stored in the memory 41.
The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 41 may further include memory located remotely from processor 40, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 42 is operable to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 43 may include a display device such as a display screen.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform an image processing method, including:
determining the light and dark distribution condition corresponding to the detection frame of the video image;
determining the dark light enhancement intensity of the video image according to the light and dark distribution condition;
and carrying out light-dark adjustment on the video image according to the dark light enhancement intensity.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform related operations in the image processing method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the image processing apparatus, the included units and modules are merely divided according to the functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (12)

1. An image processing method, characterized in that the method comprises:
determining the light and dark distribution condition corresponding to the detection frame of the video image;
determining the dark light enhancement intensity of the video image according to the light and dark distribution condition;
and carrying out light-dark adjustment on the video image according to the dark light enhancement intensity.
2. The method of claim 1, further comprising:
and selecting at least one image frame in the video image as a detection frame.
3. The method of claim 1, wherein determining the light-dark distribution condition corresponding to the detected frame of the video image comprises:
dividing the detection frame into at least one pixel block and determining the brightness value of each pixel block;
determining a target pixel block in the pixel blocks according to the brightness value and a preset brightness;
if the ratio of the total number of the target pixel blocks to the total number of the pixel blocks in the detection frame is larger than or equal to a preset ratio, taking the detection frame as a target frame, and counting the total number of the targets of the target frame in the detection frame;
and determining the brightness mean value of the detection frame according to the brightness value of each target pixel block, and taking the brightness mean value and the target total number as the light and dark distribution condition.
4. The method of claim 3, wherein said determining a luminance value for each of said blocks of pixels comprises:
determining the sum of Y components of pixels included in each pixel block and the number of pixels;
and taking the ratio of the sum of the Y components to the number of the pixel points as the brightness value of each pixel block.
5. The method according to claim 3, wherein said determining a target pixel block among said pixel blocks according to said brightness value and a preset brightness comprises:
taking the pixel block with the brightness value smaller than and/or equal to the preset brightness as a target pixel block; or the like, or, alternatively,
and taking the pixel block with the brightness value larger than and/or equal to the preset brightness as a target pixel block.
6. The method of claim 3, wherein said determining a mean luminance value of said detected frames from luminance values of said target pixel blocks comprises:
determining a weighting coefficient according to the position of each target pixel block corresponding to the detection frame;
recording a product of the corresponding luminance value and the corresponding weighting coefficient as a weighted luminance value for each target pixel block;
and taking the ratio of the sum of the weighted brightness values of each target pixel block to the sum of the weighted coefficients of each target pixel block as the brightness mean value of the detection frame.
7. The method of claim 1, wherein said determining a dim light enhancement intensity for the video image according to the light-dark distribution condition comprises:
acquiring a brightness mean value and a target total number in the light and dark distribution condition;
and selecting the dark light enhancement intensity from a preset intensity value set according to the brightness mean value and the target total number.
8. The method of claim 7, wherein selecting a dim enhancement intensity from a set of preset intensity values according to the luminance mean and the target total comprises:
if the target total number is smaller than the product of the total number of the detection frames and the proportion of the adjustment threshold value, selecting the minimum intensity value in the preset intensity value set as the dim light enhancement intensity;
otherwise, selecting the dark light enhancement intensity in the preset intensity value set according to the corresponding relation between the brightness mean value and the dark light enhancement intensity, wherein the corresponding relation between the brightness mean value and the dark light enhancement intensity at least comprises a primary proportional relation, a secondary proportional relation and a sinusoidal proportional relation.
9. The method of claim 8, further comprising:
determining a correction increment of the dim light enhancement intensity, and correcting the dim light enhancement intensity according to the correction increment.
10. An image processing apparatus, characterized in that the apparatus comprises:
the distribution state module is used for determining the light and dark distribution condition corresponding to the detection frame of the video image;
the intensity determination module is used for determining the dim light enhancement intensity of the video image according to the light and dark distribution condition;
and the image adjusting module is used for carrying out light-dark adjustment on the video image according to the dark light enhancement intensity.
11. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a memory for storing one or more programs which, when executed by the processor, cause the one or more processors to implement the image processing method of any of claims 1-9.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the image processing method of any one of claims 1 to 9.
CN202010170504.3A 2020-03-12 2020-03-12 Image processing method, device, equipment and storage medium Active CN111369471B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010170504.3A CN111369471B (en) 2020-03-12 2020-03-12 Image processing method, device, equipment and storage medium
PCT/CN2021/080203 WO2021180173A1 (en) 2020-03-12 2021-03-11 Image processing method and apparatus, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010170504.3A CN111369471B (en) 2020-03-12 2020-03-12 Image processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111369471A true CN111369471A (en) 2020-07-03
CN111369471B CN111369471B (en) 2023-09-08

Family

ID=71210387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010170504.3A Active CN111369471B (en) 2020-03-12 2020-03-12 Image processing method, device, equipment and storage medium

Country Status (2)

Country Link
CN (1) CN111369471B (en)
WO (1) WO2021180173A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111915529A (en) * 2020-08-05 2020-11-10 广州市百果园信息技术有限公司 Video dim light enhancement method and device, mobile terminal and storage medium
CN112601068A (en) * 2020-12-15 2021-04-02 济南浪潮高新科技投资发展有限公司 Video data augmentation method, device and computer readable medium
CN112863010A (en) * 2020-12-29 2021-05-28 宁波友好智能安防科技有限公司 Video image processing system of anti-theft lock
WO2021180173A1 (en) * 2020-03-12 2021-09-16 百果园技术(新加坡)有限公司 Image processing method and apparatus, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340512A (en) * 2008-08-12 2009-01-07 中兴通讯股份有限公司 Video image processing method
CN101385027A (en) * 2006-02-10 2009-03-11 皇家飞利浦电子股份有限公司 Metadata generating method and device
CN109166533A (en) * 2018-09-29 2019-01-08 重庆石墨烯研究院有限公司 A method of display backlight is adjusted according to image brightness values
CN109936698A (en) * 2017-12-18 2019-06-25 杭州海康威视数字技术股份有限公司 A kind of automatic exposure control method, device, electronic equipment and storage medium
CN110225403A (en) * 2019-07-12 2019-09-10 四川长虹电器股份有限公司 The bright dark scene of video image identifies control method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102223546B (en) * 2011-06-07 2016-06-08 中兴通讯股份有限公司 The luminance regulating method of video image and device
US10628929B2 (en) * 2018-05-28 2020-04-21 Augentix Inc. Method and computer system of image enhancement
CN109543581A (en) * 2018-11-15 2019-03-29 北京旷视科技有限公司 Image processing method, image processing apparatus and non-volatile memory medium
CN111369471B (en) * 2020-03-12 2023-09-08 广州市百果园信息技术有限公司 Image processing method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101385027A (en) * 2006-02-10 2009-03-11 皇家飞利浦电子股份有限公司 Metadata generating method and device
CN101340512A (en) * 2008-08-12 2009-01-07 中兴通讯股份有限公司 Video image processing method
CN109936698A (en) * 2017-12-18 2019-06-25 杭州海康威视数字技术股份有限公司 A kind of automatic exposure control method, device, electronic equipment and storage medium
CN109166533A (en) * 2018-09-29 2019-01-08 重庆石墨烯研究院有限公司 A method of display backlight is adjusted according to image brightness values
CN110225403A (en) * 2019-07-12 2019-09-10 四川长虹电器股份有限公司 The bright dark scene of video image identifies control method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021180173A1 (en) * 2020-03-12 2021-09-16 百果园技术(新加坡)有限公司 Image processing method and apparatus, device and storage medium
CN111915529A (en) * 2020-08-05 2020-11-10 广州市百果园信息技术有限公司 Video dim light enhancement method and device, mobile terminal and storage medium
CN112601068A (en) * 2020-12-15 2021-04-02 济南浪潮高新科技投资发展有限公司 Video data augmentation method, device and computer readable medium
CN112863010A (en) * 2020-12-29 2021-05-28 宁波友好智能安防科技有限公司 Video image processing system of anti-theft lock
CN112863010B (en) * 2020-12-29 2022-08-05 宁波友好智能安防科技有限公司 Video image processing system of anti-theft lock

Also Published As

Publication number Publication date
CN111369471B (en) 2023-09-08
WO2021180173A1 (en) 2021-09-16

Similar Documents

Publication Publication Date Title
CN111369471A (en) Image processing method, device, equipment and storage medium
CN109191395B (en) Image contrast enhancement method, device, equipment and storage medium
US11113795B2 (en) Image edge processing method, electronic device, and computer readable storage medium
CN102932582B (en) Method and device for realizing motion detection
US8644638B2 (en) Automatic localized adjustment of image shadows and highlights
EP1489855A2 (en) Automatic color correction for sequences of images
CN110751608B (en) Night scene high dynamic range image fusion method and device and electronic equipment
WO2017166479A1 (en) Light measurement method and apparatus of image collection device
WO2023098251A1 (en) Image processing method, device, and readable storage medium
CN111314622A (en) Adaptive adjustment method, device and system for image brightness under various scenes
CN113935911A (en) High dynamic range video image processing method, computer device and computer readable storage medium
CN110175967B (en) Image defogging processing method, system, computer device and storage medium
CN111917986A (en) Image processing method, medium thereof, and electronic device
CN109982012B (en) Image processing method and device, storage medium and terminal
CN113422893B (en) Image acquisition method and device, storage medium and mobile terminal
CN109672829A (en) Method of adjustment, device, storage medium and the terminal of brightness of image
CN112561906A (en) Image processing method, device, equipment and medium
CN114266803A (en) Image processing method, image processing device, electronic equipment and storage medium
CN112446848A (en) Image processing method and device and electronic equipment
CN112085002A (en) Portrait segmentation method, portrait segmentation device, storage medium and electronic equipment
CN112153296B (en) Automatic exposure control method and device and camera with FPGA
TWI681675B (en) Contrast enhancement method based on dynamic range compression and electronic apparatus thereof
CN113379631A (en) Image defogging method and device
Qian et al. A local tone mapping operator for high dynamic range images
CN113837951A (en) Image brightness improving method and device, data processing equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant