CN115914850A - Method for enhancing permeability of wide dynamic image, electronic device and storage medium - Google Patents

Method for enhancing permeability of wide dynamic image, electronic device and storage medium Download PDF

Info

Publication number
CN115914850A
CN115914850A CN202110937025.4A CN202110937025A CN115914850A CN 115914850 A CN115914850 A CN 115914850A CN 202110937025 A CN202110937025 A CN 202110937025A CN 115914850 A CN115914850 A CN 115914850A
Authority
CN
China
Prior art keywords
wide dynamic
parameters
image
parameter
sub
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.)
Pending
Application number
CN202110937025.4A
Other languages
Chinese (zh)
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.)
Xi'an Yu Vision Mdt Infotech Ltd
Original Assignee
Xi'an Yu Vision Mdt Infotech 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 Xi'an Yu Vision Mdt Infotech Ltd filed Critical Xi'an Yu Vision Mdt Infotech Ltd
Priority to CN202110937025.4A priority Critical patent/CN115914850A/en
Publication of CN115914850A publication Critical patent/CN115914850A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Image Processing (AREA)

Abstract

The embodiment of the invention discloses a method for enhancing permeability of a wide dynamic image, electronic equipment and a storage medium. Wherein the method comprises the following steps: acquiring a shot image of shooting equipment in a wide dynamic scene, and determining a light and shade scale factor and ambient illumination according to the shot image; acquiring at least one group of reference wide dynamic parameters from a pre-established wide dynamic parameter lookup table according to the light and shade scale factor and the ambient illumination; and determining a group of target width dynamic parameters according to the at least one group of reference width dynamic parameters, and performing wide dynamic effect adjustment on the shot image according to the target width dynamic parameters. The method provided by the embodiment of the invention can improve the adaptivity and stability of the effect of enhancing the permeability of the image in wide dynamic scenes with various illumination intensities.

Description

