WO2014106445A1 - 逆光检测方法及设备 - Google Patents
逆光检测方法及设备 Download PDFInfo
- Publication number
- WO2014106445A1 WO2014106445A1 PCT/CN2013/090806 CN2013090806W WO2014106445A1 WO 2014106445 A1 WO2014106445 A1 WO 2014106445A1 CN 2013090806 W CN2013090806 W CN 2013090806W WO 2014106445 A1 WO2014106445 A1 WO 2014106445A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- brightness
- image block
- detected
- area
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000001514 detection method Methods 0.000 claims abstract description 51
- 230000007704 transition Effects 0.000 claims description 30
- 238000004891 communication Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 13
- 230000008569 process Effects 0.000 description 8
- 238000003384 imaging method Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000005282 brightening Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/71—Circuitry for evaluating the brightness variation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30168—Image quality inspection
Definitions
- Backlight detection method and device The present application claims priority to Chinese Patent Application No. CN201310005069.9, entitled “Backlight Detection Method and Equipment", filed on January 7, 2013, the entire contents of which are incorporated by reference. Combined in this application.
- the present invention relates to the field of information technologies, and in particular, to a backlight detection method and device.
- Background Art In an image forming process such as a digital camera or a video camera, in the case of backlight shooting, there is often a result that the background portion is too bright and the subject that is actually focused, that is, the object portion is too dark.
- Backlight detection can be widely applied to intelligent scene recognition and automatic exposure control of imaging devices such as digital cameras and video cameras.
- the backlight detection first divides the image into a plurality of rectangular blocks, and then searches for a continuous rectangular block whose luminance value is smaller than the brightness threshold, and counts the number of rectangular blocks satisfying the condition, if the total number of the rectangular blocks is greater than a preset threshold, and If the color saturation variance of the entire image is greater than the preset saturation threshold, then the image is determined to be a backlit scene.
- Embodiments of the present invention provide a backlight detection method and device for improving the accuracy of backlight detection.
- an embodiment of the present invention provides a backlight detection method, including:
- the to-be-detected image includes an M-row and N-column image blocks, where M and N are positive integers; and determining, according to the brightness values of the image blocks,
- the brightness relationship between adjacent image blocks includes:
- the difference between the brightness value of the two adjacent image blocks and the first preset brightness threshold a relationship, determining a brightness relationship between the two adjacent image blocks including:
- the brightness of one of the two adjacent image blocks is greater than the brightness of the other image block.
- the first preset brightness threshold is all the two adjacent ones in the to-be-detected image.
- the determining the image to be detected according to a brightness relationship between adjacent image blocks Dark areas and bright areas in including:
- the image with a small brightness is The block is a dark area
- the brightness of one of the two adjacent image blocks is smaller than the brightness of the other image block, and wherein the brightness value of the image block having a small brightness value is greater than or equal to the second predetermined brightness threshold, the brightness is Small image blocks are bright and dark transition areas;
- the image with the high brightness is The block is a bright area
- the brightness of one of the two adjacent image blocks is greater than the brightness of the other image block, and wherein the brightness value of the image block having the large brightness value is less than or equal to the third predetermined brightness threshold, the brightness is Large image blocks are bright and dark transition areas.
- the method further includes: according to the relationship between the difference between the luminance value difference of the two adjacent image blocks and the first preset brightness threshold in each row of the image to be detected, the method further includes:
- the determining, by the brightness relationship between adjacent image blocks, determining a dark area and a bright area in the image to be detected also includes: for each image block in each row or column, if the order from the first image block to the last image block of each row or column and the last image block to the first image block If the order is determined to be a bright area or a dark area, the image block is determined to be a bright area or a dark area; or
- the order is determined to be a bright area, and the other order is determined to be a dark area, and the image block is determined to be a bright-dark transition area;
- the order is determined to be a dark area or a bright area
- the other order is determined to be a light dark transition area
- the image block is determined to be a dark area or a bright area.
- the determining, by the dark area and the bright area, whether the image to be detected is a backlight scene includes:
- the image to be detected is determined to be a backlight scene, and the light-dark preset relationship satisfies any one or more of the following conditions. a combination of conditions: a ratio of a total area of the dark area to an area of the image to be detected is greater than a preset ratio; an average value of the brightness value of the dark area is less than a preset average value; and an average value of the brightness value of the bright area The difference from the average value of the brightness values of the dark areas is greater than the preset difference.
- the determining, according to the dark area and the bright area, whether the image to be detected is a backlight scene also includes: Determining the backlighting scene, if the average gradient of the pixel points included in the dark area of the image to be detected is greater than a preset gradient threshold, determining that the image to be detected is a backlight scene, if the image to be detected is in the image to be detected The average gradient of the pixel points included in the dark region is less than the preset gradient threshold, and then the image to be detected is determined to be a non-backlight field.
- an embodiment of the present invention provides a backlight detection device, including:
- Obtaining module configured to acquire a brightness value of each image block in the image to be detected
- Determining a module determining, according to the brightness value of each image block, a brightness relationship between adjacent image blocks; and processing module: configured to determine the to-be-detected according to a brightness relationship between adjacent image blocks a dark area and a bright area in the image, and determining whether the image to be detected is a backlight scene according to the dark area and the bright area.
- the image to be detected includes an M-row and N-column image blocks, and M and N are both positive integers; the determining module is specifically configured to:
- the determining module is specifically configured to: if the difference in luminance values of the two adjacent image blocks is greater than the a first preset brightness threshold, determining that the brightness of one of the two adjacent image blocks is greater than the brightness of the other image block; or, if the brightness values of the two adjacent image blocks are If the absolute value of the difference is less than or equal to the first preset brightness threshold, it is determined that the brightness of the two adjacent image blocks is the same.
- the first preset brightness threshold is any of the two adjacent ones in the image to be detected.
- the processing module is specifically configured to:
- the brightness of one of the two adjacent image blocks is smaller than the brightness of the other image block, and wherein the brightness value of the image block having a small brightness value is smaller than the second predetermined brightness threshold, determining that the brightness is small
- the image block is a dark area; If the brightness of one of the two adjacent image blocks is smaller than the brightness of the other image block, and wherein the brightness value of the image block having a small brightness value is greater than or equal to the second predetermined brightness threshold, determining An image block with a small brightness is a bright and dark transition region;
- the brightness of one of the two adjacent image blocks is greater than the brightness of the other image block, and wherein the brightness value of the image block having the large brightness value is greater than the third predetermined brightness threshold, determining that the brightness is large
- the image block is a bright area
- the image block with high brightness is a bright and dark transition area.
- the determining module is further configured to:
- the processing module is further configured to: for each of the image blocks in each row or column, along each row or each The order of the first image block to the last image block of the column and the order of the last image block to the first image block are both determined as a bright area or a dark area, and then the image block is determined to be a bright area or a dark area; Or,
- the order is determined to be a bright area, and the other order is determined to be a dark area, and then the image block is determined to be a light-dark transition area;
- the order is determined to be a dark area or a bright area, and the other order is determined to be a bright-dark transition area, and it is determined that the image block is a dark area or a bright area.
- the processing module is specifically configured to:
- the image is a backlight scene, and the light-dark preset relationship satisfies any one of the following conditions or a combination of the plurality of conditions: a ratio of a total area of the dark area to an area of the image to be detected is greater than a preset ratio; The average value of the brightness value of the dark area is less than the preset average value; the difference between the average value of the brightness value of the bright area and the average value of the brightness value of the dark area is greater than the preset difference value.
- the processing module is further configured to:
- Determining the backlighting scene if the average gradient of the pixel points included in the dark area of the image to be detected is greater than a preset gradient threshold, determining that the image to be detected is a backlight scene, if the image to be detected is in the image to be detected The average gradient of the pixel points included in the dark region is less than the preset gradient threshold, and then the image to be detected is determined to be a non-backlit scene.
- an embodiment of the present invention provides a backlight detection apparatus, including: a processor and a memory, where the memory stores an execution instruction, and when the backlight detection device is in operation, the processor communicates with the memory, The processor executing the execution instructions causes the backlighting detection device to perform any of the first to eighth possible implementations of the first aspect and the first aspect.
- the backlight detection method and device provided by the embodiment of the present invention, the method obtains the brightness value of each image block in the image to be detected; determines the brightness relationship between adjacent image blocks according to the brightness value of each image block; The brightness relationship between the image blocks determines the dark area and the bright area in the image to be detected, and determines whether the image to be detected is a backlight scene according to the dark area and the bright area, thereby improving the accuracy of the backlight scene detection.
- FIG. 1 is a flow chart of a first embodiment of a backlight detection method according to the present invention
- FIG. 2 is a schematic diagram of luminance values of image blocks of a second embodiment of the backlight detection method of the present invention
- FIG. 3B is a second schematic view of a bright and dark region along the row direction of the second embodiment of the backlight detection method of the present invention
- FIG. 1 is a flow chart of a first embodiment of a backlight detection method according to the present invention
- FIG. 2 is a schematic diagram of luminance values of image blocks of a second embodiment of the backlight detection method of the present invention
- FIG. 3B is a second schematic view of a bright and dark region along the row direction of the second embodiment of the backlight detection method of the present invention
- FIG. 3C is a schematic diagram of a light-dark region along a column direction according to a second embodiment of the backlight detection method of the present invention
- FIG. 3D is a second schematic diagram of a light-dark region along the column direction of the second embodiment of the backlight detection method of the present invention
- FIG. 5A is a schematic diagram of a non-backlighting scene according to a second embodiment of the method for detecting backlights according to the second embodiment of the present invention
- FIG. FIG. 7 is a schematic structural diagram of the implementation of the back light detecting device of the present invention.
- FIG. 1 is a flow chart of a first embodiment of a backlight detection method according to the present invention.
- the present embodiment provides a backlight detection method, which can be performed by any device that performs a backlight detection method, and the device can be implemented by software and/or hardware.
- the device may specifically be a terminal device such as a mobile phone, a video camera, or a camera having an imaging function, and the embodiment is not particularly limited herein.
- the method in this embodiment may include: Step 101: Acquire a luminance value of each image block in an image to be detected; in a specific implementation process, the image to be detected may be uniformly divided into MXN images.
- Block, the brightness of each image block can be calculated by using various existing image block brightness calculation methods, wherein M and N are positive integers, and the brightness value can be selected to a certain value range, for example: the value range is 0- 255, the intermediate brightness value is 128.
- Lij represents the image block corresponding to the jth column of the i-th row, and the value of Lij represents the luminance value of the image block Lij. Where l ⁇ i ⁇ M,
- Step 102 Determine, according to the brightness value of each image block, a brightness relationship between adjacent image blocks.
- the image to be detected includes M rows and N columns. Therefore, according to the brightness values of the image blocks,
- the brightness relationship between adjacent image blocks may specifically include two possible implementations: One possible implementation, determined according to the row of the image to be detected. Specifically, determining, according to the magnitude relationship between the difference between the luminance values of any two adjacent image blocks in each row of the image to be detected and the first preset luminance threshold, determining two adjacent images in each row of the image to be detected. The brightness relationship between the blocks. Another possible implementation is determined by the column of the image to be detected.
- determining, according to the magnitude relationship between the difference between the luminance values of any two adjacent image blocks in each column of the image to be detected and the first preset brightness threshold determining two adjacent images in each column of the image to be detected.
- the brightness relationship between the blocks It can be understood by those skilled in the art that the above two possible implementation manners may be determined only according to the row of the image to be detected, or only according to the column of the image to be detected, that is, determined by row or column, and may also be determined according to rows and columns. Also determined.
- the first preset brightness threshold may be determined empirically, and may also be determined according to an average value of luminance difference values of adjacent image blocks. For the specific value of the first preset brightness threshold, the embodiment is not particularly limited herein.
- the backlight detection method provided in this embodiment can determine the brightness relationship between two adjacent image blocks according to the row and/or column of the image to be detected, and can determine the position between adjacent image blocks in the image to be detected from multiple directions.
- the brightness relationship makes the backlight detection accuracy high.
- the luminance relationship between adjacent image blocks includes three cases, in the case of the i-th behavior, adjacent image blocks.
- Li j and the image block Lij+1 are taken as an example, respectively, the brightness of the image block Lij+1 is smaller than the brightness of the image block Lij, or the brightness of the image block Lij+1 is greater than the brightness of the image block Lij, or the image block Lij+1 The brightness is equal to the brightness of the image block Lij. It should be noted that there is no limitation on the specific positional relationship between the image block Lij and the image block Lij+1 in the row, and the image block Lij may be closer to the first image block in the row or in the row. In the first image block, the image block Lij+1 may be the first image block closer to the row or the first image block in the row.
- Step 103 Determine a dark area and a bright area in the image to be detected according to a brightness relationship between adjacent image blocks, and determine whether the image to be detected is a backlight scene according to the dark area and the bright area.
- the dark area and the bright area in the image to be detected may be determined according to the brightness relationship between adjacent image blocks.
- the image block Lij+1 is a dark area, if the image block If the brightness of Lij+1 is greater than the second preset brightness threshold, the image block Lij+1 is a bright-dark transition region; if the brightness of the image block Lij+1 is greater than the brightness of the image block Lij, and the brightness of the image block Lij+1 is greater than For the third preset brightness threshold, the image block Lij+1 is a bright area. If the brightness of the image block Lij+1 is less than the third preset brightness threshold, the image block Lij+1 is bright. Dark transition zone.
- the second preset brightness threshold can avoid determining an image block with a large luminance value as a dark region
- the third preset luminance threshold can avoid determining an image block having a small luminance value as a bright region.
- the second preset brightness threshold and the third brightness threshold may be selected according to an empirical value, and the value range is larger and more flexible. Generally, the value of the second preset brightness threshold is less than the intermediate brightness value, and the value of the third preset brightness threshold is greater than the intermediate brightness value.
- the image to be detected is a backlight scene.
- the light-dark preset relationship satisfies any one of the following conditions or a combination of the plurality of conditions: the ratio of the total area of the dark area to the area of the image to be detected is greater than the preset ratio; the average value of the brightness value of the dark area is less than the preset average Value; The difference between the average value of the brightness value of the bright area and the average value of the brightness value of the dark area is greater than the preset difference.
- the backlight detection method provided by the embodiment of the present invention obtains the brightness value of each image block in the image to be detected; determines the brightness relationship between adjacent image blocks according to the brightness value of each image block; The brightness relationship determines the dark area and the bright area in the image to be detected, and determines whether the image to be detected is a backlight scene according to the dark area and the bright area, which can not only improve the accuracy of the backlight scene detection when the degree of backlighting of the subject is greatly changed. It also improves the accuracy of the backlight scene when the position, area, shape, and the like of the subject are greatly changed.
- the embodiment of the present invention will be described in detail below by taking a specific embodiment as an example. FIG.
- FIG. 2 is a schematic diagram of luminance values of each image block in Embodiment 2 of the backlight detection method of the present invention.
- the image to be detected is first divided into 11 rows and 20 columns, and 11 X 20 image blocks are shared, and the brightness values of the image blocks are determined.
- the brightness value of each image block is indicated.
- the luminance value difference values of any two adjacent image blocks are acquired. Specifically, it may be described in the direction of the row or in the direction of the column, respectively.
- the difference in luminance values of any two adjacent image blocks in each row in the direction of the row that is, in the order of each row of the image to be detected from the first image block to the last image block, that is, from left to In the order of right, along the order of each line of the image to be detected from the last image block to the first image block, the difference in luminance values of any two adjacent image blocks in each line is obtained, that is, from right to left. order.
- the left-to-right order is taken as an example, that is, the j direction indicated by the horizontal arrow shown in FIG. 2, and the luminance value difference of any two adjacent image blocks in the i-th row is obtained, that is, obtained.
- the difference between Lij+1 and Lij is taken as an example, that is, the j direction indicated by the horizontal arrow shown in FIG.
- the image block Lij may be closer to the first image block in the row or For the first image block in the row, the image block Lij+1 may be the first image block closer to the row or the first image block in the row.
- the difference in luminance values of any two adjacent image blocks in each column along the direction of the column that is, in the order of each column of the image to be detected from the first image block to the last image block, that is, from top to bottom
- the brightness value difference of any two adjacent image blocks in each column is obtained along the order of each column of the image to be detected from the last image block to the first image block, that is, in order from bottom to top
- the order of the top to bottom is taken as an example, that is, the i direction indicated by the vertical arrow shown in FIG. 2, and the difference in luminance values of any two adjacent image blocks in the jth column is obtained, that is, Obtain the difference between Li+lj and Lij.
- determining, according to the magnitude relationship between the difference between the brightness value of any two adjacent image blocks in each row of the image to be detected and the first preset brightness threshold determining two adjacent two images in each row of the image to be detected. Determining the relationship between the luminance values of the adjacent two image blocks in each column of the image to be detected and the first preset brightness threshold, determining any adjacent ones in each column of the image to be detected.
- the first preset brightness threshold is an average value of the absolute values of the luminance value differences of all the two adjacent image blocks in the image to be detected. It can be understood by those skilled in the art that any two adjacent nodes are determined according to the row and the column. The manner of brightness relationship between image blocks is similar.
- the present embodiment uses the behavior example, and, in the direction of the line, the order from the first image block to the last image block along each line of the image to be detected.
- the manner of determining the brightness relationship between any two adjacent image blocks in the order from the last image block to the first image block along each line of the image to be detected is similar, and therefore, the embodiment of the present invention is hereby
- the order in which each line of the image is detected from the first image block to the last image block is taken as an example to determine the brightness relationship between any two adjacent image blocks.
- the first preset brightness threshold is equal to ⁇ £
- the first preset brightness threshold is equal to 34.
- the luminance relationship between the image block Lij+1 and the image block Lij is determined according to the difference between the difference between the image block Lij+1 and the image block Lij and the size of the AL. It can be understood by those skilled in the art that the values of the first preset brightness thresholds of different images to be detected are different.
- the dark area and the bright area in the image to be detected are determined according to the brightness relationship between adjacent image blocks, and the order of the lines is also taken as an example here.
- the order of the columns similar to the rows, this embodiment will not be described herein.
- an image block of the first nine columns of the fourth row in FIG. 2 is taken as an example.
- Table 1 shows the values of the corresponding Lij and Lij+1-Lij.
- Ldark can take 120, which can avoid determining the image block with small brightness value as the third preset brightness threshold of the bright area.
- Llight can take 130.
- the dark area and the bright area may be identified, and for the bright and dark transition area, or the image block of the bright and dark area cannot be determined, no identification is performed.
- the dark area and bright area identification process of the image to be detected the dark area is identified as a white dot, and the bright area is identified as a black fork.
- L42-L41 -68 ⁇ -34, and L42 is smaller than Ldark, indicating that L42 is a dark area, and image block L42 is identified.
- FIG. 3A is a schematic diagram of a bright and dark area along the row direction according to Embodiment 2 of the backlight detection method of the present invention.
- L46-L45 5 ⁇ 34, then the brightness of L46 and L45 is the same, L46 is the dark area;
- FIG. 3B is a second schematic diagram of a bright and dark region along the row direction according to Embodiment 2 of the backlight detection method of the present invention.
- Figure 3B is in the row direction opposite to the row direction of Figure 3A.
- FIG. 3C is a schematic diagram of a bright and dark area along the column direction according to the second embodiment of the backlight detection method of the present invention, that is, in the order from the top to the bottom of the column.
- FIG. 3D is a second schematic diagram of the bright and dark regions along the column direction according to the second embodiment of the backlight detection method of the present invention, that is, the sequence from bottom to top along the column.
- the acquisition method of FIG. 3B to FIG. 3D is similar to that of FIG. 3A, and details are not described herein again.
- the merging of FIG. 3A to FIG. 3D is merged into FIG. 4, and the final dark area and the bright area of the image to be detected are obtained.
- FIG. 3C is a schematic diagram of a bright and dark area along the column direction according to the second embodiment of the backlight detection method of the present invention, that is, in the order from the top to the bottom of the column.
- FIG. 3D is a second schematic diagram of the bright and dark regions along the column direction according
- FIGS. 3A and 3B are first determined according to FIGS. 3A and 3B, and the dark area and the bright area of the image to be detected along the column direction are determined according to FIGS. 3C and 3D.
- the dark area and the bright area of the final image to be detected are determined according to the determination results of FIGS. 3A and 3B and the determination results of FIGS. 3C and 3D.
- any one of the image blocks in each row or column is determined to be bright if the order from the first image block to the last image block of each row or column and the order from the last image block to the first image block are For a region or a dark region, the image block is determined to be a bright region or a dark region; or, for each image block in each row or column, if the first image block to the last image block along each row or column
- the order of the sequence and the order of the last image block to the first image block is determined to be a bright area, and the other order is determined to be a dark area, and the image block is determined to be a bright-dark transition area; or, for each line or Any one of the image blocks in each column is determined to be dark if the order of the first image block to the last image block of each row or column and the order of the last image block to the first image block are dark.
- the image block is determined as a bright region or a dark region.
- the bright area and the dark area of the image to be detected are determined, and the light and dark relationship of all the image blocks can be comprehensively considered, and the bright area and the dark area of the detected image are corrected to improve the accuracy of backlight detection.
- Figure 4 obtained according to the above method is the final dark area and bright area of the image to be detected according to the embodiment of the present invention. Whether the image to be detected is a backlit scene can be determined according to the dark area and the bright area shown in FIG. When the dark area and the bright area in the image to be detected satisfy the preset relationship, it is determined that the image to be detected is a backlight scene.
- the light-dark preset relationship satisfies any one of the following conditions or a combination of the plurality of conditions: the ratio of the total area of the dark area to the area of the image to be detected is greater than the preset ratio; the average value of the brightness value of the dark area is less than the preset average Value; the average value of the brightness value of the bright area and the dark area The difference in the average value of the luminance values is greater than the preset difference.
- the average gradient of the pixel included in the dark region in the image to be detected is greater than the preset gradient threshold, it is determined that the image to be detected is a backlight scene, and the pixel included in the dark region in the image to be detected If the average gradient is less than the preset gradient threshold, it is determined that the subject is a black object, and the image to be detected is a non-backlit scene.
- the specific value of the preset gradient threshold can be set according to experience. In this embodiment, the preset gradient threshold is set to 4, and the average gradient of the pixel points included in the dark region in FIG. 4 is 6.1.
- FIG. 5A is a schematic diagram 1 of a non-backlighting scene according to a second embodiment of the backlight detection method of the present invention
- FIG. 5B is a second schematic diagram of a non-backlighting scene according to a second embodiment of the backlight detection method of the present invention.
- the subject of the image to be detected is a black object
- the bright area and the dark area of the image to be detected are shown in FIG. 5B
- the average gradient of the pixel points included in the dark area in FIG. 5B is calculated as 0.
- the backlight detection method determines the dark region and the bright region in the image to be detected according to the brightness relationship between adjacent image blocks, and does not need to set an accurate threshold value for determining the dark region.
- FIG. 6 is a schematic structural view of a first embodiment of the backlight detecting device of the present invention.
- the backlight detecting device provided in this embodiment may be a terminal device such as a mobile phone, a camera, a video camera, a computer, or the like including an imaging lens.
- the image to be detected is obtained by the lens, and each module pair in the backlight detecting device shown in FIG. 6 provided by the embodiment of the present invention detects whether the image to be detected is a backlight scene.
- the backlight detection device provided by the embodiment of the present invention includes an obtaining module 601, a determining module 602, and a processing module 603.
- the obtaining module 601 is configured to obtain a brightness value of each image block in the image to be detected.
- the determining module 602 is configured to determine a brightness relationship between the adjacent image blocks according to the brightness values of the image blocks, and the processing module 603 is configured to determine the to-be-detected according to a brightness relationship between the adjacent image blocks.
- the image to be detected includes M rows and N columns of image blocks, and M and N are both positive integers; the determining module 602 is specifically configured to: according to any adjacent two of each row of the image to be detected.
- the determining module 602 is specifically configured to: if the difference in luminance values of the two adjacent image blocks is greater than the first preset brightness threshold, determine the two adjacent image blocks The brightness of one of the image blocks is greater than the brightness of the other image block; or, if the absolute value of the brightness value difference of the two adjacent image blocks is less than or equal to the first preset brightness threshold, The brightness of any two adjacent image blocks is the same.
- the first preset brightness threshold is an average value of absolute values of luminance value differences of all the two adjacent image blocks in the image to be detected.
- the processing module 603 is specifically configured to: if a brightness of one image block of the two adjacent image blocks is smaller than a brightness of another image block, and wherein a brightness value of the image block having a small brightness value is smaller than the first Two preset brightness thresholds are determined, wherein the image block in which the brightness is small is determined to be a dark area; if the brightness of one of the two adjacent image blocks is smaller than the brightness of the other image block, and the image in which the brightness value is small If the brightness value of the block is greater than or equal to the second preset brightness threshold, determining that the image block having a small brightness is a light-dark transition region; If the brightness of one of the two adjacent image blocks is greater than the brightness of the other image block, and wherein the brightness value of the image block having the large brightness value is greater than the third predetermined brightness threshold, determining that the brightness is large The image block is a bright area; if the brightness of one of the two adjacent image blocks is greater than the brightness of the other image block, and the brightness value of the image
- the determining module 602 is further configured to: acquire, according to an order of the first image block to the last image block, each row of the image to be detected, obtain brightness values of any two adjacent image blocks in each row. a difference value, along the order of each line of the image to be detected from the last image block to the first image block, obtaining a luminance value difference value of any two adjacent image blocks in each row; along the image to be detected The order of the brightness values of any two adjacent image blocks in each column is obtained from the order of the first image block to the last image block, along each column of the image to be detected from the last image block to The order of the first image block is to obtain the difference in luminance values of any two adjacent image blocks in each column.
- the processing module 603 is further configured to: for each image block in each row or column, the order of the first image block to the last image block along each row or column and the last image along the last image
- the order of the block to the first image block is determined to be a bright area or a dark area, and then the image block is determined to be a bright area or a dark area; or, for each image block in each row or column, if each line is along each line Or the order of the first image block to the last image block of each column and the order of the last image block to the first image block are determined as a bright area, and the other order is determined to be a dark area, then the determination is made
- the image block is a bright-dark transition region; or, for each image block in each row or column, the order from the first image block to the last image block along each row or column and along the last image block
- One of the order to the first image block is determined to be a dark area or a bright area, and the other order is determined to be a light-dark
- the processing module 603 is specifically configured to: if the dark area and the bright area in the to-be-detected image meet the light-dark preset relationship, determine that the image to be detected is a backlight scene, and the light-dark pre- The set relationship satisfies any one of the following conditions or a combination of the following conditions: the ratio of the total area of the dark area to the area of the image to be detected is greater than a preset ratio; the average value of the dark area is smaller than the preset An average value; the average value of the brightness value of the bright area is larger than the average value of the brightness value of the dark area The preset difference.
- processing module 603 is further configured to: verify the backlighting scenario, if the average gradient of the pixel points included in the dark region in the image to be detected is greater than a preset gradient threshold, determine the to-be-detected The image is a backlit scene, and if the average gradient of the pixel points included in the dark region in the image to be detected is less than a preset gradient threshold, determining that the image to be detected is a non-backlight field
- FIG. 7 is a schematic structural view of the second implementation of the backlight detecting device of the present invention.
- the backlight detecting device provided in this embodiment may be a terminal device such as a mobile phone, a camera, a video camera, a computer, or the like including an imaging lens.
- the image to be detected can be obtained by the lens, and the components in the backlight detection device shown in FIG. 7 provided by the embodiment of the present invention are used to detect whether the image to be detected is a backlight scene. As shown in FIG.
- the backlight detecting apparatus 70 includes a processor 701 and a memory 702.
- the backlight detecting device 70 further includes a lens 703, and the lens 703 can be connected to the processor 701.
- the processor 701 can obtain an image to be detected through the lens 703, divide the image to be detected into image blocks, and calculate a brightness value of each image block.
- the memory 702 stores execution instructions.
- the processor 701 communicates with the memory 702, and the processor 701 calls an execution instruction in the memory 702 for performing the following operations - acquiring each image block in the image to be detected.
- a brightness value determining, according to the brightness value of each image block, a brightness relationship between adjacent image blocks; determining a dark area in the image to be detected according to a brightness relationship between adjacent image blocks Brightening the area, and determining, according to the dark area and the bright area, whether the image to be detected is a backlight scene.
- the image to be detected includes M rows and N columns of image blocks, and M and N are positive integers; and determining, according to the brightness values of the image blocks, brightness relationships between adjacent image blocks, Determining - determining, according to a magnitude relationship between a difference in luminance value of any two adjacent image blocks in each row of the image to be detected and a first preset brightness threshold, any adjacent one of each row of the image to be detected a brightness relationship between the two image blocks; and/or, according to the magnitude relationship between the difference between the brightness values of any two adjacent image blocks in each column of the image to be detected and the first preset brightness threshold, Describe the brightness between any two adjacent image blocks in each column of the detected image Department.
- determining, according to a magnitude relationship between a difference value of the luminance values of the two adjacent image blocks and a first preset brightness threshold determining a brightness relationship between the two adjacent image blocks, including And if the luminance value difference of the two adjacent image blocks is greater than the first preset brightness threshold, the brightness of one of the two adjacent image blocks is greater than the other image block. Or the brightness of the adjacent two image blocks is the same if the absolute value of the luminance value difference of the two adjacent image blocks is less than or equal to the first preset brightness threshold.
- the first preset brightness threshold is an average value of absolute values of luminance value differences of all the two adjacent image blocks in the image to be detected.
- the determining the dark area and the bright area in the image to be detected according to the brightness relationship between the adjacent image blocks includes: if the brightness of one of the two adjacent image blocks is If the brightness of the image block is smaller than the brightness of the other image block, and the brightness value of the image block having the small brightness value is smaller than the second predetermined brightness threshold, the image block with the small brightness is a dark area; if the image block is any adjacent two If the brightness of one image block is smaller than the brightness of another image block, and the brightness value of the image block having a small brightness value is greater than or equal to the second predetermined brightness threshold, the image block with a small brightness is a bright-dark transition region; The brightness of one of the two adjacent image blocks is greater than the brightness of the other image block, and wherein the brightness value of the image block having the large brightness value is greater than the third predetermined brightness threshold, wherein the image block with the large brightness is a bright area; if the brightness of one of the two adjacent image blocks is greater than the brightness of the other image block, and the brightness
- the method further includes: along the image to be detected The order of the brightness values of any two adjacent image blocks in each row is obtained from the order of the first image block to the last image block, along each line of the image to be detected from the last image block to the first The order of an image block, obtaining the difference in luminance values of any two adjacent image blocks in each row; Determining, according to a magnitude relationship between a difference in luminance value of any two adjacent image blocks in each column of the image to be detected and a first preset brightness threshold, determining any adjacent one of each column of the image to be detected Before the brightness relationship between the two image blocks, the method further includes: acquiring, according to the order of each column of the image to be detected from the first image block to the last image block, acquiring two adjacent image blocks in each column The luminance value difference is obtained by acquiring the luminance value difference value of any two adjacent image blocks in each column along the order of
- the determining the dark area and the bright area in the image to be detected according to the brightness relationship between adjacent image blocks further includes: for each image block in each row or column, if each edge The order of the first image block to the last image block of the row or each column and the order of the last image block to the first image block are determined to be a bright region or a dark region, and the image block is determined to be a bright region or Dark area; or, for each image block in each row or column, the order from the first image block to the last image block in each row or column and the last image block to the first image block One of the sequences is determined to be a bright area, and the other order is determined to be a dark area, and the image block is determined to be a bright-dark transition area; or, for each image block in each row or column, if each line is along each line Or the order of the first image block to the last image block of each column and the order of the last image block to the first image block are determined as a dark area or a bright area, and the other order is
- determining, according to the dark area and the bright area, whether the image to be detected is a backlight scene including: if the dark area and the bright area in the image to be detected satisfy a light-dark preset relationship, determining The image to be detected is a backlight scene, and the light-dark preset relationship satisfies any one of the following conditions or a combination of the plurality of conditions: a ratio of a total area of the dark area to an area of the image to be detected is greater than a preset The ratio of the brightness value of the dark area is less than a preset average value; the difference between the average value of the brightness value of the bright area and the average value of the brightness value of the dark area is greater than a preset difference.
- the method further includes: verifying the backlight scene, if the pixel included in the dark area in the image to be detected If the average gradient of the point is greater than the preset gradient threshold, determining that the image to be detected is a backlight scene, if the dark area in the image to be detected The average gradient of the pixel points included in the domain is less than a preset gradient threshold, and then determining that the image to be detected is a non-backlight field
- the backlight detection device of this embodiment may be used to implement the technical solution of the foregoing method embodiment, and the implementation principle and the technical effect are similar, and details are not described herein again.
- the disclosed apparatus and method can be implemented in other ways.
- the device embodiments described above are only schematic.
- the division of the unit or module is only a logical function division.
- there may be another division manner for example, multiple units or modules may be used. Combined or can be integrated into another system, or some features can be ignored, or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be electrical, mechanical or otherwise.
- the modules described as separate components may or may not be physically separate.
- the components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network units.
- modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. It will be understood by those skilled in the art that all or part of the steps of implementing the above method embodiments may be performed by hardware associated with the program instructions.
- the aforementioned program can be stored in a computer readable storage medium. When the program is executed, the steps including the foregoing method embodiments are performed; and the foregoing storage medium includes: various media that can store program codes, such as wake up, wake up, disk or optical disk.
Abstract
Description
Claims
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015527788A JP5988119B2 (ja) | 2013-01-07 | 2013-12-28 | 逆光検出方法及びデバイス |
EP13870104.0A EP2849431B1 (en) | 2013-01-07 | 2013-12-28 | Method and apparatus for detecting backlight |
US14/566,020 US9390475B2 (en) | 2013-01-07 | 2014-12-10 | Backlight detection method and device |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310005069.9A CN103916603B (zh) | 2013-01-07 | 2013-01-07 | 逆光检测方法及设备 |
CN201310005069.9 | 2013-01-07 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US14/566,020 Continuation US9390475B2 (en) | 2013-01-07 | 2014-12-10 | Backlight detection method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2014106445A1 true WO2014106445A1 (zh) | 2014-07-10 |
Family
ID=51041961
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2013/090806 WO2014106445A1 (zh) | 2013-01-07 | 2013-12-28 | 逆光检测方法及设备 |
Country Status (5)
Country | Link |
---|---|
US (1) | US9390475B2 (zh) |
EP (1) | EP2849431B1 (zh) |
JP (1) | JP5988119B2 (zh) |
CN (1) | CN103916603B (zh) |
WO (1) | WO2014106445A1 (zh) |
Families Citing this family (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104700426B (zh) * | 2015-04-02 | 2017-11-03 | 厦门美图之家科技有限公司 | 一种判断图像是否偏暗或偏亮的方法和系统 |
CN105791709B (zh) * | 2015-12-29 | 2019-01-25 | 福建星网锐捷通讯股份有限公司 | 带有逆光补偿的自动曝光处理方法及装置 |
CN105467604B (zh) * | 2016-02-16 | 2018-01-12 | 京东方科技集团股份有限公司 | 一种3d显示装置及其驱动方法 |
CN105959773B (zh) * | 2016-04-29 | 2019-06-18 | 魔方天空科技(北京)有限公司 | 多媒体文件的处理方法和装置 |
CN105959585B (zh) * | 2016-05-12 | 2019-08-16 | 南昌黑鲨科技有限公司 | 多级逆光检测方法及装置 |
CN106067177B (zh) * | 2016-06-15 | 2020-06-26 | 深圳市万普拉斯科技有限公司 | Hdr场景侦测方法和装置 |
CN106125767B (zh) * | 2016-08-31 | 2020-03-17 | 北京小米移动软件有限公司 | 飞行器的控制方法、装置及飞行器 |
US10902244B2 (en) | 2017-03-27 | 2021-01-26 | Samsung Electronics Co., Ltd. | Apparatus and method for image processing |
CN107295270B (zh) * | 2017-07-31 | 2020-01-24 | 爱博康电子(深圳)有限公司 | 一种图像亮度值的确定方法、装置、终端和计算机可读存储介质 |
CN109788205B (zh) * | 2017-11-15 | 2021-03-09 | 浙江宇视科技有限公司 | 图像调整方法、装置及电子设备 |
CN108564537B (zh) * | 2017-12-29 | 2022-08-26 | 北京乐蜜科技有限责任公司 | 图像处理的方法、装置、电子设备及介质 |
CN109246399A (zh) * | 2018-08-17 | 2019-01-18 | 优视科技新加坡有限公司 | 一种识别逆光区域方法、装置和设备/终端/服务器 |
CN109543581A (zh) * | 2018-11-15 | 2019-03-29 | 北京旷视科技有限公司 | 图像处理方法、图像处理装置以及非易失性存储介质 |
CN110189312B (zh) * | 2019-05-24 | 2021-06-29 | 北京康夫子健康技术有限公司 | 眼底图像的亮度评估方法、装置、电子设备及存储介质 |
CN111142528B (zh) * | 2019-12-31 | 2023-10-24 | 天津职业技术师范大学(中国职业培训指导教师进修中心) | 车用危险场景感知方法、装置和系统 |
CN112261306B (zh) * | 2020-09-27 | 2021-10-08 | 厦门亿联网络技术股份有限公司 | 一种逆光判断方法、装置、设备及存储介质 |
CN112291548B (zh) * | 2020-10-28 | 2023-01-31 | Oppo广东移动通信有限公司 | 白平衡统计方法、装置、移动终端及存储介质 |
CN112526534B (zh) * | 2020-11-03 | 2024-03-08 | 上海炬佑智能科技有限公司 | ToF传感装置及其距离检测方法 |
CN112543286A (zh) * | 2020-11-27 | 2021-03-23 | 展讯通信(上海)有限公司 | 一种用于终端的图像生成方法及装置、存储介质、终端 |
CN112733827B (zh) * | 2020-12-29 | 2023-08-04 | 深圳市天视通视觉有限公司 | 一种车牌识别方法、装置、电子设备及存储介质 |
CN115086566B (zh) * | 2021-03-16 | 2024-03-29 | 广州视源电子科技股份有限公司 | 图片场景检测方法、装置 |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101008762A (zh) * | 2007-01-30 | 2007-08-01 | 北京中星微电子有限公司 | 一种逆光检测方法、逆光补偿终止检测方法及相应装置 |
CN102006422A (zh) * | 2009-09-01 | 2011-04-06 | 华晶科技股份有限公司 | 一种逆光拍摄方法 |
Family Cites Families (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3412174B2 (ja) * | 1992-05-21 | 2003-06-03 | 松下電器産業株式会社 | 自動露光制御装置 |
JP4057147B2 (ja) * | 1998-06-16 | 2008-03-05 | コニカミノルタビジネステクノロジーズ株式会社 | 逆光シーン判定方法、逆光シーン判定方法プログラムを記憶したコンピュータにより読み取り可能な記憶媒体及び逆光シーン判定機能を有する画像処理装置 |
JP3615462B2 (ja) * | 2000-05-12 | 2005-02-02 | 三洋電機株式会社 | 自動露光調節カメラ |
JP2002196389A (ja) * | 2000-12-26 | 2002-07-12 | Canon Inc | 測光装置およびカメラ |
US6853806B2 (en) * | 2002-09-13 | 2005-02-08 | Olympus Optical Co., Ltd. | Camera with an exposure control function |
TWI285047B (en) * | 2005-11-24 | 2007-08-01 | Sunplus Technology Co Ltd | Method of automatic exposure control and automatic exposure compensated apparatus |
JP2007166028A (ja) * | 2005-12-09 | 2007-06-28 | Matsushita Electric Ind Co Ltd | 露出量制御装置および露出量制御方法 |
JP5319078B2 (ja) * | 2006-07-07 | 2013-10-16 | オリンパスイメージング株式会社 | カメラ、カメラの画像処理方法、プログラム、記録媒体 |
CN101282425B (zh) * | 2008-04-30 | 2010-06-23 | 北京中星微电子有限公司 | 一种背光补偿的方法和装置 |
JP5157753B2 (ja) * | 2008-08-27 | 2013-03-06 | カシオ計算機株式会社 | 画像処理装置、画像処理方法、画像処理プログラム |
JP5138510B2 (ja) * | 2008-08-28 | 2013-02-06 | エイオーエフ イメージング テクノロジー リミテッド | 画像データ処理装置 |
TWI387332B (zh) * | 2009-08-26 | 2013-02-21 | Altek Corp | A method of backlighting |
CN102196182A (zh) * | 2010-03-09 | 2011-09-21 | 株式会社理光 | 逆光检测设备及逆光检测方法 |
-
2013
- 2013-01-07 CN CN201310005069.9A patent/CN103916603B/zh active Active
- 2013-12-28 JP JP2015527788A patent/JP5988119B2/ja active Active
- 2013-12-28 WO PCT/CN2013/090806 patent/WO2014106445A1/zh active Application Filing
- 2013-12-28 EP EP13870104.0A patent/EP2849431B1/en active Active
-
2014
- 2014-12-10 US US14/566,020 patent/US9390475B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101008762A (zh) * | 2007-01-30 | 2007-08-01 | 北京中星微电子有限公司 | 一种逆光检测方法、逆光补偿终止检测方法及相应装置 |
CN102006422A (zh) * | 2009-09-01 | 2011-04-06 | 华晶科技股份有限公司 | 一种逆光拍摄方法 |
Non-Patent Citations (1)
Title |
---|
See also references of EP2849431A4 * |
Also Published As
Publication number | Publication date |
---|---|
US9390475B2 (en) | 2016-07-12 |
EP2849431A4 (en) | 2015-08-19 |
JP5988119B2 (ja) | 2016-09-07 |
JP2015534301A (ja) | 2015-11-26 |
US20150093040A1 (en) | 2015-04-02 |
EP2849431A1 (en) | 2015-03-18 |
EP2849431B1 (en) | 2016-10-12 |
CN103916603A (zh) | 2014-07-09 |
CN103916603B (zh) | 2019-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2014106445A1 (zh) | 逆光检测方法及设备 | |
JP6615917B2 (ja) | 実時間ビデオエンハンスメント方法、端末及び非一時的コンピュータ可読記憶媒体 | |
KR102149187B1 (ko) | 전자 장치와, 그의 제어 방법 | |
US10620826B2 (en) | Object selection based on region of interest fusion | |
WO2017107700A1 (zh) | 一种实现图像配准的方法及终端 | |
WO2019100675A1 (zh) | 一种分区背光控制方法及其装置 | |
WO2018054054A1 (zh) | 一种人脸识别的方法、装置、移动终端及计算机存储介质 | |
CN105243371A (zh) | 一种人脸美颜程度的检测方法、系统及拍摄终端 | |
WO2019042419A1 (zh) | 图像跟踪点获取方法、设备及存储介质 | |
CN106981078B (zh) | 视线校正方法、装置、智能会议终端及存储介质 | |
US9666161B2 (en) | Method and system for replacing theme of a mobile terminal on the basis of a user's clothes color | |
CN106412458A (zh) | 一种图像处理方法和装置 | |
CN108009997B (zh) | 一种调整图像对比度的方法及装置 | |
US9613404B2 (en) | Image processing method, image processing apparatus and electronic device | |
US8693783B2 (en) | Processing method for image interpolation | |
WO2016197639A1 (zh) | 屏幕画面显示方法及装置 | |
US20220329729A1 (en) | Photographing method, storage medium and electronic device | |
CN111311481A (zh) | 背景虚化方法、装置、终端设备及存储介质 | |
US20150320311A1 (en) | Method and apparatus for iris recognition using natural light | |
EP3076386A1 (en) | Image display method and user terminal | |
CN108564537B (zh) | 图像处理的方法、装置、电子设备及介质 | |
WO2019196240A1 (zh) | 拍摄照片的方法、装置、计算机设备及存储介质 | |
CN105893578B (zh) | 一种照片选择的方法及装置 | |
CN111885371A (zh) | 图像遮挡检测方法、装置、电子设备和计算机可读介质 | |
US20150215602A1 (en) | Method for ajdusting stereo image and image processing device using the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 13870104 Country of ref document: EP Kind code of ref document: A1 |
|
REEP | Request for entry into the european phase |
Ref document number: 2013870104 Country of ref document: EP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2013870104 Country of ref document: EP |
|
ENP | Entry into the national phase |
Ref document number: 2015527788 Country of ref document: JP Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |