IPSDK 4.1.0.2
IPSDK : Image Processing Software Development Kit
Unsharp Mask 3d
imageunsharpMask3dImg (inImg3d,inBlurWeight,inStdDev)
imageunsharpMask3dImg (inImg3d,inBlurWeight,inStdDev,inOptSmoothingGaussianCoverage)

Detailed Description

unsharp mask filtering of input 3d image

Unsharp mask filter is an image sharpening filter which uses a blurred (so unsharped) image to create a mask of the original image. This unsharp mask is then combined with original image to enhance high frequencies (edges) of input image. An undesirable side effect of this filter is an increase of noise in output image.

Given a gaussian smoothing operation on an input image $InImg$ using standard deviation $\sigma=InStdDev$ :

\[ G_{\sigma}(InImg[x, y, z]) = \sum_{o_z=-\dfrac{n_z}{2}}^{\dfrac{n_z}{2}}{\sum_{o_y=-\dfrac{n_y}{2}}^{\dfrac{n_y}{2}}{\sum_{o_x=-\dfrac{n_x}{2}}^{\dfrac{n_x}{2}}{InImg3d[x+o_x, y+o_y, z+o_z] \times GaussKnl^{\sigma}_{XYZ}[o_x, o_y, o_z]}}} \]

(see Gaussian Smoothing 3d for more informations)

Unsharp mask filtering of input image with blur weight $w=InBlurWeight \in ]0;1]$ is given by :

\[ OutImg = \dfrac{w+1}{2w}InImg + \dfrac{w-1}{2w}G_{\sigma}(InImg) \]

See Unsharp Mask 2d for an illustration of unsharp mask on a 2d image

See also
http://en.wikipedia.org/wiki/Unsharp_masking

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLFiltering as filter

Code Example

# opening of input images
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# unsharp mask 3d computation
outImg = filter.unsharpMask3dImg(inImg, 0.7, 1.0)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLFiltering/Processor/UnsharpMask3dImg/UnsharpMask3dImg.h>

Code Example

// opening input image
ImagePtr pInImg = loadTiffImageFile(inputImgPath, eTiffDirectoryMode::eTDM_Volume);
// compute unsharp mask filter on input image
ImagePtr pOutImg1 = unsharpMask3dImg(pInImg, 0.7f, 1.0f);