1. A method comprising: determining a histogram of input intensity values for pixels in image sensor data, wherein the image sensor data includes a video stream having a plurality of images; determining, by a processor, whether the histogram is bimodal, wherein when the histogram is determined to be bimodal with two modes, the method further comprising: determining a breakpoint between the two modes such that the breakpoint is a low-pass filtering of a plurality of breakpoints corresponding to the plurality of images, wherein the histogram includes a first distribution of the input intensity values below the breakpoint and a second distribution of the input intensity values above the breakpoint; generating output intensity values, corresponding to and based on the input intensity values, such that: a third distribution of the output intensity values, corresponding to the input intensity values below the breakpoint, is compressed relative to the first distribution, and a fourth distribution of the output intensity values, corresponding to the input intensity values above the breakpoint, is stretched relative to the second distribution; and generating an output image based on the output intensity values.