Patent ID: 8436914

Claim:
A method for determining a system gain in a digital video recorder to control changes in recorded image intensity, the method comprising: computing an average luma value for a current video frame sampled by an image sensor; computing a number of overexposed pixels and a number of underexposed pixels in the current video frame, wherein the number of overexposed pixels corresponds to a number of pixels in the current video frame having luma values equal to a maximum luma value capable of being sampled by the image sensor, wherein the number of underexposed pixels corresponds to a number of pixels in the current video frame having luma values equal to a minimum luma value capable of being sampled by the image sensor; computing a first value for an offset value based on the number of overexposed pixels; upon determining that the first value is greater than a dark limit, setting the dark limit as the offset value; upon determining that the first value is less than a bright limit, setting the bright limit as the offset value; computing a luma value for the current video frame based on the sum of the average luma value and the offset value; computing a luma correction value corresponding to a difference between the luma value for the current video frame and a target luma value; determining an adaptation step based on the luma correction value; computing a system gain associated with the current video frame by adding the adaptation step to a system gain associated with a previous video frame; computing at least one gain parameter based on the system gain associated with the current video frame; and configuring at least one element within the digital video recorder to operate according to the at least one gain parameter.