CN117896622A - Image local overexposure adjustment method, device and equipment and readable storage medium - Google Patents

Image local overexposure adjustment method, device and equipment and readable storage medium Download PDF

Info

Publication number
CN117896622A
CN117896622A CN202410295150.3A CN202410295150A CN117896622A CN 117896622 A CN117896622 A CN 117896622A CN 202410295150 A CN202410295150 A CN 202410295150A CN 117896622 A CN117896622 A CN 117896622A
Authority
CN
China
Prior art keywords
value
average
brightness value
brightness
image
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
CN202410295150.3A
Other languages
Chinese (zh)
Other versions
CN117896622B (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.)
Shenzhen Saier Intelligent Control Technology Co ltd
Original Assignee
Shenzhen Saier Intelligent Control 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 Shenzhen Saier Intelligent Control Technology Co ltd filed Critical Shenzhen Saier Intelligent Control Technology Co ltd
Priority to CN202410295150.3A priority Critical patent/CN117896622B/en
Publication of CN117896622A publication Critical patent/CN117896622A/en
Application granted granted Critical
Publication of CN117896622B publication Critical patent/CN117896622B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

The application provides a method, a device and equipment for adjusting local overexposure of an image and a readable storage medium, wherein the method comprises the following steps: collecting preview images in real time; determining a first average brightness value of the preview image; determining a second average luminance value by correcting the first average luminance value; and adjusting a first exposure parameter of the preview image according to the second average brightness value and a preset expected brightness value. Through implementation of the scheme, the first average brightness value of the preview image is obtained, the first average brightness value is corrected, the second average brightness value is determined, the first exposure parameter of the image to be shot currently is adjusted according to the second average brightness value and the preset expected brightness value, and the brightness difference value between high-contrast scenes is balanced through the corrected second average brightness value, so that overexposure of the local area of the shot image can be effectively prevented.

Description

