OpenCV 2.4.5

org.opencv.photo
Class Photo

java.lang.Object
  extended by org.opencv.photo.Photo

public class Photo
extends java.lang.Object


Field Summary
static int INPAINT_NS
           
static int INPAINT_TELEA
           
 
Constructor Summary
Photo()
           
 
Method Summary
static void fastNlMeansDenoising(Mat src, Mat dst)
          Perform image denoising using Non-local Means Denoising algorithm http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/ with several computational optimizations.
static void fastNlMeansDenoising(Mat src, Mat dst, float h, int templateWindowSize, int searchWindowSize)
          Perform image denoising using Non-local Means Denoising algorithm http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/ with several computational optimizations.
static void fastNlMeansDenoisingColored(Mat src, Mat dst)
          Modification of fastNlMeansDenoising function for colored images
static void fastNlMeansDenoisingColored(Mat src, Mat dst, float h, float hColor, int templateWindowSize, int searchWindowSize)
          Modification of fastNlMeansDenoising function for colored images
static void fastNlMeansDenoisingColoredMulti(java.util.List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize)
          Modification of fastNlMeansDenoisingMulti function for colored images sequences
static void fastNlMeansDenoisingColoredMulti(java.util.List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, float h, float hColor, int templateWindowSize, int searchWindowSize)
          Modification of fastNlMeansDenoisingMulti function for colored images sequences
static void fastNlMeansDenoisingMulti(java.util.List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize)
          Modification of fastNlMeansDenoising function for images sequence where consequtive images have been captured in small period of time.
static void fastNlMeansDenoisingMulti(java.util.List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, float h, int templateWindowSize, int searchWindowSize)
          Modification of fastNlMeansDenoising function for images sequence where consequtive images have been captured in small period of time.
static void inpaint(Mat src, Mat inpaintMask, Mat dst, double inpaintRadius, int flags)
          Restores the selected region in an image using the region neighborhood.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPAINT_NS

public static final int INPAINT_NS
See Also:
Constant Field Values

INPAINT_TELEA

public static final int INPAINT_TELEA
See Also:
Constant Field Values
Constructor Detail

Photo

public Photo()
Method Detail

fastNlMeansDenoising

public static void fastNlMeansDenoising(Mat src,
                                        Mat dst)

Perform image denoising using Non-local Means Denoising algorithm http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/ with several computational optimizations. Noise expected to be a gaussian white noise

This function expected to be applied to grayscale images. For colored images look at fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting image to CIELAB colorspace and then separately denoise L and AB components with different h parameter.

Parameters:
src - Input 8-bit 1-channel, 2-channel or 3-channel image.
dst - Output image with the same size and type as src.
See Also:
org.opencv.photo.Photo.fastNlMeansDenoising

fastNlMeansDenoising

public static void fastNlMeansDenoising(Mat src,
                                        Mat dst,
                                        float h,
                                        int templateWindowSize,
                                        int searchWindowSize)

Perform image denoising using Non-local Means Denoising algorithm http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/ with several computational optimizations. Noise expected to be a gaussian white noise

This function expected to be applied to grayscale images. For colored images look at fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting image to CIELAB colorspace and then separately denoise L and AB components with different h parameter.

Parameters:
src - Input 8-bit 1-channel, 2-channel or 3-channel image.
dst - Output image with the same size and type as src.
h - Parameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise
templateWindowSize - Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels
searchWindowSize - Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels
See Also:
org.opencv.photo.Photo.fastNlMeansDenoising

fastNlMeansDenoisingColored

public static void fastNlMeansDenoisingColored(Mat src,
                                               Mat dst)

Modification of fastNlMeansDenoising function for colored images

The function converts image to CIELAB colorspace and then separately denoise L and AB components with given h parameters using fastNlMeansDenoising function.

Parameters:
src - Input 8-bit 3-channel image.
dst - Output image with the same size and type as src.
See Also:
org.opencv.photo.Photo.fastNlMeansDenoisingColored

fastNlMeansDenoisingColored

public static void fastNlMeansDenoisingColored(Mat src,
                                               Mat dst,
                                               float h,
                                               float hColor,
                                               int templateWindowSize,
                                               int searchWindowSize)

Modification of fastNlMeansDenoising function for colored images

The function converts image to CIELAB colorspace and then separately denoise L and AB components with given h parameters using fastNlMeansDenoising function.

Parameters:
src - Input 8-bit 3-channel image.
dst - Output image with the same size and type as src.
h - Parameter regulating filter strength for luminance component. Bigger h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise
hColor - a hColor
templateWindowSize - Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels
searchWindowSize - Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels
See Also:
org.opencv.photo.Photo.fastNlMeansDenoisingColored

fastNlMeansDenoisingColoredMulti

public static void fastNlMeansDenoisingColoredMulti(java.util.List<Mat> srcImgs,
                                                    Mat dst,
                                                    int imgToDenoiseIndex,
                                                    int temporalWindowSize)