Method for enhancing permeability of wide dynamic image, electronic device and storage medium
Technical Field
The present invention relates to, but not limited to, the field of camera control, and in particular, to a method, an electronic device, and a storage medium for enhancing permeability of a wide dynamic image.
Background
Generally, when a monitoring device (such as a camera) acquires an image of a target scene, if a strong light source (such as sunlight, a lamp or light reflection) irradiates the target scene, a high-brightness area and a low-brightness area (such as a shadow, a backlight and other areas with relatively low brightness) exist in the image at the same time, so that the bright area of the image becomes white due to overexposure, and the dark area becomes black due to underexposure, which seriously affects the image quality.
The monitoring device has limitations on the appearance of the brightest area and the darker area in the same target scene, such as short exposure time, too dark information, long exposure time, overflow and loss of information in the bright area, and the limitations are the so-called "dynamic range", i.e. the ratio of the maximum value to the minimum value of light in the target scene.
In order to improve image quality, monitoring equipment generally needs to output wide dynamic images, and the wide dynamic images can provide more dynamic ranges and image details and provide better visual experience for users, so that the wide dynamic images are widely applied to the fields of video monitoring, geographic information systems, medical images, movie and television special effects and the like.
In order to obtain a wide dynamic image, the monitoring device may expose the target scene multiple times, acquire low dynamic images with different exposure times, that is, the exposure times of the low dynamic images are different, and synthesize a plurality of low dynamic images into the wide dynamic image. However, in the foregoing manner, the monitoring device needs to support multiple exposures on the target scene, and the time length of each exposure is different, and if the monitoring device does not support multiple exposures on the target scene, the monitoring device cannot obtain a wide dynamic image, that is, the image quality is low.
With the wide application of electronic devices with shooting functions, such as mobile phones and video cameras, the quality requirements of users for shooting pictures are higher and higher. The quality of the picture taken by the electronic device is greatly influenced by ambient light, and particularly, light with strong light-dark contrast exists in the same scene, which is called as a wide dynamic scene. Wherein, under the irradiation of strong light sources such as sunlight, lamplight or reflection, a high-brightness area appears in a shot image; however, a low-luminance area appears in the captured image under the influence of backlight and shadow. However, since the electronic device has a limitation on the appearance of the brightest area and the darkest area in the same scene, that is, there is a Dynamic Range (WDR) in the shooting of the camera, the pictures in some high-brightness areas in the shot image become white due to overexposure, and the pictures in some low-brightness areas become black due to underexposure, which seriously affects the image quality.
Disclosure of Invention
The embodiment of the disclosure provides a method for enhancing permeability of a wide dynamic image, an electronic device and a storage medium, wherein at least one group of reference wide dynamic parameters matched with a current shot image is obtained according to a pre-established wide dynamic parameter lookup table, and then wide dynamic effect optimization is performed after optimal target wide dynamic parameters suitable for the current shot image are further determined, so that the adaptivity and the stability of an image permeability enhancing scheme under wide dynamic scenes with various illumination intensities can be improved.
In one aspect, an embodiment of the present disclosure provides a method for enhancing permeability of a wide dynamic image, including:
acquiring a shot image of shooting equipment in a wide dynamic scene, and determining a light and shade scale factor and ambient illumination according to the shot image;
acquiring at least one group of reference wide dynamic parameters from a pre-established wide dynamic parameter lookup table according to the light and shade scale factor and the ambient illumination;
and determining a group of target width dynamic parameters according to the at least one group of reference width dynamic parameters, and performing wide dynamic effect adjustment on the shot image according to the target width dynamic parameters.
On the other hand, the embodiment of the present disclosure further provides an electronic device, including:
one or more processors;
a storage device to store one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method for increasing permeability of wide dynamic images as described in any one of the embodiments of the present disclosure.
In another aspect, the embodiments of the present disclosure further provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the method for enhancing permeability of wide dynamic images according to any one of the embodiments of the present disclosure.
According to the scheme provided by the embodiment of the invention, the test scenes are divided according to the light and shade scale factor and the ambient illumination, the wide dynamic parameter lookup table after optimization under a plurality of test scenes is established in advance, and the reference wide dynamic parameter is searched from the image information of the current shot image so as to determine the target wide dynamic parameter for carrying out wide dynamic effect optimization on the current shot image. Therefore, the efficiency of determining the target wide dynamic parameters is higher, the adaptability is stronger, and the better wide dynamic parameters can be determined so as to effectively enhance the permeability of the wide dynamic image in each scene.
Other aspects will be apparent upon reading and understanding the attached figures and detailed description.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1 is a flow chart of a method for increasing permeability of wide dynamic images according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating the result of wide dynamic parameter optimization provided by an embodiment of the present invention;
FIG. 3 is a flowchart of another method for increasing permeability of wide dynamic images according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that all directional indicators (such as up, down, left, right, front, and back \8230;) in the embodiments of the present invention are only used to explain the relative positional relationship between the components, the motion situation, etc. in a specific posture (as shown in the attached drawings), and if the specific posture is changed, the directional indicators are changed accordingly.
In addition, the descriptions related to "first", "second", etc. in the present invention are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "connected," "secured," and the like are to be construed broadly, and for example, "secured" may be a fixed connection, a removable connection, or an integral part; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In addition, the technical solutions in the embodiments of the present invention may be combined with each other, but it must be based on the realization of the technical solutions by those skilled in the art, and when the technical solutions are contradictory to each other or cannot be realized, such a combination of the technical solutions should not be considered to exist, and is not within the protection scope of the present invention.
In order to improve the adaptivity and stability of the image transparency effect in wide dynamic scenes with various illumination intensities, the scheme provided by the embodiment of the disclosure obtains smooth and various reference wide dynamic parameters (including gamma curves) based on the wide dynamic parameter optimization of the shooting device performed in advance in a plurality of test scenes, and performs adjustment or inheritance according to image information to determine the wide dynamic parameters for controlling the shooting device.
Before the related embodiments, several aspects related to the embodiments of the present disclosure are introduced:
the Wide Dynamic, wide Dynamic Range (WDR) technique is a technique in which multiple frames of images are obtained by shooting the same scene with different exposure amounts, and then the multiple frames of images are synthesized into one frame. Among them, a frame with a large exposure amount is called a long exposure frame or a long frame because the exposure time is long, and dark area information can be effectively retained. The frame with a small exposure amount is called a short frame or a short exposure frame because the exposure time is short and the information of the bright area can be effectively retained. The bright area information in the short frame and the dark area information in the long frame are synthesized into one frame through a wide dynamic technology, and the bright area information and the dark area information can be simultaneously reflected.
Gamma curve, gamma (Gamma) curve, a curve defining the correspondence between input and output of a video image, is derived from the corresponding curve of a CRT (display/television), i.e. its brightness versus input voltage.
The DRC (Dynamic range compression) strength determines the compression degree of the Dynamic range of the image, the brightness of the image can be greatly raised to a high level when the compression degree is larger, the whole image is brighter, and the details of a dark area are clearer.
A luminance mapping function having an abscissa as input luminance and an ordinate as output luminance, the luminance mapping function (curve) being used for luminance optimization.
A motion detection threshold for determining whether an object in the picture is stationary or moving.
And the noise reduction strength of the short frame is increased, and the larger the value is.
A short exposure threshold, and only short exposure data is selected for image data exceeding the threshold.
And a long exposure threshold value, wherein only the long exposure data is selected from the image data below the threshold value.
Brightness, also known as intensity or brightness, refers to the perception of human eyes of varying brightness across the surface of an object.
The RGB color space, which is the most common color space, is based on three primary colors of red, green and blue, and is superimposed to different degrees to generate abundant and wide colors, but there is strong correlation between the three colors of RGB, and it is not a uniform color space.
YUV color space, a color coding method adopted by european television systems. Mainly for optimizing the transmission of color video information. Compared with the transmission of RGB video signals, only little bandwidth is required. Where Y represents lightness, i.e., a gray scale value, and UV represents chroma, and is converted into a linear conversion with RGB.
Gain, generally referred to as current or power amplification, is a relative value, specified in decibels (dB), for a component, circuit, device, or system. The device gain described in the embodiments of the present disclosure refers to a shooting device (camera) gain, unless otherwise specified.
The present disclosure provides a method for enhancing permeability of a wide dynamic image, as shown in fig. 1, comprising,
step 101, acquiring a shot image of a shooting device in a wide dynamic scene, and determining a light and dark scale factor and ambient illumination according to the shot image;
102, acquiring at least one group of reference wide dynamic parameters from a pre-established wide dynamic parameter lookup table according to the light and shade scale factor and the ambient illumination;
and 103, determining a group of target width dynamic parameters according to the at least one group of reference width dynamic parameters, and performing wide dynamic effect adjustment on the shot image according to the target width dynamic parameters.
In some exemplary embodiments, step 102 comprises: acquiring a group of reference wide dynamic parameters from a pre-established wide dynamic parameter lookup table according to the light and shade scale factor and the ambient illumination; the set of reference wide dynamic parameters is selected as the target wide dynamic parameters in step 103.
In some exemplary embodiments, obtaining a set of reference wide dynamic parameters comprises:
calculating the distance between the light and shade scale factor and the ambient illumination of each table entry and the light and shade scale factor and the ambient illumination of the shot image according to the light and shade scale factor and the ambient illumination corresponding to each table entry in a pre-established wide dynamic parameter lookup table and the scale factor and the ambient illumination of the shot image;
selecting a group of brightness and darkness proportional factors and ambient illumination closest to each other from a pre-established wide dynamic parameter lookup table;
and determining the reference wide dynamic parameters corresponding to the selected set of light and shade scale factors and the ambient illumination as the acquired set of reference wide dynamic parameters.
It can be seen that, in step 102, a set of reference wide dynamic parameters is obtained, that is, a set of reference wide dynamic parameters closest to the light and dark scale factor of the currently captured image and the ambient illumination is obtained from a pre-established wide dynamic parameter lookup table according to the light and dark scale factor and the ambient illumination.
It should be noted that, in some exemplary embodiments, in the case that the light-dark scale factor and the ambient illumination in the pre-established wide dynamic parameter lookup table are respectively equal to the scale factor of the captured image and the ambient illumination, distances between the set of the light-dark scale factor and the ambient illumination in the wide dynamic parameter lookup table and the scale factor of the captured image and the ambient illumination are 0, and at this time, a set of reference wide dynamic parameters corresponding to the set of the light-dark scale factor and the ambient illumination in the wide dynamic parameter lookup table is selected as the obtained set of reference wide dynamic parameters, that is, the target wide dynamic parameters.
In some exemplary embodiments, obtaining a set of reference wide dynamic parameters comprises:
establishing a reference parameter vector according to the brightness and darkness proportional factor and the ambient illumination corresponding to each table entry in a pre-established wide dynamic parameter lookup table;
establishing a current image parameter vector according to the scale factor and the ambient illumination of the shot image;
selecting a reference parameter vector closest to the vector distance of the current image parameter vector from all the reference parameter vectors;
and determining a group of reference wide dynamic parameters corresponding to the selected reference parameter vector as the obtained group of reference wide dynamic parameters, namely the target wide dynamic parameters.
It should be noted that, in some exemplary embodiments, in the case that the brightness scale factor and the ambient illumination in the pre-established wide dynamic parameter lookup table are respectively equal to the scale factor and the ambient illumination of the captured image, it indicates that the vector distance between the reference parameter vector and the current image parameter vector is 0, and at this time, a set of reference wide dynamic parameters corresponding to the brightness scale factor and the ambient illumination in the wide dynamic parameter lookup table is selected as the set of acquired reference wide dynamic parameters.
In some exemplary embodiments, step 102 comprises: acquiring a plurality of groups of reference wide dynamic parameters from a pre-established wide dynamic parameter lookup table according to the light and shade scale factor and the ambient illumination; then, in step 103, each sub-parameter in the target wide dynamic parameter is determined by an interpolation method or an inheritance method according to the sub-parameters in the plurality of groups of wide dynamic parameters.
It should be noted that, in the embodiments of the present disclosure, the reference wide dynamic parameter, the target wide dynamic parameter, and the wide dynamic parameter include one or more sub-parameters for performing wide dynamic tuning, such as: dynamic range compression strength, brightness mapping function, motion detection threshold, short frame noise reduction strength, short exposure threshold, long exposure threshold, contrast, gamma curve, and the like. The number and types of sub-parameters included in a wide dynamic parameter set vary according to the photographing apparatus, and are not limited to the aspects of the illustrated embodiments of the present disclosure.
In some exemplary embodiments, the determining the sub-parameters of the target wide dynamic parameter includes:
determining the interpolation of a first sub-parameter corresponding to the light and shade scale factor and the ambient illumination of the shot image by adopting an interpolation method according to the first sub-parameter in the multiple groups of reference wide dynamic parameters, and taking the interpolation of the first sub-parameter as the first sub-parameter in the target wide dynamic parameters;
and/or the presence of a gas in the atmosphere,
and selecting a group of light and shade scale factors and ambient illumination closest to the light and shade scale factors and the ambient illumination of the shot image from the plurality of groups of light and shade scale factors and the ambient illumination corresponding to the plurality of groups of reference wide dynamic parameters, and determining a second sub-parameter in the group of reference wide dynamic parameters corresponding to the selected group of light and shade scale factors and the ambient illumination as a second sub-parameter in the target wide dynamic parameter.
In some exemplary embodiments, the first sub-parameter of each set of reference wide dynamic parameters includes at least one of: dynamic range compression DRC intensity, brightness mapping function, motion detection threshold, short frame noise reduction intensity, short exposure threshold, long exposure threshold and contrast;
the second sub-parameter in each set of reference wide dynamic parameters at least comprises: a gamma curve.
In some exemplary embodiments, the wide dynamic parameter includes two first sub-parameters: DRC intensity and contrast, and a second sub-parameter: a gamma curve. Step 103 then comprises:
determining interpolation values of the DRC intensities corresponding to the light and shade scale factors and the ambient illumination of the shot image by adopting an interpolation method according to the DRC intensities in the multiple groups of reference wide dynamic parameters, and taking the interpolation values of the DRC intensities as the DRC intensities in the target wide dynamic parameters;
determining interpolation of the contrast corresponding to the light and shade scale factor and the ambient illumination of the shot image by adopting an interpolation method according to the contrast in the multiple groups of reference wide dynamic parameters, and taking the interpolation of the contrast as the contrast in the target wide dynamic parameters;
selecting a set of light and shade scale factor and ambient illumination closest to the light and shade scale factor and the ambient illumination of the shot image from a plurality of sets of light and shade scale factors and ambient illumination corresponding to the plurality of sets of reference wide dynamic parameters, and determining a gamma curve in a set of reference wide dynamic parameters corresponding to the selected set of light and shade scale factor and ambient illumination as a gamma curve in the target wide dynamic parameters; this step is also called inheriting the gamma curve in the closest set of reference wide dynamic parameters from the plurality of sets of reference wide dynamic parameters as the second sub-parameter of the target wide dynamic parameter, gamma curve.
It should be noted that, a set of reference wide dynamic parameters includes one or more sub-parameters, and is divided into two types, i.e. a first sub-parameter and a second sub-parameter, according to the characteristics of the sub-parameters, the first sub-parameter is a sub-parameter that can determine the corresponding interpolation by interpolation, such as the dynamic range compression DRC strength and contrast, and the second sub-parameter is a sub-parameter that is not suitable for determining the interpolation by interpolation, such as a gamma curve. The wide dynamic parameter may further include other first sub-parameters and other second sub-parameters, and is not limited to the above aspects of the examples of the present disclosure.
In some exemplary embodiments, selecting one of the sets of brightness scale factors and ambient illuminance closest to the brightness scale factor and the ambient illuminance of the captured image from the sets of brightness scale factors and ambient illuminance corresponding to the sets of reference wide dynamic parameters includes:
obtaining a plurality of reference parameter vectors representing the scale factors and the ambient illumination corresponding to the plurality of groups of reference wide dynamic parameters,
acquiring a current image parameter vector representing a scale factor and ambient illumination of the shot image;
respectively determining vector distances between a plurality of reference parameter vectors and the current image parameter vector;
and selecting a set of light and shade scale factors and ambient illumination corresponding to the reference parameter vector with the minimum vector distance.
For example, the light and shade scale factor and the ambient illumination are used as coordinate systems, the position of each set of light and shade scale factor and ambient illumination on the coordinate system is determined, coordinate points A corresponding to the light and shade scale factor and the ambient illumination of the shot image are marked, coordinate points B1, B2, \8230, bi, \8230, bn corresponding to a plurality of sets of reference wide dynamic parameters are marked, bi points closest to the point A are selected from the coordinate points, and a set of reference wide dynamic parameters corresponding to the Bi points is the selected set of reference wide dynamic parameters.
In some exemplary embodiments, the wide dynamic parameter lookup table is pre-established according to the following:
sequentially executing the following steps under each of a plurality of test scenarios: acquiring a light and shade scale factor and ambient illumination of a shot image in the test scene; after wide dynamic adjustment and optimization are carried out on the image shot in the test scene, wide dynamic parameters in the test scene are obtained;
and establishing a wide dynamic parameter lookup table for looking up the corresponding reference wide dynamic parameter according to the light and dark scale factor, the ambient illumination and the wide dynamic parameter under each test scene.
The plurality of test scenes comprise a plurality of test scenes formed according to scene factor changes; wherein the scene factors include: ambient illumination, bright and dark area ratios of the captured image.
In some exemplary embodiments, the plurality of test scenarios comprises:
the method comprises the steps that in a strong WDR scene, namely, the ambient illumination is greater than a first ambient illumination, and the proportion of a bright area and a dark area of a shot image is greater than a first proportional threshold;
a medium WDR scene, namely the ambient illumination is smaller than the second ambient illumination and larger than a third ambient illumination, and the proportion of a bright area and a dark area of a shot image is smaller than a second proportion threshold and larger than a third proportion threshold;
and weak WDR scenes, namely the ambient illumination is less than the fourth ambient illumination, and the proportion of the bright area and the dark area of the shot image is less than a fourth proportion threshold.
The first ambient illumination is greater than the second ambient illumination and greater than the third ambient illumination and greater than the fourth ambient illumination; the first proportional threshold is greater than the second proportional threshold and greater than the third proportional threshold and greater than the fourth proportional threshold.
In some exemplary embodiments, the plurality of test scenarios further comprises:
and (4) locally highlighting the scene, namely the ambient illumination is greater than the fifth ambient illumination, and the proportion of the bright area and the dark area of the shot image is smaller than a fifth proportion threshold.
It should be noted that the greater the ambient illumination, the greater the brightness of the test scene, and the greater the ratio of the bright area to the dark area indicates that the captured image in the test scene has a greater proportion of bright area and a smaller proportion of dark area.
Wherein the bright area is formed by that the brightness in the image is greater than a bright area brightness threshold value Y l The dark area is an area formed by the pixels of (1), and the brightness of the dark area is less than the brightness threshold value Y of the dark area in the image d The area formed by the pixel points.
It should be noted that the test scenarios may be determined in a multi-level division manner according to the service requirement, and are not limited to the above example of the high, medium and low levels of the ambient illumination, and the rough division of the ratio of the bright area and the dark area. The smaller the granularity of division, the more accurate the reference wide dynamic parameters determined therefrom.
In some exemplary embodiments, the wide dynamic parameter lookup table is pre-established according to the following:
1. determining m x k test scenes, corresponding to k different environment illumination intensities, respectively calculating the environment illumination intensities, and recording as E according to a decreasing trend v1 ,...,E vk (ii) a Under each environment illumination scene, corresponding to m brightness scale factors, respectively calculating the brightness scale factors and recording as P according to the increasing trend 1 ,P 2 ,...,P m (ii) a The wide dynamic parameters of the images in the m × k scenes after the image is adjusted are marked as Param 1,1 ,Param 1,2 ,...,Param m,k
2. And establishing a wide dynamic parameter lookup table, wherein the abscissa is the ambient illumination, and the ordinate is a light-dark scale factor.
In some exemplary embodiments, the wide dynamic parameter lookup table is as follows:
TABLE 1 Wide dynamic parameter lookup Table
Figure BDA0003213622330000111
In some exemplary embodiments, the wide dynamic parameter lookup table may also be established according to a trend of decreasing ambient illumination and decreasing light-dark scale factor; or, the method can also be established according to the trend that the ambient illumination increases and the light-dark scale factor increases; alternatively, the brightness and darkness ratio can be established according to the trend that the ambient illumination increases and the light and darkness ratio factor decreases. It can be seen that, without limitation to a particular manner, the ambient illumination increases or decreases, both of which may be the brightness scale factor.
It can be seen that one table entry in the wide dynamic parameter lookup table determined according to a set of ambient illumination and light-dark ratio factors is a wide dynamic parameter determined after adjusting the wide dynamic effect in a corresponding test scene, and the wide dynamic parameters are referred to perform the wide dynamic effect adjustment in an actual application scene, and therefore, the table entry is also referred to as a reference wide dynamic parameter.
In some exemplary embodiments, the ambient illuminance E of the image is calculated v Calculated according to the following way:
Figure BDA0003213622330000112
wherein luma is a standard picture brightness value, luma _ cur is a current picture brightness value, a is a standard aperture radius value, acur is a current device aperture radius value, s is a standard shutter value, scur is a current shutter value, g is a standard gain value, gcur is a current device gain value, lux is a standard device gain value standard Is a standard ambient illuminance value.
It should be noted that the standard parameters refer to relevant parameters when the current device captures a standard image under a certain standard illumination in a certain application environment; the standard image brightness value is the image brightness corresponding to the standard image under the condition, the standard aperture radius value is the aperture radius adopted by the shooting equipment during shooting under the condition, the standard shutter value is the value of the shutter adopted by the shooting equipment during shooting under the condition, the standard gain value is the gain adopted by the shooting equipment during shooting under the condition, and the standard ambient illuminance value is the ambient illuminance of the standard environment in which the shooting equipment is positioned during shooting under the condition. The technicians in the field predetermine different or same standard parameters for each deployed shooting device according to different equipment, environment or service requirements, without defining specific parameters.
In some exemplary embodiments, calculating the light-to-dark scale factor P of the image is determined according to the following:
Figure BDA0003213622330000121
wherein N is the total pixel number of the image to be calculated, m is the effective bit number of the image to be calculated, alpha and beta are constants, and Y is ave As the average brightness of the image to be calculated, N d The number of pixel points with the brightness smaller than the dark area brightness threshold value in the image to be calculated is N l The number of pixel points with the brightness larger than the brightness threshold value of the bright area in the image to be calculated is Y d As dark luminance threshold, Y l Is a bright area brightness threshold;
the alpha and the beta are determined according to the environment illumination and the shot image fitting under the plurality of test scenes when the wide dynamic parameter lookup table is established, and the following constraints are met:
under the condition that the proportion of the bright area and the dark area of the shot image is constant, the light and shade proportion factor of the shot image is increased along with the increase of the ambient illumination.
In some exemplary embodiments, the brightness of each pixel point in the image to be calculated is determined according to the following manner:
carrying out interpolation processing according to RAW data of the original image of the image to be calculated;
calculating the brightness Y of each pixel point of the RAW data processed by the interpolation method according to the following formula:
Y=A1*R+A2*G+A3*B;(3)
wherein, A1 is a red component weight, A2 is a green component weight, and A3 is a blue component weight; r is the red component luminance, G is the green component luminance, and B is the blue component luminance;
the average brightness Y of the image to be calculated ave Calculating an average value according to the brightness Y of all pixel points of the image to be calculatedThus obtaining the compound.
In some exemplary embodiments, the brightness of each pixel point is determined according to the following steps:
acquiring original images under each test scene, namely RAW data;
carrying out interpolation processing on the RAW data to obtain interpolated RAW data, counting the brightness of the interpolated RAW data, and obtaining the brightness of each pixel point according to the following formula
Y=0.30R+0.59G+0.11B (3-1)
That is, in this embodiment, the red component weight A1 is 0.30, the green component weight A2 is 0.59, and the blue component weight A3 is 0.11.
It should be noted that, those skilled in the art can select different component weights to determine the brightness of each pixel according to the device or environment characteristics, and the weights are not limited to the specific weights in the above examples.
Then, according to the brightness of each pixel point of the RAW data, the average brightness Y is calculated ave
Setting the dark region brightness threshold to Y d The bright area brightness threshold is Y l Counting the number N of pixels with the pixel brightness smaller than the dark area brightness threshold value in the RAW data d And the number N of pixels with the pixel brightness larger than the brightness threshold of the bright area l
Alternatively, those skilled in the art may also calculate the brightness of each pixel point in other manners, or average brightness, and is not limited to the above examples of the disclosure.
In some exemplary embodiments, when the wide dynamic parameter lookup table is established, the performing wide dynamic tuning includes:
parameter tuning Param is carried out according to a determined test scenario (WDR scenario), and parameters mainly comprise but are not limited to: DRC intensity, contrast, gamma curve. Different gamma curves are used according to different brightness degrees, so that the permeability of the picture and the brightness of the dark area are improved, as shown in FIG. 2. In fig. 2 (a), in a large-area dark-area strong WDR scene, the adjusted Gamma curve (b) is in a high-brightness scene, and in a weak WDR scene, the adjusted Gamma curve (c) is in a high-brightness scene.
In some exemplary embodiments, the determining the light-dark scale factor and the ambient illuminance from the captured image in step 101 includes:
according to the shot image, calculating a light and shade scale factor P of the current shot image according to the formula (2), and calculating the ambient illumination E of the current shot image according to the formula (1) v
In some exemplary embodiments, the 4 reference wide dynamic parameters are obtained from a pre-established wide dynamic parameter lookup table in step 102. Taking the wide dynamic parameter lookup table shown in table 1 as an example, two rows P are determined according to the light and shade scale factor P i ,P i+1 Satisfy P i <P<P i+1 According to the ambient illuminance E v Determining two columns E vj ,E vj+1 Satisfy E vj >E v >E vj+1 I.e. 4 (groups of) wide dynamic parameters are obtained from the positions of two rows and two columns determined in the lookup table, which are called reference wide dynamic parameters.
It should be noted that, in the case that the sorting manner (increasing \ decreasing) of the bright-dark scale factor and/or the ambient illumination in the wide dynamic parameter lookup table is different from the above example, the above lookup process is correspondingly adjusted. According to the above examples, those skilled in the art can know the adjustment manner, and there is no particular example here.
Accordingly, determining the target wide dynamic parameter in step 103 includes:
according to a first sub-parameter in the at least 4 reference wide dynamic parameters, adopting a quadratic interpolation method, and obtaining a light and shade scale factor P and an ambient illumination E of the shot image v The interpolation of the corresponding first sub-parameter is used as the first sub-parameter in the target width dynamic parameter;
and/or the presence of a gas in the gas,
4 groups of light and shade proportional factors P and environment illumination E corresponding to 4 reference wide dynamic parameters v Selecting a light and shade scale factor P and an ambient illumination E from the captured image v A second sub-parameter of a set of reference wide dynamic parameters corresponding to the selected set of the bright-dark scale factors and the ambient illumination is determined asA second sub-parameter of the target wide dynamic parameter.
If the first sub-parameters comprise a plurality of first sub-parameters, determining the interpolation of each first sub-parameter by adopting an interpolation method; and if the plurality of second sub-parameters are included, determining the plurality of second sub-parameters from the selected reference wide dynamic parameters closest to the target wide dynamic parameters as the plurality of second sub-parameters in the target wide dynamic parameters.
The embodiment of the present disclosure further provides a method for enhancing permeability of a wide dynamic image, as shown in fig. 3, including:
step 301, acquiring the ambient illumination and the light and shade scale factor of a shot image in an actual application scene;
step 302, inquiring a wide dynamic parameter lookup table according to the ambient illumination and the light and shade scale factor to obtain four groups of reference wide dynamic parameters;
step 303, performing interpolation and/or inheritance according to the four groups of reference width dynamic parameters to determine a group of target width dynamic parameters;
and 304, performing wide dynamic effect optimization on the shot image according to the target wide dynamic parameters.
In some exemplary embodiments, before step 301, the method further comprises:
step 300, establishing a wide dynamic parameter lookup table.
In some exemplary embodiments, step 300 comprises:
step 3001, selecting a plurality of test scenarios (WDR scenarios);
step 3002, the following steps are respectively executed in each test scenario:
step 30021, capture RAW data of the shot image in the test scene,
step 30022, calculating a light and dark scale factor from the RAW data;
step 30023, calculating ambient illuminance;
step 30024, performing wide dynamic parameter tuning to obtain the optimal wide dynamic parameter in the current scene;
step 3003, construct a wide dynamic parameter lookup table according to the light and shade scale factor, the ambient illumination, and the optimal wide dynamic parameter of each scene.
In some exemplary embodiments, the plurality of test scenarios selected in step 3001 includes:
the method comprises the steps that in a strong WDR scene, namely, the ambient illumination is greater than a first ambient illumination, and the proportion of a bright area and a dark area of a shot image is greater than a first proportional threshold;
the method comprises the steps of (1) carrying out strong WDR scene, namely, the ambient illumination is greater than a first ambient illumination, and the proportion of a bright area and a dark area of a shot image is smaller than a first proportional threshold;
the WDR scene is a medium WDR scene, namely the ambient illumination is smaller than the second ambient illumination and larger than the third ambient illumination, and the proportion of the bright area and the dark area of the shot image is smaller than the second proportion threshold and larger than the third proportion threshold;
in the weak WDR scene, namely the ambient illumination is less than the fourth ambient illumination, and the proportion of the bright area and the dark area of the shot image is less than a fourth proportion threshold;
and local highlight scenes, namely, the ambient illumination is greater than the fifth ambient illumination, and the proportion of the bright area and the dark area of the shot images is less than a fifth proportion threshold.
The first environment illumination is greater than the second environment illumination and greater than the third environment illumination and greater than the fourth environment illumination; the first proportional threshold is greater than the second proportional threshold and greater than the third proportional threshold and greater than the fourth proportional threshold.
It can be seen that by setting appropriate first to fifth ambient illuminance, first to fifth proportional thresholds, various typical scenes can be divided. The strong WDR scene represents a test scene with higher ambient illumination and more bright area than dark area; the second-strong WDR scene represents a test scene with larger ambient illumination and less bright area ratio than dark area ratio; the medium WDR scene represents a test scene with medium ambient illumination and a bright area ratio and a dark area ratio close to each other; the weak WDR scene represents a test scene with lower ambient illumination and less bright area ratio than dark area ratio; the local highlight scene represents a test scene with a larger ambient illumination and a smaller bright area than dark area.
It should be noted that, according to the above example, a person skilled in the art may select more test scenarios to correspondingly establish a wide dynamic parameter lookup table with more data amount, and is not limited to the scenarios exemplified by the embodiments of the present disclosure.
In some exemplary embodiments, the set of reference wide dynamic parameters includes 2 first sub-parameters: DRC intensity, contrast, and also 1 second sub-parameter: a gamma curve.
In some exemplary embodiments, step 300 further comprises: and fitting and determining alpha and beta in the formula (2) according to the environment illumination and the brightness and darkness scale factor calculated by each scene so as to meet the following constraint:
under the condition that the proportion of the bright area and the dark area of the image is constant, the light and shade proportion factor of the image is increased along with the increase of the ambient illumination.
In some exemplary embodiments, the ambient illuminance in steps 301 and 30023 is calculated according to equation (1).
In some exemplary embodiments, the light and dark scale factors in steps 301 and 30022 are calculated according to equation (2).
In some exemplary embodiments, in step 303, performing secondary interpolation according to four DRC intensities in the four sets of reference wide dynamic parameters, and the obtained interpolation is used as the DRC intensity in the target wide dynamic parameter; performing secondary interpolation according to four contrasts in the four groups of reference wide dynamic parameters, wherein the obtained interpolation is used as the contrast in the target wide dynamic parameter; and inheriting a gamma curve in the group of reference wide dynamic parameters closest to the brightness scale factor and the ambient illumination calculated in the step 301 according to the brightness scale factor and the ambient illumination corresponding to the four groups of reference wide dynamic parameters, and taking the gamma curve as a gamma curve in the target wide dynamic parameters.
It should be noted that the captured image obtained in step 101, the captured image obtained in each test scene during the process of establishing the wide dynamic parameter lookup table, and the captured image obtained in step 301 refer to the captured image in the wide dynamic scene, which is also referred to as a fused Wide Dynamic Range (WDR) image. The RAW data for which the luminance is calculated in the correlation step corresponds to the RAW data of these captured images, and is also referred to as fused RAW data.
An embodiment of the present disclosure further provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method for increasing permeability of wide dynamic images as in any one of the above embodiments.
Embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, where the program is used by a processor to implement the method for enhancing permeability of wide dynamic images as described in any one of the above embodiments.
It can be seen that the scheme for enhancing the permeability of the wide dynamic image provided by the embodiment of the disclosure provides a method for evaluating the WDR level of the image based on the light and shade scale factor. The method divides the scene into WDR levels according to the light-dark ratio in the RAW data and the brightness of the whole picture, so that the corresponding reference wide dynamic parameters can be better matched in the subsequent use of the reference wide dynamic parameters, and the method has wider adaptability and higher stability.
The tuning parameter table lookup method based on the brightness and darkness scale factor and the ambient illumination provided by the embodiment of the disclosure obtains at least one group of reference parameters in a wide dynamic lookup table according to the current ambient illumination and the brightness and darkness scale factor, and interpolates to obtain corresponding parameters and inherit similar Gamma curves according to the relationship between the current ambient illumination and the brightness and darkness scale factor and the similar ambient illumination and brightness and darkness scale factor in the lookup table. Compared with other algorithms, the method can effectively enhance the permeability of the image, has wider adaptability and saves performance.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for enhancing permeability in a wide dynamic image, comprising:
acquiring a shot image of shooting equipment in a wide dynamic scene, and determining a light and shade scale factor and ambient illumination according to the shot image;
acquiring at least one group of reference wide dynamic parameters from a pre-established wide dynamic parameter lookup table according to the light and shade scale factor and the ambient illumination;
and determining a group of target width dynamic parameters according to the at least one group of reference width dynamic parameters, and performing wide dynamic effect optimization on the shot image according to the target width dynamic parameters.
2. The method of claim 1,
and under the condition that the at least one group of reference wide dynamic parameters are multiple groups of reference wide dynamic parameters, respectively determining each sub-parameter in the target wide dynamic parameters by adopting an interpolation method or an inheritance method according to the sub-parameters in the multiple groups of reference wide dynamic parameters.
3. The method of claim 2,
the determining of each sub-parameter in the target wide dynamic parameter includes:
determining interpolation values of first sub-parameters corresponding to the light and shade scale factor and the ambient illumination of the shot image by adopting an interpolation method according to the first sub-parameters in the multiple groups of reference wide dynamic parameters, and taking the interpolation values of the first sub-parameters as the first sub-parameters in the target wide dynamic parameters;
or selecting one group of light and shade scale factors and environment illumination closest to the light and shade scale factors and the environment illumination of the shot image from the plurality of groups of light and shade scale factors and environment illumination corresponding to the plurality of groups of reference wide dynamic parameters, and determining a second sub-parameter in the group of reference wide dynamic parameters corresponding to the selected group of light and shade scale factors and environment illumination as a second sub-parameter in the target wide dynamic parameter.
4. The method of claim 3,
the first sub-parameter in each set of reference wide dynamic parameters includes at least one of: dynamic range compression strength, brightness mapping function, motion detection threshold, short frame noise reduction strength, short exposure threshold, long exposure threshold and contrast;
the second sub-parameter of each set of reference wide dynamic parameters at least comprises: a gamma curve.
5. The method of claim 1,
the wide dynamic parameter lookup table is pre-established according to the following mode:
sequentially executing the following steps in each of a plurality of test scenarios: acquiring a light and shade scale factor and ambient illumination of a shot image in the test scene; after the wide dynamic adjustment of the image shot in the test scene is carried out, the wide dynamic parameters in the test scene are obtained;
establishing a wide dynamic parameter lookup table for looking up a corresponding reference wide dynamic parameter according to the light and dark scale factor and the ambient illumination according to the light and dark scale factor, the ambient illumination and the wide dynamic parameter under each test scene;
the plurality of test scenes comprise a plurality of different test scenes formed according to scene factor changes; the scene factors include: ambient illumination, bright and dark area ratios of the captured image.
6. The method of claim 3,
the multiple groups of reference width dynamic parameters are four groups of reference width dynamic parameters;
a first sub-parameter of the target wide dynamic parameter is determined according to the following manner:
and determining the interpolation of the first sub-parameters corresponding to the light and shade scale factor and the ambient illumination of the shot image by adopting a quadratic interpolation method according to four first sub-parameters in the four groups of reference wide dynamic parameters, and taking the interpolation of the first sub-parameters as the first sub-parameters in the target wide dynamic parameters.
7. The method of claim 1 or 5,
the ambient illuminance E v Determined according to the following way:
Figure FDA0003213622320000021
whereinLuma is standard picture brightness value, luma _ cur is current picture brightness value, a is standard aperture radius value, acur is current equipment aperture radius value, s is standard shutter value, scur is current shutter value, g is standard gain value, gcur is current equipment gain value, lux is standard gain value standard Is a standard ambient illuminance value.
8. The method of claim 1 or 5,
the light-dark scale factor P is determined according to the following manner:
Figure FDA0003213622320000022
wherein N is the total pixel number of the image to be calculated, m is the effective bit number of the image to be calculated, alpha and beta are constants, and Y is ave As the average brightness of the image to be calculated, N d The number of pixel points with the brightness smaller than the dark area brightness threshold value in the image to be calculated is N l The number of pixel points with brightness larger than the brightness threshold value of the bright area in the image to be calculated is Y d Is a dark-area brightness threshold, Y l Is a bright area brightness threshold;
the alpha and the beta are determined according to the environment illumination and the shot image fitting under the plurality of test scenes when the wide dynamic parameter lookup table is established, and the following constraints are met:
under the condition that the proportion of the bright area and the dark area of the shot image is constant, the light and shade proportion factor of the shot image is increased along with the increase of the ambient illumination.
9. An electronic device, comprising:
one or more processors;
a storage device to store one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method for increasing widemonetic image permeability as recited in any of claims 1-8.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method for increasing permeability in wide dynamic images as claimed in any one of claims 1 to 8.
CN202110937025.4A 2021-08-16 2021-08-16 Method for enhancing permeability of wide dynamic image, electronic device and storage medium Pending CN115914850A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110937025.4A CN115914850A (en) 2021-08-16 2021-08-16 Method for enhancing permeability of wide dynamic image, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110937025.4A CN115914850A (en) 2021-08-16 2021-08-16 Method for enhancing permeability of wide dynamic image, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN115914850A true CN115914850A (en) 2023-04-04

Family

ID=86492017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110937025.4A Pending CN115914850A (en) 2021-08-16 2021-08-16 Method for enhancing permeability of wide dynamic image, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN115914850A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117686823A (en) * 2023-12-12 2024-03-12 广东华向检测技术有限公司 Automatic acceptance checking system for relay protection of transformer substation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117686823A (en) * 2023-12-12 2024-03-12 广东华向检测技术有限公司 Automatic acceptance checking system for relay protection of transformer substation
CN117686823B (en) * 2023-12-12 2024-05-14 广东华向检测技术有限公司 Automatic acceptance checking system for relay protection of transformer substation

Similar Documents

Publication Publication Date Title
CN107635102B (en) Method and device for acquiring exposure compensation value of high-dynamic-range image
CN107888840B (en) High-dynamic-range image acquisition method and device
CN110022469B (en) Image processing method, image processing device, storage medium and electronic equipment
US10021313B1 (en) Image adjustment techniques for multiple-frame images
JP4240023B2 (en) Imaging apparatus, imaging method and imaging program, and image processing apparatus, image processing method and image processing program
US8135235B2 (en) Pre-processing method and apparatus for wide dynamic range image processing
KR101812807B1 (en) A method of adaptive auto exposure contol based upon adaptive region's weight
EP2426928B1 (en) Image processing apparatus, image processing method and program
US9407889B2 (en) Image processing apparatus and image processing method for white balance control
CN110033418B (en) Image processing method, image processing device, storage medium and electronic equipment
CN108616689B (en) Portrait-based high dynamic range image acquisition method, device and equipment
CN107533756B (en) Image processing device, imaging device, image processing method, and storage medium storing image processing program for image processing device
CN108337446B (en) High dynamic range image acquisition method, device and equipment based on double cameras
US20100195906A1 (en) Automatic image enhancement
WO2019019904A1 (en) White balance processing method and apparatus, and terminal
CN110246101B (en) Image processing method and device
US20110187890A1 (en) Image processing apparatus
US9036046B2 (en) Image processing apparatus and method with white balance correction
CN110047060B (en) Image processing method, image processing device, storage medium and electronic equipment
US9978128B2 (en) Image processing appartatus and method, recording medium storing image processing program readable by computer, and imaging apparatus
US20180025476A1 (en) Apparatus and method for processing image, and storage medium
KR101754425B1 (en) Apparatus and method for auto adjusting brightness of image taking device
CN113411554A (en) Underwater image color restoration method and device
US20080131007A1 (en) Image Coding Method and Image Coding Device
CN115914850A (en) Method for enhancing permeability of wide dynamic image, electronic device 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