Image local overexposure adjustment method, device and equipment and readable storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for adjusting local overexposure of an image.
Background
In the field of aviation measurement, when a target scene is measured, an unmanned aerial vehicle is generally utilized to carry an aerial survey camera to shoot the target scene, image data is obtained to perform three-dimensional modeling, and then measurement of the target scene is realized. Because the unmanned plane is always in flight, the exposure mode of photographing is fundamentally different from that of photographing static scenes. When shooting a static scene, a mode of inhibiting local brightness overexposure of an image is called a High Dynamic (HDR) technology, and two frames of images are used for synthesizing one image, wherein the two frames of images are that the brightness of a dark light area is improved by adopting long exposure to obtain a first frame of image; using short exposure to restrain the brightness of the strong light area to obtain a second frame image; and then an image processor (ISP) is used for taking the normal brightness parts of the two frames of images to synthesize a complete image. However, if a moving scene object is photographed, the two frames of images are sequentially exposed, which inevitably results in deformation or dislocation of the synthesized image. The distortion or dislocation of the image cannot be measured accurately, so that the High Dynamic (HDR) technology cannot be used to suppress the local overexposure of the image. Therefore, in the field of aerial survey, the linear global exposure mode of the image sensor is adopted together with a mechanical shutter to complete exposure. In this way, when shooting a high contrast scene (a scene or an object with high local brightness and low local brightness exists at the same time), only a dark area is considered to cause local overexposure of a highlight area, and details or textures of the overexposed area are lost, so that the three-dimensional modeling effect is adversely affected.
Disclosure of Invention
The application provides a local overexposure adjustment method, device and equipment for an image and a readable storage medium, which at least can solve the problem that overexposure of a highlight area of a shot image is easy to cause when a high-contrast scene is shot in the related technology.
An embodiment of the present application provides a method for adjusting local overexposure of an image, including:
collecting preview images in real time;
determining a first average luminance value of the preview image;
determining a second average luminance value by correcting the first average luminance value;
and adjusting a first exposure parameter of the preview image according to the second average brightness value and a preset expected brightness value.
By adopting the scheme, the first average brightness value of the preview image is obtained, the first average brightness value is corrected, the first exposure parameter of the image to be shot currently is adjusted according to the corrected second average brightness value and the preset expected brightness value, and the brightness difference value between high-contrast scenes is balanced through the corrected second average brightness value, so that the overexposure of the local area of the shot image can be effectively prevented.
Optionally, the step of determining the first average luminance value of the preview image includes:
dividing the preview image into rectangular areas of X rows and Y columns; wherein X and Y are integers greater than or equal to 1;
determining a third average brightness value of a single sub-region in the rectangular region;
and determining a first average brightness value of the preview image according to the third average brightness values of all the subareas.
By adopting the above-mentioned scheme, the device,
optionally, before the step of determining the second average luminance value by correcting the first average luminance value, the method further includes:
distributing a brightness value array according to a preset quantization bit number;
determining the number of sub-areas corresponding to the brightness values of the brightness value array according to all the third average brightness values, constructing and generating the histogram of the brightness values, and by adopting the scheme, constructing the histogram of the brightness values of the preview image, more intuitively displaying the duty ratio of different brightness values in the preview image, and improving the accuracy of correcting the first brightness value.
Optionally, the step of determining the second average luminance value by correcting the first average luminance value includes:
acquiring a preset high brightness threshold value and a preset low brightness threshold value;
determining a proportion of the highlight area in the histogram where the third average luminance value is not lower than the highlight threshold;
determining a low luminance area proportion in the histogram where the third average luminance value is not higher than the low luminance threshold;
a second average luminance value is determined by correction of the first average luminance value by the highlight area ratio and the low highlight area ratio.
By adopting the scheme, the high brightness area proportion and the low brightness area proportion in the preview image are determined, the histogram is further analyzed, and the accuracy of correcting the first brightness value is further improved.
Optionally, the method further comprises:
the high luminance ratio is calculated by the following formula:
wherein Rh is the ratio of the highlight area, F is the high brightness threshold, H (j) is the number of sub-areas of the histogram corresponding to the brightness value, j is the corresponding brightness value, j=1, 2, …, N is the maximum value of the brightness value array, M is the number of all sub-areas, and La is the first average brightness value;
the low luminance area ratio is calculated by the following formula
Wherein, rl is the low brightness area ratio and E is the low brightness threshold;
the step of determining a second average luminance value by correction of the first average luminance value by the highlight area ratio and the low highlight area ratio includes:
the second average luminance value is calculated by the following formula:
wherein,for the corrected second averageLuminance, k is a correction coefficient.
Optionally, the step of adjusting the first exposure parameter of the preview image according to the second average brightness value and a preset expected brightness value includes:
acquiring a second exposure parameter of a previous frame image of a target shooting image in the preview image;
adjusting a first exposure parameter according to the second exposure parameter, the second average brightness value and the preset expected brightness value; the first exposure parameter is adjusted in the following manner: the first exposure parameter=the second exposure parameter×the preset desired luminance value/the second average luminance value.
By adopting the scheme, the real brightness of the preview image is represented according to the corrected second average brightness value and is used for calculating the exposure parameter when the image is shot, so that the situation of overexposure of the shot image can be effectively prevented.
Optionally, the method further comprises:
adjusting weight values of different brightness areas in the preview image;
generating a brightness weight table according to the weight value;
determining a weighted average luminance value by combining the luminance weight table and the histogram;
and determining a first exposure parameter according to the weighted average brightness value and the preset expected brightness value.
By adopting the scheme, the average brightness is corrected by adopting the brightness weight table and the histogram, so that the problem of local overexposure of the shot image can be effectively solved.
A second aspect of the embodiments of the present application provides an image local overexposure adjustment device, including:
the acquisition module is used for acquiring the preview image in real time;
a determining module, configured to determine a first average luminance value of the preview image;
a correction module for determining a second average luminance value by correcting the first average luminance value;
and the adjusting module is used for adjusting the first exposure parameter of the preview image according to the second average brightness value and a preset expected brightness value.
A third aspect of the embodiments of the present application provides an electronic device, including a memory and a processor, where the processor is configured to execute a computer program stored on the memory, and when the processor executes the computer program, each step in the image local overexposure adjustment method provided in the first aspect of the embodiments of the present application is implemented.
A fourth aspect of the embodiments of the present application provides a computer readable storage medium having a computer program stored thereon, where the computer program, when executed by a processor, implements each step in the image local overexposure adjustment method provided in the first aspect of the embodiments of the present application.
In summary, the beneficial effects of the application are:
1. the method comprises the steps of obtaining a first average brightness value of a preview image, correcting the first average brightness value, adjusting a first exposure parameter of an image to be shot currently according to a corrected second average brightness value and a preset expected brightness value, and balancing a brightness difference value between high-contrast scenes by the aid of the second average brightness value corrected by the aid of the first exposure parameter, so that overexposure of a local area of the shot image can be effectively prevented.
2. And constructing a histogram of the brightness values of the preview image, more intuitively displaying the duty ratio of different brightness values in the preview image, and improving the accuracy of correcting the first brightness value.
Drawings
Fig. 1 is a schematic flow chart of an image local overexposure adjustment method according to an embodiment of the present application;
fig. 2 is a schematic view of luminance weights according to an embodiment of the present application;
FIG. 3 is a schematic program module of an image local overexposure adjusting device according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
In order to solve the problem in the related art that overexposure of a highlight region of a captured image is easily caused when a high-contrast scene is captured, an embodiment of the present application provides an image local overexposure adjustment method, as shown in fig. 1, which is a schematic flow chart of the image local overexposure adjustment method provided in the embodiment, where the image local overexposure adjustment method includes the following steps:
step 110, collecting preview images in real time.
Specifically, in this embodiment, when a target scene is measured, the unmanned aerial vehicle needs to fly to the target scene with the aerial survey camera, in the secondary process, the aerial survey camera is always in an on state, and the camera of the aerial survey camera acquires a preview image of an area through which the unmanned aerial vehicle passes in the flight process in real time at a rate of 30 frames per second until the unmanned aerial vehicle reaches the target scene, and photographs the target scene. It will be appreciated that the preview image of each frame has corresponding exposure parameters, and the target shot image taken in the target scene may be understood as a particular image in the preview image.
Step 120, determining a first average luminance value of the preview image.
Specifically, in this embodiment, the first link of the exposure algorithm of the camera is to count the brightness of the preview image, and regarding the preview image of each frame, the preview image is regarded as a rectangular area with a plurality of uniform sub-areas, and the first average brightness value of the preview image is calculated according to the brightness values in all the sub-areas.
In an alternative implementation of this embodiment, the step of determining the first average luminance value of the preview image includes: dividing the preview image into rectangular areas of X rows and Y columns; determining a third average brightness value of a single sub-region in the rectangular region; and determining a first average brightness value of the preview image according to the third average brightness values of all the subareas.
Specifically, in this embodiment, an image is divided into x×y rectangular areas according to a plurality of rows (denoted by X) and a plurality of columns (denoted by Y), where X, Y is an integer greater than or equal to 1, the number of sub-areas m=x×y in the rectangular areas, the third average luminance value of each sub-area is calculated, and the sub-area luminance value is L (i), where i=1, 2, 3.
The first average brightness value of the preview image can be obtained by dividing the brightness values of the M sub-areas by M after adding.
Step 130, determining a second average luminance value by correcting the first average luminance value.
Specifically, the average luminance value does not truly reflect the luminance value perceived by the image as perceived by the human eye, and therefore, it is necessary to correct the first average luminance value of the preview image after calculating the first average luminance value.
In an alternative implementation of this embodiment, before the step of determining the second average luminance value by correcting the first average luminance value, the method further includes: distributing a brightness value array according to a preset quantization bit number; determining the number of subareas corresponding to each brightness value of the brightness value array according to all the third average brightness values, and constructing a histogram example of brightness values which are generated directly, wherein a quantization bit t of brightness in the area is preset according to the maximum brightness value of the preview image, and an n=2 is allocated according to the quantization bit t For example, if the maximum luminance value of the current preview image is 251, the quantization bit t needs to be set to 8, and the assigned luminance value array n=256 indicates that the luminance value interval of the current preview image is between 0 and 256, combined with the previewThe brightness value of each sub-area in the image is calculated, the number of sub-areas corresponding to each brightness value of the brightness value interval is calculated, and a histogram is generated, wherein the abscissa of the histogram represents the brightness value, the ordinate represents the number of sub-areas, and the histogram can intuitively display the proportion of different brightness values in the preview image and reflect the exposure condition of the preview image.
In an alternative implementation of this embodiment, the step of determining the second average luminance value by correcting the first average luminance value includes: acquiring a preset high brightness threshold value and a preset low brightness threshold value; determining a proportion of the highlight area in the histogram where the third average luminance value is not lower than the highlight threshold; determining a low luminance area proportion in the histogram where the third average luminance value is not higher than the low luminance threshold; the first average luminance value is corrected by the high luminance area ratio and the low luminance area ratio.
Specifically, in practical application, in order to ensure that the aerial survey camera can normally operate during aerial survey, the aerial survey camera usually can fly in a preset area before aerial survey, the aerial survey camera in the test flight stage is always in an on state, the aerial survey camera at the moment can also collect preview images, and after the test flight is finished, ground operators can set a high-brightness threshold value and a low-brightness threshold value for judging the high brightness and the low brightness of the preview images according to the brightness values of the preview images fed back by the aerial survey camera. In this embodiment, after the high brightness threshold and the low brightness threshold are obtained, the proportion of the high brightness area with brightness higher than the high brightness threshold in the histogram and the proportion of the low brightness area with brightness lower than the low brightness threshold in the histogram are determined by querying the histogram, it is understood that in the histogram, the brightness value corresponds to the bottom used for calculating the area, the number of the subareas corresponds to the high used for calculating the area, the proportion of the high brightness area of the preview image is represented by adding the areas of the brightness value higher than the high brightness threshold and dividing the sum of the areas by the total area of the histogram, and in the same way, the proportion of the low brightness area in the preview image can be calculated, and then a second average brightness value after the correction of the preview image is calculated according to a preset correction coefficient and combined with a corresponding correction formula, and the second average brightness value can reflect the brightness value perceived by the human eye sense.
Optionally, the calculation formula of the highlight area ratio is:
where Rh is the proportion of the highlight area, F is the high brightness threshold, H (j) is the number of sub-areas corresponding to the brightness value, j is the corresponding brightness value, j=1, 2, …, N is the maximum value of the brightness value array, M is the number of all sub-areas, and La is the first average brightness value.Representing the occupied area of the corresponding luminance value, +.>The occupation area of all brightness values is represented, and the occupation ratio of the brightness values higher than the brightness threshold value in the preview image can be calculated through a summation formula of Rh.
The calculation formula of the low-brightness area ratio is as follows:
and in the same way, the brightness value lower than the low brightness threshold value can be calculated according to the summation formula of Rl.
The calculation formula for correcting the first average brightness value by the high bright area proportion and the low bright area proportion is as follows:
wherein,for the corrected second average luminance, k is a correction coefficient, and the initial value may be 1, and the correction coefficient needs to be adjusted according to the effect during the actual test to achieve an optimal effect, for example, during the test flight,and adjusting the correction coefficient according to the pre-correction result of the image, detecting whether the exposure value of the corrected image can meet the preset shooting requirement, and if so, determining the correction coefficient in the test flight process as the correction coefficient k in the aerial survey process.
It should be noted that Rh and Rl are both numbers smaller than 1, so the difference between them is not greater than 1, and when rh—rl >0, it means that the highlight portion in the preview image is greater than the low highlight portion, and the first average luminance value is corrected upward by the above correction calculation formula to obtain the second average luminance, and the second average luminance value is greater than the first average luminance value. Similarly, when rh—rl <0 indicates that the highlight portion is smaller than the low highlight portion in the preview image, it is necessary to correct the first average luminance value downward, and the resulting second average luminance value is smaller than the first average luminance value.
And 140, adjusting a first exposure parameter of the preview image according to the second average brightness value and a preset expected brightness value.
Specifically, in this embodiment, the corrected second average luminance value is used to represent the real luminance of the preview image, and the expected luminance value is a median luminance value between the high luminance value and the low luminance value in the luminance value interval of the preview image, and then an adjustment coefficient is determined according to the second average luminance value and the preset expected luminance value, and the first exposure parameter of the preview image of the previous frame is adjusted according to the adjustment coefficient.
In an optional implementation manner of this embodiment, the step of adjusting the first exposure parameter of the preview image according to the corrected second average brightness value and the preset desired brightness value includes: acquiring a second exposure parameter of a previous frame image of a target shooting image in the preview image; adjusting the first exposure parameter according to the second exposure parameter, the second average brightness value and a preset expected brightness value; the first exposure parameter is adjusted in the following manner: first exposure parameter=second exposure parameter×preset desired luminance/second average luminance.
Specifically, in this embodiment, it should be noted that, before capturing by the aerial camera, each frame of preview image corresponds to one exposure parameter, when detecting that the unmanned aerial vehicle has flown to the target capturing area, the mechanical shutter is controlled to close to capture the image, then the preview image of the current frame is the captured image, the corresponding exposure parameter is the adjusted first exposure parameter, the exposure parameter of the previous frame of preview image is the second exposure parameter, and then the adjustment formula of the corresponding first exposure parameter is: first exposure parameter=second exposure parameter×preset desired luminance value/second average luminance value, wherein the preset desired luminance value/second average luminance value represents a ratio of the first exposure parameter of the captured image to be adjusted.
In another embodiment of the present application, the weight values of the different brightness areas in the preview image are adjusted; generating a brightness weight table according to the weight value; determining a weighted average luminance value by combining the luminance weight table and the histogram; and determining a first exposure parameter according to the weighted average brightness value and a preset expected brightness value.
Specifically, in the present embodiment, the luminance weight table is used to correct the average luminance, that is, the weights of the blocks with high luminance and low luminance are increased, and then the weighted average luminance is calculated. The luminance weight table is a technique for image processing and computer vision for weighting the luminance of an image so as to better extract information in the image. The luminance weight table is typically a two-dimensional array, in which each element represents the luminance weight of a corresponding position in the image, as shown in fig. 2, and is a luminance weight diagram in which the luminance of the image generated by the luminance weight table is quantized 5 bits (i.e., the highest luminance is 2 to the power of 5 and is equal to 32), the abscissa represents the luminance value, the ordinate represents the weight, the bar graph of the left convex portion represents the weight of the low luminance portion, the bar graph of the right convex portion represents the weight of the high luminance portion, and the weighted average luminance value Lc is calculated by using the weight and the luminance distribution of the histogram, instead of the first average luminance value La. The calculation formula of the weighted average brightness value Lc is as follows:
,
in the calculation formula, j=1, 2, …, n, and n=32, W (j) represents a weight corresponding to each brightness, that is, each H (j) has a corresponding weight value W (j), and the weight value W (j) is multiplied by H (j) to obtain a weighted total brightness, and then divided by the sum of the weights to obtain a weighted average brightness value, and the weighted average brightness value and the second average brightness value are substituted into an adjustment formula of the first exposure parameter to obtain the first exposure parameter. The problem of local overexposure of the captured image can also be ameliorated by adjusting the weighted average luminance value.
Based on the embodiment scheme of the application, acquiring a preview image in real time; determining a first average brightness value of the preview image; correcting the first average brightness value; and adjusting a first exposure parameter of the preview image according to the corrected second average brightness value and a preset expected brightness value. Through implementation of the scheme, the first average brightness value of the preview image is obtained, the first average brightness value is corrected, the first exposure parameter of the image to be shot currently is adjusted according to the corrected second average brightness value and the preset expected brightness value, and the brightness difference value between high-contrast scenes is balanced through the corrected second average brightness value, so that overexposure of the local area of the shot image can be effectively prevented.
Fig. 3 is a schematic diagram of an image local overexposure adjustment device according to an embodiment of the present application, where the image local overexposure adjustment device may be used to implement the image local overexposure adjustment method in the foregoing embodiment. As shown in fig. 3, the image local overexposure adjusting device mainly includes:
the acquisition module 10 is used for acquiring preview images in real time;
a determining module 20, configured to determine a first average luminance value of the preview image;
a correction module 30 for determining a second average luminance value by correcting the first average luminance value;
the adjusting module 40 is configured to adjust the first exposure parameter of the preview image according to the corrected second average brightness value and the preset expected brightness value.
In an optional implementation manner of this embodiment, the determining module is specifically configured to: dividing the preview image into rectangular areas of X rows and Y columns; wherein X and Y are integers greater than or equal to 1; determining a third average brightness value of a single sub-region in the rectangular region; and determining a first average brightness value of the preview image according to the third average brightness values of all the subareas.
Further, in an optional implementation manner of this embodiment, the image local overexposure adjustment device further includes: and generating a module. The construction module is used for: distributing a brightness value array according to a preset quantization bit number; and determining the number of subareas corresponding to each brightness value of the brightness value array according to all the third average brightness values, and generating a histogram of the brightness values.
Still further, in an alternative implementation manner of this embodiment, the correction module is specifically configured to: acquiring a preset high brightness threshold value and a preset low brightness threshold value; determining a proportion of the highlight area in the histogram where the third average luminance value is not lower than the highlight threshold; determining a low luminance area proportion in the histogram where the third average luminance value is not higher than the low luminance threshold; the first average luminance value is corrected by the high luminance area ratio and the low luminance area ratio.
Further, in an alternative implementation manner of this embodiment, the adjusting module is specifically configured to: acquiring a second exposure parameter of a previous frame image of a target shooting image in the preview image; adjusting the first exposure parameter according to the second exposure parameter, the second average brightness value and a preset expected brightness value; the first exposure parameter is adjusted in the following manner: first exposure parameter=second exposure parameter×preset desired luminance value/second average luminance value.
Still further, in another alternative implementation of this embodiment, the adjustment module is further configured to: and adjusting the weight values of different brightness areas in the preview image. The generation module is also used for: and generating a brightness weight table according to the weight value. The determination module is also for: the weighted average luminance value is determined by combining the luminance weight table and the histogram. The adjustment module is also for: and determining a first exposure parameter according to the weighted average brightness value and a preset expected brightness value.
According to the image local overexposure adjusting device provided by the scheme of the application, the preview image is acquired in real time; determining a first average brightness value of the preview image; correcting the first average brightness value; and adjusting a first exposure parameter of the preview image according to the corrected second average brightness value and a preset expected brightness value. Through implementation of the scheme, the first average brightness value of the preview image is obtained, the first average brightness value is corrected, the first exposure parameter of the image to be shot currently is adjusted according to the corrected second average brightness value and the preset expected brightness value, and the brightness difference value between high-contrast scenes is balanced through the corrected second average brightness value, so that overexposure of the local area of the shot image can be effectively prevented.
Fig. 4 is an electronic device provided in an embodiment of the present application. The electronic device may be used to implement the image local overexposure adjustment method in the foregoing embodiment, and mainly includes:
memory 401, processor 402, and computer program 403 stored on memory 401 and executable on processor 402, memory 401 and processor 402 being connected by communication. The processor 402, when executing the computer program 403, implements the image local overexposure adjustment method in the foregoing embodiment. Wherein the number of processors may be one or more.
The memory 401 may be a high-speed random access memory (RAM, random Access Memory) memory or a non-volatile memory (non-volatile memory), such as a disk memory. The memory 401 is used for storing executable program codes, and the processor 402 is coupled with the memory 401.
Further, the embodiment of the application further provides a computer readable storage medium, which may be provided in the electronic device in each embodiment, and the computer readable storage medium may be a memory in the embodiment shown in fig. 4.
The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the image local overexposure adjustment method in the foregoing embodiment. Further, the computer-readable medium may be any medium capable of storing a program code, such as a usb (universal serial bus), a removable hard disk, a Read-Only Memory (ROM), a RAM, a magnetic disk, or an optical disk.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules is merely a logical function division, and there may be additional divisions of actual implementation, e.g., multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules illustrated as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
The integrated modules, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a readable storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned readable storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
It should be noted that, for the sake of simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily all necessary for the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
The foregoing describes the method, apparatus, device and readable storage medium for adjusting local overexposure of an image provided in the present application, and those skilled in the art, based on the concepts of the embodiments of the present application, may change in terms of specific implementation manners and application ranges.

