I want to use unsharp mask on a 16 Bit Image. The Image has 640 x 480 Pixel and is saved in a numpy array. In the first Step i blur the Image withe a Gaussian filter (three different Methods). After this i create a Mask by subtract the blur Image form the Original. in The last step i add the Mask multiplied by wightfaktor to the Original Image. But it don´t really works.
Here is the Python code:
Gaussian1 = ndimage.filters.gaussian_filter(Image,sigma=10.0)
Gaussian2 = filters.gaussian_filter(Image,sigma=10.0)
Gaussian3 = cv2.GaussianBlur(Image,(9,9),sigmaX=10.0)
Mask1 = Image - Gaussian1
UnsharpImage = Image + (WightFaktor*Mask1)
May Someone help me?
To get an unsharp image using
OpenCV
you need to use the addWeighted function as follows:Giving the following kind of result: