A computer implemented method for contrast enhancement of an input image, the method comprising: determining if the input image is to receive local contrast enhancement; filtering a down-sampled image generated by down-sampling the luminance values of the input image with a low-pass filter using a bilateral filter; partitioning the down-sampled image into a set of sub-images; deriving a sub-image transform for at least one of the sub-images mapping pre-filtered luminance values of the sub-image to post-filtered luminance values of the sub-image; selecting at least one of sub-image transforms for a pixel of interest in the input image; generating an output transform from the selected sub-image transforms; applying the output transform to the pixel of interest in the input image; and wherein the determining if the input image is to receive local contrast enhancement comprises: applying the low-pass filter to a low-resolution version of the input image resulting in enhanced luminance values for pixels in the low-resolution image; partitioning the pixels of the filtered image into at least a first and second category based on luminance values of the pixels; computing characteristic darkness features of the filtered image using the categories of luminance values of the pixels; wherein computing darkness features comprises computing a ratio of number of pixels in one of the categories to the total number of pixels in the filtered image; and comparing the darkness features of the image to threshold values, wherein comparing the darkness features to threshold values comprises combining the comparisons into a Boolean expression which returns a true or false result as to whether or not the image is to receive local contrast enhancement; wherein computing features and comparing features includes computing redness features using red component values of the pixels of the image and comparing the redness features to threshold values wherein the comparisons are combined into the Boolean expression. determining if the input image is to receive local contrast enhancement; filtering a down-sampled image generated by down-sampling the luminance values of the input image with a low-pass filter using a bilateral filter; partitioning the down-sampled image into a set of sub-images; deriving a sub-image transform for at least one of the sub-images mapping pre-filtered luminance values of the sub-image to post-filtered luminance values of the sub-image; selecting at least one of sub-image transforms for a pixel of interest in the input image; generating an output transform from the selected sub-image transforms; applying the output transform to the pixel of interest in the input image; and wherein the determining if the input image is to receive local contrast enhancement comprises: applying the low-pass filter to a low-resolution version of the input image resulting in enhanced luminance values for pixels in the low-resolution image; partitioning the pixels of the filtered image into at least a first and second category based on luminance values of the pixels; computing characteristic darkness features of the filtered image using the categories of luminance values of the pixels; wherein computing darkness features comprises computing a ratio of number of pixels in one of the categories to the total number of pixels in the filtered image; and comparing the darkness features of the image to threshold values, wherein comparing the darkness features to threshold values comprises combining the comparisons into a Boolean expression which returns a true or false result as to whether or not the image is to receive local contrast enhancement; wherein computing features and comparing features includes computing redness features using red component values of the pixels of the image and comparing the redness features to threshold values wherein the comparisons are combined into the Boolean expression. applying the low-pass filter to a low-resolution version of the input image resulting in enhanced luminance values for pixels in the low-resolution image; partitioning the pixels of the filtered image into at least a first and second category based on luminance values of the pixels; computing characteristic darkness features of the filtered image using the categories of luminance values of the pixels; wherein computing darkness features comprises computing a ratio of number of pixels in one of the categories to the total number of pixels in the filtered image; and comparing the darkness features of the image to threshold values, wherein comparing the darkness features to threshold values comprises combining the comparisons into a Boolean expression which returns a true or false result as to whether or not the image is to receive local contrast enhancement; wherein computing features and comparing features includes computing redness features using red component values of the pixels of the image and comparing the redness features to threshold values wherein the comparisons are combined into the Boolean expression.