| CPC G06T 5/50 (2013.01) [G01S 17/894 (2020.01); G06T 5/77 (2024.01); G06T 7/521 (2017.01); G06T 7/55 (2017.01); H04N 23/72 (2023.01); G06T 2207/10028 (2013.01); G06T 2207/10144 (2013.01); G06T 2207/30168 (2013.01)] | 5 Claims |

|
1. A method for processing an image, being applied to a TOF (Time of Flight) shooting terminal, the method comprising:
acquiring long exposure time data and short exposure time data of a target object, and acquiring initial exposure time to complete the long exposure time data and the short exposure time data;
calculating a proportion of overexposed pixel points and a proportion of underexposed pixel points in the short exposure time data;
adjusting the initial exposure time according to a magnitude of the proportion of the overexposed pixel points and a magnitude of the proportion of the underexposed pixel points to obtain target exposure time; and
acquiring target long exposure time data and target short exposure time data according to the target exposure time, and replacing overexposed pixel points in the target long exposure time data with pixel points of the target short exposure time data,
wherein the adjusting the initial exposure time according the magnitude of the proportion of the overexposed pixel points and the magnitude of the proportion of the underexposed pixel points comprises:
when the proportion of the overexposed pixel points is greater than a first threshold, reducing the initial exposure time; or when the proportion of the overexposed pixel points is less than or equal to the first threshold and the proportion of the underexposed pixel points is greater than a second threshold, increasing the initial exposure time.
|