Patent attributes
Described herein is a method for enhancing image data that includes dividing an image into multiple regions. The method includes measuring variations in pixel intensity distribution of the image to determine high pixel intensity variations for identifying an intensity-changing region. The method includes calculating a histogram of intensity distribution of pixel intensity values for the intensity-changing region without calculating a histogram of intensity distribution of pixel intensity values for each region of the multiple regions. The method also includes determining a transformation function based on the intensity distribution for the intensity-changing region. The method includes applying the transformation function to modify an intensity for each pixel in the image to produce an enhanced image in real time. The method also includes detecting in the enhanced image a horizon for providing to an operator of a vehicle an indication of the horizon in the image on a display in the vehicle.