Modification of fastNlMeansDenoisingMulti function for colored images sequences

The function converts images to CIELAB colorspace and then separately denoise L and AB components with given h parameters using fastNlMeansDenoisingMulti function.

Parameters:
srcImgs - Input 8-bit 3-channel images sequence. All images should have the same type and size.
dst - Output image with the same size and type as srcImgs images.
imgToDenoiseIndex - Target image to denoise index in srcImgs sequence
temporalWindowSize - Number of surrounding images to use for target image denoising. Should be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise srcImgs[imgToDenoiseIndex] image.
See Also:
org.opencv.photo.Photo.fastNlMeansDenoisingColoredMulti

fastNlMeansDenoisingColoredMulti

public static void fastNlMeansDenoisingColoredMulti(java.util.List<Mat> srcImgs,
                                                    Mat dst,
                                                    int imgToDenoiseIndex,
                                                    int temporalWindowSize,
                                                    float h,
                                                    float hColor,
                                                    int templateWindowSize,
                                                    int searchWindowSize)

Modification of fastNlMeansDenoisingMulti function for colored images sequences

The function converts images to CIELAB colorspace and then separately denoise L and AB components with given h parameters using fastNlMeansDenoisingMulti function.

Parameters:
srcImgs - Input 8-bit 3-channel images sequence. All images should have the same type and size.
dst - Output image with the same size and type as srcImgs images.
imgToDenoiseIndex - Target image to denoise index in srcImgs sequence
temporalWindowSize - Number of surrounding images to use for target image denoising. Should be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise srcImgs[imgToDenoiseIndex] image.
h - Parameter regulating filter strength for luminance component. Bigger h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise.
hColor - a hColor
templateWindowSize - Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels
searchWindowSize - Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels
See Also:
org.opencv.photo.Photo.fastNlMeansDenoisingColoredMulti

fastNlMeansDenoisingMulti

public static void fastNlMeansDenoisingMulti(java.util.List<Mat> srcImgs,
                                             Mat dst,
                                             int imgToDenoiseIndex,
                                             int temporalWindowSize)

Modification of fastNlMeansDenoising function for images sequence where consequtive images have been captured in small period of time. For example video. This version of the function is for grayscale images or for manual manipulation with colorspaces. For more details see http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394

Parameters:
srcImgs - Input 8-bit 1-channel, 2-channel or 3-channel images sequence. All images should have the same type and size.
dst - Output image with the same size and type as srcImgs images.
imgToDenoiseIndex - Target image to denoise index in srcImgs sequence
temporalWindowSize - Number of surrounding images to use for target image denoising. Should be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise srcImgs[imgToDenoiseIndex] image.
See Also:
org.opencv.photo.Photo.fastNlMeansDenoisingMulti

fastNlMeansDenoisingMulti

public static void fastNlMeansDenoisingMulti(java.util.List<Mat> srcImgs,
                                             Mat dst,
                                             int imgToDenoiseIndex,
                                             int temporalWindowSize,
                                             float h,
                                             int templateWindowSize,
                                             int searchWindowSize)

Modification of fastNlMeansDenoising function for images sequence where consequtive images have been captured in small period of time. For example video. This version of the function is for grayscale images or for manual manipulation with colorspaces. For more details see http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394

Parameters:
srcImgs - Input 8-bit 1-channel, 2-channel or 3-channel images sequence. All images should have the same type and size.
dst - Output image with the same size and type as srcImgs images.
imgToDenoiseIndex - Target image to denoise index in srcImgs sequence
temporalWindowSize - Number of surrounding images to use for target image denoising. Should be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise srcImgs[imgToDenoiseIndex] image.
h - Parameter regulating filter strength for luminance component. Bigger h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise
templateWindowSize - Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels
searchWindowSize - Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels
See Also:
org.opencv.photo.Photo.fastNlMeansDenoisingMulti

inpaint

public static void inpaint(Mat src,
                           Mat inpaintMask,
                           Mat dst,
                           double inpaintRadius,
                           int flags)

Restores the selected region in an image using the region neighborhood.

The function reconstructs the selected image area from the pixel near the area boundary. The function may be used to remove dust and scratches from a scanned photo, or to remove undesirable objects from still images or video. See http://en.wikipedia.org/wiki/Inpainting for more details.

Parameters:
src - Input 8-bit 1-channel or 3-channel image.
inpaintMask - Inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that needs to be inpainted.
dst - Output image with the same size and type as src.
inpaintRadius - Radius of a circular neighborhood of each point inpainted that is considered by the algorithm.
flags - Inpainting method that could be one of the following:
  • INPAINT_NS Navier-Stokes based method.
  • INPAINT_TELEA Method by Alexandru Telea [Telea04].
See Also:
org.opencv.photo.Photo.inpaint

OpenCV 2.4.5 Documentation