CN109510946B - HDR scene detection method and system - Google Patents

HDR scene detection method and system Download PDF

Info

Publication number
CN109510946B
CN109510946B CN201710839104.5A CN201710839104A CN109510946B CN 109510946 B CN109510946 B CN 109510946B CN 201710839104 A CN201710839104 A CN 201710839104A CN 109510946 B CN109510946 B CN 109510946B
Authority
CN
China
Prior art keywords
hdr
region
value
preview image
area
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.)
Active
Application number
CN201710839104.5A
Other languages
Chinese (zh)
Other versions
CN109510946A (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.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai 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 Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN201710839104.5A priority Critical patent/CN109510946B/en
Publication of CN109510946A publication Critical patent/CN109510946A/en
Application granted granted Critical
Publication of CN109510946B publication Critical patent/CN109510946B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors
    • 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/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • 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/62Control of parameters via user interfaces

Abstract

The invention provides a method and a system for detecting an HDR scene. The method comprises the following steps: extracting an interested area of a preview image of a current scene; determining a first HDR value of the preview image according to the area and brightness information of the region of interest; and judging whether the current scene is an HDR scene according to the first HDR value. The method and the device can improve the accuracy of HDR scene detection and improve user experience.

Description

HDR scene detection method and system
Technical Field
The invention relates to the technical field of photographing, in particular to a method and a system for detecting an HDR scene.
Background
The function of shooing of present cell-phone has been more and more paid more and more attention to by the user, and simple and convenient the high-quality picture of shooing under high contrast (high latitude) scene can promote user's use experience by a wide margin, especially stands for attention to numerous women user high quality auto heterodyne.
However, the existing mobile phone photographing technology is limited by the size of the optical device, and is difficult to correctly expose bright and dark parts of a high-contrast scene, so that the details of the bright part or the dark part of a photographed picture are always sacrificed. The current solution is to improve the photographing quality in High contrast scenes by HDR (High Dynamic Range) processing, and it is unknown to the layman user when HDR processing is needed. Therefore, it is very important to automatically and accurately detect the HDR scene and turn on the HDR function, and an erroneous detection algorithm may not only improve the picture quality but also affect the photographing speed and reduce the user experience.
The current mainstream HDR scene detection mode is mainly based on brightness comparison of spatial regions, and compares the brightness of each region to further determine whether the current scene needs to be opened with the HDR function.
In the process of implementing the invention, the inventor finds that at least the following technical problems exist in the prior art: the existing HDR scene detection algorithm has low detection result accuracy and poor user experience.
Disclosure of Invention
The HDR scene detection method and system provided by the invention can improve the accuracy of HDR scene detection and improve user experience.
In a first aspect, the present invention provides a method for detecting an HDR scene, including:
extracting an interested area of a preview image of a current scene;
determining a first HDR value of the preview image according to the area and brightness information of the region of interest;
and judging whether the current scene is an HDR scene according to the first HDR value.
Optionally, the extracting the region of interest of the preview image of the current scene includes:
and detecting the interested region of the preview image by adopting an object detection algorithm, and searching the interested region of the preview image by adopting a graph search algorithm when the interested region is not detected.
Optionally, the finding the region of interest of the preview image by using the graph search algorithm includes:
dividing the preview image into 3x3 regions of equal area;
calculating RGB information of each area;
marking the central area as an interested area, sequentially comparing the similarity of the RGB information of each adjacent area of the central area and the RGB information of the central area, and marking the adjacent area as the interested area when the similarity of the RGB information of the adjacent area and the RGB information of the central area is greater than a first threshold value.
Optionally, the determining a first HDR value for the preview image according to the area and brightness information of the region of interest comprises:
according to the formula
Figure BDA0001409464120000021
Calculating a first HDR value for the preview image, where HROIIs a first HDR value of the preview image, K is a debugging coefficient, SROIIs the area of the region of interest, SALLArea of the whole preview image, LaveAs the mean value of the brightness of the region of interest, LtargetAs brightness target value of the region of interest, DROIIs the luminance variance value of the region of interest.
Optionally, the determining whether the current scene is an HDR scene according to the first HDR value comprises:
when the first HDR value is larger than or equal to a second threshold value, judging that the current scene is an HDR scene;
when the first HDR value is smaller than or equal to a third threshold value, judging that the current scene is a non-HDR scene;
when the first HDR value is less than the second threshold and greater than the third threshold, calculating a luminance histogram of the preview image; determining a second HDR value for the preview image from the luminance histogram; and judging whether the current scene is an HDR scene according to the first HDR value and the second HDR value.
Optionally, the determining a second HDR value for the preview image from the luminance histogram comprises:
searching a peak area of the brightness histogram;
when the brightness histogram only has one peak area and the peak area is not at the center position of the brightness histogram, according to the formula
Figure BDA0001409464120000031
Calculating a second HDR value for the preview image, where HhsiFor a second HDR value of the preview image, P1 is the total number of pixels in the peak region, P is the total number of pixels of the preview image;
when the brightness histogram has a plurality of peak regions and the plurality of peak regions are distributed in both a bright area and a dark area, the formula is shown
Figure BDA0001409464120000032
Calculating a second HDR value for the preview image, where HhsiIs the second HDR value, X, of the preview imageminIs the starting position of the leftmost peak region, XmaxThe starting position of the rightmost peak region, P2 the total number of pixels in the leftmost peak region, and P3 the total number of pixels in the rightmost peak region;
setting the second HDR value of the preview image to zero when the luminance histogram has no peak region.
Optionally, the determining whether the current scene is an HDR scene according to the first HDR value and the second HDR value comprises:
when the sum of the first HDR value and the second HDR value is larger than a fourth threshold value, judging that the current scene is an HDR scene, and otherwise, judging that the current scene is a non-HDR scene.
In a second aspect, the present invention provides an HDR scene detection system, comprising:
the extraction module is used for extracting an interested area of a preview image of a current scene;
a first HDR value determining module, configured to determine a first HDR value of the preview image according to the area and brightness information of the region of interest;
and the judging module is used for judging whether the current scene is an HDR scene according to the first HDR value.
Optionally, the extraction module comprises:
a detection unit for detecting an interesting region of the preview image by using an object detection algorithm;
and the searching unit is used for searching the interested area of the preview image by adopting a graph searching algorithm when the interested area is not detected by the detecting unit.
Optionally, the finding unit includes:
a dividing subunit configured to divide the preview image into 3 × 3 regions of equal area;
an RGB calculating subunit, configured to calculate RGB information of each region;
the marking subunit is configured to mark the central region as an interested region, sequentially compare similarity between RGB information of each adjacent region of the central region and the central region, and mark the adjacent region as the interested region when the similarity between the RGB information of the adjacent region and the central region is greater than a first threshold.
Optionally, the first HDR value determining module is configured to formulate
Figure BDA0001409464120000041
Calculating a first HDR value for the preview image, where HROIIs a first HDR value of the preview image, K is a debugging coefficient, SROIIs the area of the region of interest, SALLArea of the whole preview image, LaveAs the mean value of the brightness of the region of interest, LtargetIs a region of interestBrightness target value of DROIIs the luminance variance value of the region of interest.
Optionally, the determining module includes:
a first judging unit, configured to judge that a current scene is an HDR scene when the first HDR value is greater than or equal to a second threshold;
a second judging unit, configured to judge that the current scene is a non-HDR scene when the first HDR value is less than or equal to a third threshold;
a histogram calculation unit configured to calculate a luminance histogram of the preview image when the first HDR value is less than the second threshold and greater than the third threshold;
a second HDR value determining unit configured to determine a second HDR value of the preview image from the luminance histogram;
a third judging unit, configured to judge whether the current scene is an HDR scene according to the first HDR value and the second HDR value.
Optionally, the second HDR value determining unit includes:
a searching subunit, configured to search a peak region of the luminance histogram;
a second HDR value calculating subunit for calculating the second HDR value according to the formula when the luminance histogram has only one peak region and the peak region is not at the center of the luminance histogram
Figure BDA0001409464120000051
Calculating a second HDR value for the preview image, where HhsiFor a second HDR value of the preview image, P1 is the total number of pixels in the peak region, P is the total number of pixels of the preview image; or, when the brightness histogram has a plurality of peak regions and the plurality of peak regions have distribution in both bright and dark regions, according to the formula
Figure BDA0001409464120000052
Calculating a second HDR value for the preview image, where HhsiIs the second HDR value, X, of the preview imageminIs the starting position of the leftmost peak region, XmaxThe starting position of the rightmost peak region, P2 the total number of pixels in the leftmost peak region, and P3 the total number of pixels in the rightmost peak region; or, when the brightness histogram has no peak value area, setting the second HDR value of the preview image to zero.
Optionally, the third determining unit is configured to determine that the current scene is an HDR scene when a sum of the first HDR value and the second HDR value is greater than a fourth threshold, and otherwise determine that the current scene is a non-HDR scene.
According to the HDR scene detection method and system provided by the invention, the region of interest of the preview image of the current scene is extracted, the first HDR value of the preview image is determined according to the area and brightness information of the region of interest, and finally whether the current scene is the HDR scene is judged according to the first HDR value. Compared with the prior art, the method and the device have better data characteristics by performing key analysis on the brightness information of the region of interest, so that the accuracy of HDR scene detection can be improved, and the user experience is improved.
Drawings
Fig. 1 is a flowchart of an HDR scene detection method according to an embodiment of the present invention;
FIG. 2 is a cut-away view of a preview image according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an HDR scene detection system according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an extraction module of FIG. 3;
FIG. 5 is a schematic diagram of a structure of the search unit in FIG. 4;
FIG. 6 is a schematic diagram of a structure of the determining module shown in FIG. 3;
fig. 7 is a schematic diagram of a structure of the second HDR value determining unit in fig. 6.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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.
An embodiment of the present invention provides an HDR scene detection method, as shown in fig. 1, the method includes:
and S11, extracting the interested region of the preview image of the current scene.
If a human face, a person, a pet, or the like exists in the preview image Of the current scene, these regions are defined as Regions Of Interest (ROI). The existing object detection algorithms such as face recognition are already mature, and the interested regions can be completely detected. If the interesting area can not be detected, according to the operation habit of a user (usually, an interesting shooting object is placed at the center position of a picture), the central area of the preview image is set as a part of the interesting area, and because the RGB information distribution of the same object is similar, the ROI area is jointly formed by all areas similar to the central area through carrying out the breadth-first graph search algorithm by taking the central area as a starting point. Specifically, as shown in fig. 2, the preview image is firstly divided into small regions of 3 × 3 equal areas, RGB information of each region is calculated, the central region C is marked as a region of interest, then the RGB information of 8 regions adjacent to the central region C and the RGB information of the central region C are sequentially compared, if the similarity between the RGB information of a certain region and the RGB information of the central region C is greater than a first threshold, it is indicated that the region is also a region of interest, the region is marked as a region of interest, a graph path is formed between the region and the C region, and all regions with the similarity between the RGB information of the C region and the RGB information of the C region greater than the first threshold are found and marked as regions of interest, so that the whole region of interest is obtained.
S12, determining a first HDR value of the preview image according to the area and brightness information of the region of interest.
After the region of interest of the preview image is obtained, the area and brightness information of the region of interest can be obtained. First dynamically according to the area of ROISetting the influence weight Delta of ROI area on HDRROIThe larger the ROI area is, the larger ΔROIThe larger.
ΔROICan be expressed by formula (1), wherein SROIIs the area of the region of interest, SALLIs the area of the whole preview image.
Figure BDA0001409464120000071
Then analyzing the brightness information of the ROI area to obtain an HDR response value V of the ROI areaROIThe expression of which can be expressed by the formula (2),
Figure BDA0001409464120000072
wherein, LaveAs the mean value of the brightness of the region of interest, LtargetFor the brightness target value of the region of interest, which is a preset value, an optimally adjusted brightness criterion can be set, DROIThe brightness variance value of the region of interest is defined, and the larger the variance value is, the more dispersed the brightness value of the region is.
Analyzing the brightness information of the ROI area is also helpful for setting the exposure of an HDR algorithm, and the HDR algorithm adopts the basic principle that a normally exposed picture, an overexposed picture and an underexposed picture are taken, and then three pictures are subjected to synthesis processing. When the abnormal exposure of the ROI is detected, a picture enabling the exposure of the ROI to be normal, a picture enabling the exposure to be normal and a picture enabling the exposure of a non-ROI to be normal can be obtained, and then the three pictures are synthesized, so that the synthesized picture can better meet the expectation of a user.
Finally we can get a value H from the ROI's perspective that indicates whether the preview image has reached HDR processing or notROIDenoted as the first HDR value, the expression of which can be expressed by equation (3),
HROI=K*ΔROI*VROI(3)
k is a debugging coefficient and can be any real number within a value range of 0-1.
And S13, judging whether the current scene is an HDR scene according to the first HDR value.
Here we need to set two thresholds HhdrAnd Hno_hdrTo determine whether the current scene is an HDR scene.
When H is presentROI≥HhdrJudging that the current scene is an HDR scene;
when H is presentROI≤Hno_hdrJudging that the current scene is a non-HDR scene;
when H is presentno_hdr<HROI<HhdrAnd then, continuously analyzing by using the brightness histogram of the preview image. First, a luminance histogram of the preview image is calculated, in which the horizontal axis represents luminance (0 to 255) and the vertical axis represents the number of pixels corresponding to the luminance. Then, determining a second HDR value of the preview image according to the luminance histogram, which may specifically include: searching a peak area in the luminance histogram, where the peak area in this patent refers to a section of the luminance histogram having a certain width, and if the total number of pixels included in the section of the luminance histogram exceeds 1/8 of the total number of pixels of the whole image, the section of the luminance histogram is called the peak area. The inventor finds out through multiple experiments that the effect of searching the peak area by using the width of 16 in the brightness histogram is best, the horizontal axis of the brightness histogram ranges from 0 to 255, the total width is 256, the expression for judging the peak area can be expressed by formula (4),
Figure BDA0001409464120000081
where x is the starting position of the peak region and hsi is the number of pixels.
After searching for the peak area, the following situations may occur:
case 1: the brightness histogram has only one peak area, and the peak area is located in the central area of the brightness histogram, and the central area is an area with the abscissa of the interval (64, 191).
Case 2: the luminance histogram has only one peak region, and the peak region is not at the center position of the luminance histogram, in which case the second HDR value of the preview image is calculated according to equation (5),
Figure BDA0001409464120000091
wherein HhsiFor the second HDR value of the preview image, P1 is the total number of pixels in the peak region, expressed as
Figure BDA0001409464120000092
P is the total number of pixels of the preview image and the expression is
Figure BDA0001409464120000093
Case 3: the luminance histogram has a plurality of (two or more) peak regions distributed in both a dark region and a bright region, where the dark region is a region having an abscissa of the interval [0, 127], and the bright region is a region having an abscissa of the interval [128,255], in which case the second HDR value of the preview image is calculated according to equation (6),
Figure BDA0001409464120000094
wherein HhsiIs the second HDR value, X, of the preview imageminIs the starting position of the leftmost peak region, XmaxIs the starting position of the rightmost peak region, P2 is the total number of pixels in the leftmost peak region, and the expression is
Figure BDA0001409464120000095
P3 is the total number of pixels in the rightmost peak region, expressed as
Figure BDA0001409464120000096
Case 4: the luminance histogram has a plurality of (two or more) peak regions distributed only in a bright area or a dark area.
Case 5: the luminance histogram has no peak area, in which case the second HDR value is set directly to zero.
If the current scene belongs to case 2, case 3 or case 5, the second HDR value H is finally obtainedhsiAnd a first HDR value HROIAnd judging whether the current scene is an HDR scene.
Defining a value H representing the final HDR level of the preview imagevalThe expression is expressed by the formula (7),
Hval=HROI+Hhsi(7)
if H is presentvalIf the current scene is larger than the preset threshold value, the current scene is judged to be an HDR scene, otherwise, the current scene is judged to be a non-HDR scene.
By adding the analysis of the brightness histogram, the HDR scene detection result can be ensured to be more accurate.
It should be added that, the above cases 1 and 4 indicate that the image is brighter or darker as a whole, which may be caused by exposure errors, or that the scene exceeds the exposure capability of the camera, and such scene needs special processing, rather than being represented as an HDR scene or a non-HDR scene.
According to the HDR scene detection method provided by the embodiment of the invention, the region of interest of the preview image of the current scene is extracted, the first HDR value of the preview image is determined according to the area and brightness information of the region of interest, and finally whether the current scene is the HDR scene is judged according to the first HDR value. Compared with the prior art, the method and the device have the advantages that the brightness of the region of interest is subjected to key analysis, so that the accuracy of HDR scene detection is improved, and the user experience is improved.
An embodiment of the present invention further provides an HDR scene detection system, as shown in fig. 3, the system includes:
an extracting module 31, configured to extract a region of interest of a preview image of a current scene;
a first HDR value determining module 32, configured to determine a first HDR value of the preview image according to the area and brightness information of the region of interest;
a determining module 33, configured to determine whether the current scene is an HDR scene according to the first HDR value.
Optionally, as shown in fig. 4, the extraction module 31 includes:
a detection unit 311, configured to detect a region of interest of the preview image by using an object detection algorithm;
a finding unit 312, configured to find the region of interest of the preview image by using a graph search algorithm when the region of interest is not detected by the detecting unit 311.
Further, as shown in fig. 5, the finding unit 312 includes:
a dividing subunit 3121 configured to divide the preview image into 3 × 3 regions of equal area;
an RGB calculating subunit 3122 configured to calculate RGB information of each region;
the marking subunit 3123 is configured to mark the central region as an interesting region, sequentially compare similarities of RGB information of each adjacent region of the central region and the central region, and mark the adjacent region as the interesting region when the similarity of the RGB information of the adjacent region and the central region is greater than a first threshold.
Optionally, the first HDR value determining module 32 is configured to formulate a formula
Figure BDA0001409464120000111
Calculating a first HDR value for the preview image, where HROIIs a first HDR value of the preview image, K is a debugging coefficient, SROIIs the area of the region of interest, SALLArea of the whole preview image, LaveAs the mean value of the brightness of the region of interest, LtargetAs brightness target value of the region of interest, DROIIs the luminance variance value of the region of interest.
Optionally, as shown in fig. 6, the determining module 33 includes:
a first determining unit 331, configured to determine that the current scene is an HDR scene when the first HDR value is greater than or equal to a second threshold;
a second determining unit 332, configured to determine that the current scene is a non-HDR scene when the first HDR value is less than or equal to a third threshold;
a histogram calculation unit 333 configured to calculate a luminance histogram of the preview image when the first HDR value is smaller than the second threshold value and larger than the third threshold value;
a second HDR value determining unit 334, configured to determine a second HDR value of the preview image according to the luminance histogram;
a third determining unit 335, configured to determine whether the current scene is an HDR scene according to the first HDR value and the second HDR value.
Further, as shown in fig. 7, the second HDR value determining unit 334 includes:
a search subunit 3341 configured to search a peak region of the luminance histogram;
a second HDR value calculating sub-unit 3342 for, when the luminance histogram has only one peak region and the peak region is not at the center position of the luminance histogram, calculating a value of the peak region according to a formula
Figure BDA0001409464120000121
Calculating a second HDR value for the preview image, where HhsiFor a second HDR value of the preview image, P1 is the total number of pixels in the peak region, P is the total number of pixels of the preview image; or, when the brightness histogram has a plurality of peak regions and the plurality of peak regions have distribution in both bright and dark regions, according to the formula
Figure BDA0001409464120000122
Calculating a second HDR value for the preview image, where HhsiIs the second HDR value, X, of the preview imageminIs the starting position of the leftmost peak region, XmaxThe starting position of the rightmost peak region, P2 the total number of pixels in the leftmost peak region, and P3 the total number of pixels in the rightmost peak region; or, when the brightness histogram has no peak value area, setting the second HDR value of the preview image to zero.
Further, the third determining unit 335 is configured to determine that the current scene is an HDR scene when the sum of the first HDR value and the second HDR value is greater than a fourth threshold, and otherwise determine that the current scene is a non-HDR scene.
The HDR scene detection system provided by the embodiment of the invention determines a first HDR value of a preview image of a current scene by extracting an interested area of the preview image and according to the area and brightness information of the interested area, and finally judges whether the current scene is an HDR scene according to the first HDR value. Compared with the prior art, the method and the device have the advantages that the brightness of the region of interest is subjected to key analysis, so that the accuracy of HDR scene detection is improved, and the user experience is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. An HDR scene detection method, comprising:
extracting an interested area of a preview image of a current scene;
determining a first HDR value of the preview image according to the area and brightness information of the region of interest;
when the first HDR value is larger than or equal to a first threshold value, judging that the current scene is an HDR scene;
when the first HDR value is smaller than or equal to a second threshold value, judging that the current scene is a non-HDR scene;
when the first HDR value is less than the first threshold and greater than the second threshold, computing a luminance histogram of the preview image; determining a second HDR value for the preview image from the luminance histogram; and judging whether the current scene is an HDR scene according to the first HDR value and the second HDR value.
2. The method of claim 1, wherein extracting the region of interest of the preview image of the current scene comprises:
and detecting the interested region of the preview image by adopting an object detection algorithm, and searching the interested region of the preview image by adopting a graph search algorithm when the interested region is not detected.
3. The method of claim 2, wherein finding the region of interest of the preview image using a graph search algorithm comprises:
dividing the preview image into 3x3 regions of equal area;
calculating RGB information of each area;
marking the central area as an interested area, sequentially comparing the similarity of the RGB information of each adjacent area of the central area and the RGB information of the central area, and marking the adjacent area as the interested area when the similarity of the RGB information of the adjacent area and the RGB information of the central area is greater than a third threshold value.
4. The method of claim 1, wherein determining a first HDR value for the preview image based on the area and brightness information for the region of interest comprises:
according to the formula
Figure FDA0002508384890000011
Calculating a first HDR value for the preview image, where HROIIs a first HDR value of the preview image, K is a debugging coefficient, SROIIs the area of the region of interest, SALLArea of the whole preview image, LaveAs the mean value of the brightness of the region of interest, LtargetAs brightness target value of the region of interest, DROIIs the luminance variance value of the region of interest.
5. The method of claim 1, wherein determining a second HDR value for the preview image from the luminance histogram comprises:
searching a peak area of the brightness histogram;
when the brightness histogram only has one peak area and the peak area is not at the center position of the brightness histogram, according to the formula
Figure FDA0002508384890000021
Calculating a second HDR value for the preview image, where HhsiFor a second HDR value of the preview image, P1 is the total number of pixels in the peak region, P is the total number of pixels of the preview image;
when the brightness histogram has a plurality of peak regions and the plurality of peak regions are distributed in both a bright area and a dark area, the formula is shown
Figure FDA0002508384890000022
Calculating a second HDR value for the preview image, where HhsiIs the second HDR value, X, of the preview imageminIs the starting position of the leftmost peak region, XmaxThe starting position of the rightmost peak region, P2 the total number of pixels in the leftmost peak region, and P3 the total number of pixels in the rightmost peak region;
setting the second HDR value of the preview image to zero when the luminance histogram has no peak region.
6. The method of claim 1, wherein said determining whether the current scene is an HDR scene according to the first HDR value and the second HDR value comprises:
when the sum of the first HDR value and the second HDR value is larger than a fourth threshold value, judging that the current scene is an HDR scene, and otherwise, judging that the current scene is a non-HDR scene.
7. An HDR scene detection system, comprising:
the extraction module is used for extracting an interested area of a preview image of a current scene;
a first HDR value determining module, configured to determine a first HDR value of the preview image according to the area and brightness information of the region of interest;
the judging module is used for judging whether the current scene is an HDR scene according to the first HDR value;
wherein, the judging module comprises:
a first judging unit, configured to judge that a current scene is an HDR scene when the first HDR value is greater than or equal to a first threshold;
a second judging unit, configured to judge that the current scene is a non-HDR scene when the first HDR value is less than or equal to a second threshold;
a histogram calculation unit configured to calculate a luminance histogram of the preview image when the first HDR value is smaller than the first threshold and larger than the second threshold;
a second HDR value determining unit configured to determine a second HDR value of the preview image from the luminance histogram;
a third judging unit, configured to judge whether the current scene is an HDR scene according to the first HDR value and the second HDR value.
8. The system of claim 7, wherein the extraction module comprises:
a detection unit for detecting an interesting region of the preview image by using an object detection algorithm;
and the searching unit is used for searching the interested area of the preview image by adopting a graph searching algorithm when the interested area is not detected by the detecting unit.
9. The system of claim 8, wherein the finding unit comprises:
a dividing subunit configured to divide the preview image into 3 × 3 regions of equal area;
an RGB calculating subunit, configured to calculate RGB information of each region;
the marking subunit is configured to mark the central region as an interested region, sequentially compare similarity between RGB information of each adjacent region of the central region and the central region, and mark the adjacent region as the interested region when the similarity between the RGB information of the adjacent region and the central region is greater than a third threshold.
10. The system of claim 7, wherein the first HDR value determining module is configured to formulate a first HDR value
Figure FDA0002508384890000041
Calculating a first HDR value for the preview image, where HROIIs a first HDR value of the preview image, K is a debugging coefficient, SROIIs the area of the region of interest, SALLArea of the whole preview image, LaveAs the mean value of the brightness of the region of interest, LtargetAs brightness target value of the region of interest, DROIIs the luminance variance value of the region of interest.
11. The system of claim 7, wherein the second HDR value determining unit comprises:
a searching subunit, configured to search a peak region of the luminance histogram;
a second HDR value calculating subunit for calculating the second HDR value according to the formula when the luminance histogram has only one peak region and the peak region is not at the center of the luminance histogram
Figure FDA0002508384890000042
Calculating a second HDR value for the preview image, which isMiddle HhsiFor a second HDR value of the preview image, P1 is the total number of pixels in the peak region, P is the total number of pixels of the preview image; or, when the brightness histogram has a plurality of peak regions and the plurality of peak regions have distribution in both bright and dark regions, according to the formula
Figure FDA0002508384890000043
Calculating a second HDR value for the preview image, where HhsiIs the second HDR value, X, of the preview imageminIs the starting position of the leftmost peak region, XmaxThe starting position of the rightmost peak region, P2 the total number of pixels in the leftmost peak region, and P3 the total number of pixels in the rightmost peak region; or, when the brightness histogram has no peak value area, setting the second HDR value of the preview image to zero.
12. The system of claim 7, wherein the third determining unit is configured to determine that the current scene is an HDR scene when a sum of the first HDR value and the second HDR value is greater than a fourth threshold, and otherwise determine that the current scene is a non-HDR scene.
CN201710839104.5A 2017-09-15 2017-09-15 HDR scene detection method and system Active CN109510946B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710839104.5A CN109510946B (en) 2017-09-15 2017-09-15 HDR scene detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710839104.5A CN109510946B (en) 2017-09-15 2017-09-15 HDR scene detection method and system

Publications (2)

Publication Number Publication Date
CN109510946A CN109510946A (en) 2019-03-22
CN109510946B true CN109510946B (en) 2020-07-17

Family

ID=65745160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710839104.5A Active CN109510946B (en) 2017-09-15 2017-09-15 HDR scene detection method and system

Country Status (1)

Country Link
CN (1) CN109510946B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110445989B (en) * 2019-08-05 2021-03-23 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment
CN110868533B (en) * 2019-10-15 2021-06-18 宇龙计算机通信科技(深圳)有限公司 HDR mode determination method, device, storage medium and terminal
CN111263072A (en) * 2020-02-26 2020-06-09 Oppo广东移动通信有限公司 Shooting control method and device and computer readable storage medium
CN111770285B (en) * 2020-07-13 2022-02-18 浙江大华技术股份有限公司 Exposure brightness control method and device, electronic equipment and storage medium
CN112738411B (en) * 2020-12-29 2022-08-19 重庆紫光华山智安科技有限公司 Exposure adjusting method, exposure adjusting device, electronic equipment and storage medium
TWI811618B (en) * 2021-01-25 2023-08-11 宏碁股份有限公司 Method and computer program product for filtering an object
CN113747062B (en) * 2021-08-25 2023-05-26 Oppo广东移动通信有限公司 HDR scene detection method and device, terminal and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946513A (en) * 2012-11-08 2013-02-27 北京小米科技有限责任公司 Method, device and terminal for starting HDR (high-dynamic range) function of shooting device
JP2014023062A (en) * 2012-07-20 2014-02-03 Canon Inc Image pickup device and control method thereof
CN103973988A (en) * 2013-01-24 2014-08-06 华为终端有限公司 Scene recognition method and device
CN105959591A (en) * 2016-05-30 2016-09-21 广东欧珀移动通信有限公司 Local HDR implementation method and system
CN106067177A (en) * 2016-06-15 2016-11-02 深圳市万普拉斯科技有限公司 HDR scene method for detecting and device
CN106791475A (en) * 2017-01-23 2017-05-31 上海兴芯微电子科技有限公司 Exposure adjustment method and the vehicle mounted imaging apparatus being applicable

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014023062A (en) * 2012-07-20 2014-02-03 Canon Inc Image pickup device and control method thereof
CN102946513A (en) * 2012-11-08 2013-02-27 北京小米科技有限责任公司 Method, device and terminal for starting HDR (high-dynamic range) function of shooting device
CN103973988A (en) * 2013-01-24 2014-08-06 华为终端有限公司 Scene recognition method and device
CN105959591A (en) * 2016-05-30 2016-09-21 广东欧珀移动通信有限公司 Local HDR implementation method and system
CN106067177A (en) * 2016-06-15 2016-11-02 深圳市万普拉斯科技有限公司 HDR scene method for detecting and device
CN106791475A (en) * 2017-01-23 2017-05-31 上海兴芯微电子科技有限公司 Exposure adjustment method and the vehicle mounted imaging apparatus being applicable

Also Published As

Publication number Publication date
CN109510946A (en) 2019-03-22

Similar Documents

Publication Publication Date Title
CN109510946B (en) HDR scene detection method and system
US9619708B2 (en) Method of detecting a main subject in an image
US7218759B1 (en) Face detection in digital images
US9436999B2 (en) Automatic image orientation and straightening through image analysis
JP6494253B2 (en) Object detection apparatus, object detection method, image recognition apparatus, and computer program
US8176426B2 (en) Image reproduction apparatus and image reproduction program product
US7970180B2 (en) Method, apparatus, and program for processing red eyes
US8306262B2 (en) Face tracking method for electronic camera device
US10824895B2 (en) Image processing apparatus, image processing method, and storage medium
US20160260226A1 (en) Method and apparatus for detecting object in moving image and storage medium storing program thereof
US9773322B2 (en) Image processing apparatus and image processing method which learn dictionary
US20120148118A1 (en) Method for classifying images and apparatus for the same
US8611586B1 (en) Fast target extraction from thermal imagery
US8111877B2 (en) Image processing device and storage medium storing image processing program
WO2017215527A1 (en) Hdr scenario detection method, device, and computer storage medium
US20170111576A1 (en) Image processing apparatus, method, and medium for extracting feature amount of image
CN106295640A (en) The object identification method of a kind of intelligent terminal and device
WO2014074959A1 (en) Real-time face detection using pixel pairs
CN112001883B (en) Optimization method and device for vehicle target image and computer equipment
CN111970405A (en) Camera shielding detection method, storage medium, electronic device and device
TWI624806B (en) Object tracking device and method
WO2016117018A1 (en) Image processing device, image processing method, and image processing program
JP6274876B2 (en) Image processing apparatus, image processing method, and program
US9092661B2 (en) Facial features detection
JPWO2018179119A1 (en) Video analysis device, video analysis method, and program

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