Claims (10)

1. A method for adjusting local overexposure of an image, comprising:
collecting preview images in real time;
determining a first average luminance value of the preview image;
determining a second average luminance value by correcting the first average luminance value;
and adjusting a first exposure parameter of the preview image according to the second average brightness value and a preset expected brightness value.
2. The method of claim 1, wherein the step of determining a first average luminance value of the preview image comprises:
dividing the preview image into rectangular areas of X rows and Y columns; wherein X and Y are integers greater than or equal to 1;
determining a third average brightness value of a single sub-region in the rectangular region;
and determining a first average brightness value of the preview image according to the third average brightness values of all the subareas.
3. The method of adjusting local overexposure of an image according to claim 2, further comprising, prior to the step of determining a second average luminance value by correcting the first average luminance value:
distributing a brightness value array according to a preset quantization bit number;
and determining the number of subareas corresponding to each brightness value of the brightness value array according to all the third average brightness values, and generating a histogram of the brightness values.
4. A method of adjusting local overexposure of an image as set forth in claim 3 wherein said step of determining a second average luminance value by modifying said first average luminance value includes:
acquiring a preset high brightness threshold value and a preset low brightness threshold value;
determining a proportion of the highlight area in the histogram where the third average luminance value is not lower than the highlight threshold;
determining a low luminance area proportion in the histogram where the third average luminance value is not higher than the low luminance threshold;
and correcting the first average brightness value through the highlight area proportion and the low highlight area proportion, and determining a second average brightness value according to a correction result.
5. The method of image local overexposure adjustment of claim 4, further comprising:
the high luminance ratio is calculated by the following formula:
wherein Rh is the ratio of the highlight area, F is the high brightness threshold, H (j) is the number of sub-areas of the histogram corresponding to the brightness value, j is the corresponding brightness value, j=1, 2,..n, N is the maximum value of the brightness value array, M is the number of all sub-areas, and La is the first average brightness value;
the low luminance area ratio is calculated by the following formula:
wherein, rl is the low brightness area ratio and E is the low brightness threshold;
the step of correcting the first average brightness value through the highlight area proportion and the low highlight area proportion and determining a second average brightness value according to a correction result comprises the following steps:
the second average luminance value is calculated by the following formula:
wherein,k is a correction coefficient for the corrected second average luminance.
6. The method of claim 4, wherein the step of adjusting the first exposure parameter of the preview image according to the second average brightness value and a preset desired brightness value comprises:
acquiring a second exposure parameter of a previous frame image of a target shooting image in the preview image;
adjusting a first exposure parameter according to the second exposure parameter, the second average brightness value and the preset expected brightness value; the first exposure parameter is adjusted in the following manner: the first exposure parameter=the second exposure parameter×the preset desired luminance value/the second average luminance value.
7. A method of adjusting local overexposure of an image as set forth in claim 3, further comprising:
adjusting weight values of different brightness areas in the preview image;
generating a brightness weight table according to the weight value;
determining a weighted average luminance value by combining the luminance weight table and the histogram;
and determining a first exposure parameter according to the weighted average brightness value and the preset expected brightness value.
8. An image local overexposure adjustment device, characterized by comprising:
the acquisition module is used for acquiring the preview image in real time;
a determining module, configured to determine a first average luminance value of the preview image;
a correction module for determining a second average luminance value by correcting the first average luminance value;
and the adjusting module is used for adjusting the first exposure parameter of the preview image according to the second average brightness value and a preset expected brightness value.
9. An electronic device comprising a memory and a processor, wherein:
the processor is used for executing the computer program stored on the memory;
the processor, when executing the computer program, implements the steps of the method for local overexposure adjustment of an image according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the image local overexposure adjustment method of any of claims 1 to 7.
CN202410295150.3A 2024-03-15 2024-03-15 Image local overexposure adjustment method, device and equipment and readable storage medium Active CN117896622B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410295150.3A CN117896622B (en) 2024-03-15 2024-03-15 Image local overexposure adjustment method, device and equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410295150.3A CN117896622B (en) 2024-03-15 2024-03-15 Image local overexposure adjustment method, device and equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN117896622A true CN117896622A (en) 2024-04-16
CN117896622B CN117896622B (en) 2024-06-11

Family

ID=90645977

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410295150.3A Active CN117896622B (en) 2024-03-15 2024-03-15 Image local overexposure adjustment method, device and equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN117896622B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104917976A (en) * 2015-06-05 2015-09-16 北京大恒图像视觉有限公司 Camera automatic shutter and automatic gain adjustment method
CN105635597A (en) * 2015-12-21 2016-06-01 湖北工业大学 Auto-exposure method and system for vehicle-mounted camera
CN114119431A (en) * 2021-11-09 2022-03-01 深圳Tcl新技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN114727024A (en) * 2021-01-05 2022-07-08 广州汽车集团股份有限公司 Automatic exposure parameter adjusting method and device, storage medium and shooting equipment
CN116193266A (en) * 2023-02-23 2023-05-30 惠州华阳通用电子有限公司 Camera exposure control method
CN116739938A (en) * 2023-06-29 2023-09-12 峰米(北京)科技有限公司 Tone mapping method and device and display equipment
CN117218039A (en) * 2023-10-18 2023-12-12 上海闻泰电子科技有限公司 Image processing method, device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104917976A (en) * 2015-06-05 2015-09-16 北京大恒图像视觉有限公司 Camera automatic shutter and automatic gain adjustment method
CN105635597A (en) * 2015-12-21 2016-06-01 湖北工业大学 Auto-exposure method and system for vehicle-mounted camera
CN114727024A (en) * 2021-01-05 2022-07-08 广州汽车集团股份有限公司 Automatic exposure parameter adjusting method and device, storage medium and shooting equipment
CN114119431A (en) * 2021-11-09 2022-03-01 深圳Tcl新技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN116193266A (en) * 2023-02-23 2023-05-30 惠州华阳通用电子有限公司 Camera exposure control method
CN116739938A (en) * 2023-06-29 2023-09-12 峰米(北京)科技有限公司 Tone mapping method and device and display equipment
CN117218039A (en) * 2023-10-18 2023-12-12 上海闻泰电子科技有限公司 Image processing method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN117896622B (en) 2024-06-11

