Image processing apparatus, image processing method, and storage medium
According to embodiments of the present disclosure, an image processing apparatus for processing image data captured by an image sensor configured to set exposure area by area includes a calculation unit configured to calculate an exposure value of each of the areas, and a correction unit configured to, in a case where the exposure value of each of the areas does not fall within a range based on a reference exposure value, correct the exposure value of each of the areas so that the exposure value approaches an upper limit or lower limit of the range.
1 . An image processing apparatus for processing image data captured by an image sensor configured to set exposure area by area, the image processing apparatus comprising:
one or more processors; and
at least one memory storing executable instructions, which when executed by the one or more processors, cause the image processing apparatus to perform operations comprising:
calculating an exposure value of each of the areas; and
in a case where the exposure value of each of the areas does not fall within a range based on a reference exposure value, correcting the exposure value of each of the areas so that the exposure value approaches an upper limit or lower limit of the range,
wherein the reference exposure value is an average of the exposure values of areas adjoining an area of interest in a direction in a previous frame, an absolute value of a second order difference of the exposure values of the areas in the direction being minimum.
2 . The image processing apparatus according to claim 1 ,
wherein the upper limit of the range is calculated based on the reference exposure value and an upper limit allowable width, and
wherein the lower limit of the range is calculated based on the reference exposure value and a lower limit allowable width.
3 . The image processing apparatus according to claim 1 , wherein an upper limit of an amount of correction made to the exposure value of each of the areas by the correcting is a preset correction upper limit value.
4 . The image processing apparatus according to claim 1 , wherein the reference exposure value is an average of the exposure values of a plurality of areas in a previous frame.
5 . The image processing apparatus according to claim 1 , wherein the reference exposure value is an average of the exposure values of areas adjoining the area of interest in the previous frame.
6 . The image processing apparatus according to claim 1 , wherein the reference exposure value is an average of the exposure values of a plurality of previous frames.
7 . The image processing apparatus according to claim 6 , wherein the number of previous frames is at least two.
8 . The image processing apparatus according to claim 1 ,
wherein the correcting includes:
calculating the reference exposure value using respective different methods, and
correcting the exposure value of each of the areas.
9 . An image processing method for processing image data captured by an image sensor configured to set exposure area by area, the image processing method comprising:
calculating an exposure value of each of the areas; and
in a case where the exposure value of each of the areas does not fall within a range based on a reference exposure value, correcting the exposure value of each of the areas so that the exposure value approaches an upper limit or lower limit of the range,
wherein the reference exposure value is an average of the exposure values of areas adjoining an area of interest in a direction in a previous frame, an absolute value of a second order difference of the exposure values of the areas in the direction being minimum.
10 . A non-transitory computer-readable storage medium storing a program causing an image processing apparatus for processing image data captured by an image sensor configured to set exposure area by area to execute an image processing method, the image processing method comprising:
calculating an exposure value of each of the areas; and
in a case where the exposure value of each of the areas does not fall within a range based on a reference exposure value, correcting the exposure value of each of the areas so that the exposure value approaches an upper limit or lower limit of the range,
wherein the reference exposure value is an average of the exposure values of areas adjoining an area of interest in a direction in a previous frame, an absolute value of a second order difference of the exposure values of the areas in the direction being minimum.