Image enhancement using a joint algorithm of white balancing and contrast enhancement