Similar Documents

Publication Publication Date Title
CN108337445B (en) Photographing method, related device and computer storage medium
US8977073B2 (en) Apparatus and method for blending multiple images
KR101026577B1 (en) A system and process for generating high dynamic range video
CN113992861B (en) Image processing method and image processing device
CN105812675B (en) Method for generating HDR images of a scene based on a compromise between luminance distribution and motion
US8860816B2 (en) Scene enhancements in off-center peripheral regions for nonlinear lens geometries
KR101699919B1 (en) High dynamic range image creation apparatus of removaling ghost blur by using multi exposure fusion and method of the same
CN112396562B (en) Disparity map enhancement method based on fusion of RGB and DVS images in high dynamic range scene
JP6218389B2 (en) Image processing apparatus and image processing method
US20090040364A1 (en) Adaptive Exposure Control
CN110349163B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN109922275B (en) Self-adaptive adjustment method and device of exposure parameters and shooting equipment
US20150109525A1 (en) Image processing apparatus, image processing method, and storage medium
CN109413335B (en) Method and device for synthesizing HDR image by double exposure
CN111246114B (en) Photographing processing method and device, terminal equipment and storage medium
Guthier et al. Flicker reduction in tone mapped high dynamic range video
KR20130061635A (en) System and method for performing depth estimation utilizing defocused pillbox images
CN110809146A (en) Image contrast adjusting method and device, terminal equipment and storage medium
CN110866486A (en) Subject detection method and apparatus, electronic device, and computer-readable storage medium
CN110430372B (en) Image exposure method and device, shooting equipment and unmanned aerial vehicle
JP7374582B2 (en) Image processing device, image generation method and program
CN113362253B (en) Image shading correction method, system and device
JP5843599B2 (en) Image processing apparatus, imaging apparatus, and method thereof
KR101437898B1 (en) Apparatus and method for generating a High Dynamic Range image using single image
CN117896622B (en) Image local overexposure adjustment method, device and equipment and readable 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