Hi,
I'm implementing a laplacian mask image enhancement in Visual studio. I'm using a simple 3x3 mask of -1 -1 -1; -1 9 -1; -1 -1 -1 on some jpg; Applying the mask is easy. But I'm not sure what's the proper way to scale the output.
The input image has a very uniform histogram(high contrast). After applying the mask for edge enhancement, I ended up with most graylevel clustered slightly to the left of the center. Thus, linearly mapping the pixels back to the [0, 255] range result in an image with poor constrast.
Am I missing something here? What's the better way to remap the pixels?
Or am I suppose to use power-law transformation to spread out the histogram?
PS: power-law transformation is out = c * in^gamma. Is there a built-in function somewhere that can handle the in^gamma exponential(in is int[0-255], gamma is float [0-100])?