Photographing exposure method and apparatus for self-walking device
View Patent ↗The present disclosure provides a photographic exposure method for a self-moving device. The method includes: detecting, based on a preset rule, brightness information of a target region in an image; adjusting a exposure parameter in response to the detected brightness information not meeting a preset condition; and performing, based on the adjusted exposure parameter, exposure in a localized region during image acquisition, the localized region including at least the target region.
1 . A photographic exposure method for a self-moving device, comprising:
detecting, based on a preset rule, brightness information of a target region in an image, wherein detecting the brightness information of the target region comprises dividing the target region into sub-regions, obtaining brightness values of the respective sub-regions, and obtaining the brightness information by weight-averaging the brightness values of the respective sub-regions with corresponding weight values of the respective sub-regions, and wherein the target region comprises a reflective surface region and a space region, the space region is located in a middle of the target region, and the reflective surface region is located on left and right sides of the space region and/or below the space region;
adjusting an exposure parameter in response to the detected brightness information not meeting a preset condition; and
performing, based on the adjusted exposure parameter, exposure in a localized region during image acquisition, the localized region comprising at least the target region.
2 . The method of claim 1 , wherein adjusting the exposure parameter in response to the detected brightness information not meeting the preset condition, comprises:
comparing the brightness information with target brightness;
increasing the exposure parameter in response to the brightness information being less than the target brightness; and
decreasing the exposure parameter in response to the brightness information being greater than the target brightness.
3 . The method of claim 1 , wherein dividing the target region into the sub-regions and obtaining the brightness values of the respective sub-regions, comprises:
dividing the target region into the sub-regions, dividing each sub-region of the sub-regions into a plurality of image blocks, and obtaining average brightness values of the respective image blocks, respectively; and
obtaining the brightness values of the respective sub-regions by weight-averaging the average brightness values of the respective image blocks with corresponding weight values of the respective image blocks.
4 . The method of claim 1 , wherein a weight value of the space region is greater than a weight value of the reflective surface region.
5 . The method of claim 1 , wherein the exposure parameter comprises at least one of: exposure time and an exposure gain.
6 . A computing device, comprising:
one or more processors, and
a memory coupled to the one or more processors, the memory storing instructions that, when executed by the one or more processors, cause the one or more processors to:
detect, based on a preset rule, brightness information of a target region in an image, wherein the one or more processors are further caused to divide the target region into sub-regions, obtain brightness values of the respective sub-regions, and obtain the brightness information by weight-averaging the brightness values of the respective sub-regions with corresponding weight values of the respective sub-regions, and wherein the target region comprises a reflective surface region and a space region, the space region is located in a middle of the target region and the reflective surface region is located on left and right sides of the space region and/or below the space region;
adjust an exposure parameter in response to the detected brightness information not meeting a preset condition; and
perform, based on the adjusted exposure parameter, exposure in a localized region during image acquisition, the localized region comprising at least the target region.
7 . The device of claim 6 , wherein the memory storing instructions that, when executed by the one or more processors, cause the one or more processors to adjust the exposure parameter by:
comparing the brightness information with target brightness;
increasing the exposure parameter in response to the brightness information being less than the target brightness; and
decreasing the exposure parameter in response to the brightness information being greater than the target brightness.
8 . The device of claim 6 , wherein the memory storing instructions that, when executed by the one or more processors, cause the one or more processors to divide the target region into the sub-regions and obtain the brightness values of the respective sub-regions by:
dividing the target region into the sub-regions, dividing each sub-region of the sub-regions into a plurality of image blocks, and obtaining average brightness values of the respective image blocks, respectively; and
obtaining the brightness values of the respective sub-regions by weight-averaging the average brightness values of the respective image blocks with corresponding weight values of the respective image blocks.
9 . The device of claim 6 , wherein a weight value of the space region is greater than a weight value of the reflective surface region.
10 . The device of claim 6 , wherein the exposure parameter comprises at least one of: exposure time and an exposure gain.
11 . A non-transitory machine-readable storage medium, wherein the machine-readable storage medium stores executable instructions that, when executed, cause a machine to perform a photographic exposure method for a self-moving device, comprising:
detecting, based on a preset rule, brightness information of a target region in an image, wherein detecting the brightness information of the target region comprises dividing the target region into sub-regions, obtaining brightness values of the respective sub-regions, and obtaining the brightness information by weight-averaging the brightness values of the respective sub-regions with corresponding weight values of the respective sub-regions, and wherein the target region comprises a reflective surface region and a space region, the space region is located in a middle of the target region, and the reflective surface region is located on left and right sides of the space region and/or below the space region;
adjusting an exposure parameter in response to the detected brightness information not meeting a preset condition; and
performing, based on the adjusted exposure parameter, exposure in a localized region during image acquisition, the localized region comprising at least the target region.
12 . The storage medium of claim 11 , wherein adjusting the exposure parameter in response to the detected brightness information not meeting the preset condition, comprises:
comparing the brightness information with target brightness;
increasing the exposure parameter in response to the brightness information being less than the target brightness; and
decreasing the exposure parameter in response to the brightness information being greater than the target brightness.
13 . The storage medium of claim 11 , wherein dividing the target region into the sub-regions and obtaining the brightness values of the respective sub-regions, comprises:
dividing the target region into the sub-regions, dividing each sub-region of the sub-regions into a plurality of image blocks, and obtaining average brightness values of the respective image blocks, respectively; and
obtaining the brightness values of the respective sub-regions by weight-averaging the average brightness values of the respective image blocks with corresponding weight values of the respective image blocks.
14 . The storage medium of claim 11 , wherein a weight value of the space region is greater than a weight value of the reflective surface region.