OpenCV  4.0.0-alpha
Open Source Computer Vision
Functions
Non-Photorealistic Rendering

Functions

void cv::detailEnhance (InputArray src, OutputArray dst, float sigma_s=10, float sigma_r=0.15f)
 This filter enhances the details of a particular image. More...
 
void cv::edgePreservingFilter (InputArray src, OutputArray dst, int flags=1, float sigma_s=60, float sigma_r=0.4f)
 Filtering is the fundamental operation in image and video processing. Edge-preserving smoothing filters are used in many different applications [69] . More...
 
void cv::pencilSketch (InputArray src, OutputArray dst1, OutputArray dst2, float sigma_s=60, float sigma_r=0.07f, float shade_factor=0.02f)
 Pencil-like non-photorealistic line drawing. More...
 
void cv::stylization (InputArray src, OutputArray dst, float sigma_s=60, float sigma_r=0.45f)
 Stylization aims to produce digital imagery with a wide variety of effects not focused on photorealism. Edge-aware filters are ideal for stylization, as they can abstract regions of low contrast while preserving, or enhancing, high-contrast features. More...
 

Detailed Description

Function Documentation

§ detailEnhance()

void cv::detailEnhance ( InputArray  src,
OutputArray  dst,
float  sigma_s = 10,
float  sigma_r = 0.15f 
)
Python:
dst=cv.detailEnhance(src[, dst[, sigma_s[, sigma_r]]])

This filter enhances the details of a particular image.

Parameters
srcInput 8-bit 3-channel image.
dstOutput image with the same size and type as src.
sigma_sRange between 0 to 200.
sigma_rRange between 0 to 1.
Examples:
samples/cpp/tutorial_code/photo/non_photorealistic_rendering/npr_demo.cpp.

§ edgePreservingFilter()

void cv::edgePreservingFilter ( InputArray  src,
OutputArray  dst,
int  flags = 1,
float  sigma_s = 60,
float  sigma_r = 0.4f 
)
Python:
dst=cv.edgePreservingFilter(src[, dst[, flags[, sigma_s[, sigma_r]]]])

Filtering is the fundamental operation in image and video processing. Edge-preserving smoothing filters are used in many different applications [69] .

Parameters
srcInput 8-bit 3-channel image.
dstOutput 8-bit 3-channel image.
flagsEdge preserving filters:
  • RECURS_FILTER = 1
  • NORMCONV_FILTER = 2
sigma_sRange between 0 to 200.
sigma_rRange between 0 to 1.
Examples:
samples/cpp/tutorial_code/photo/non_photorealistic_rendering/npr_demo.cpp.

§ pencilSketch()

void cv::pencilSketch ( InputArray  src,
OutputArray  dst1,
OutputArray  dst2,
float  sigma_s = 60,
float  sigma_r = 0.07f,
float  shade_factor = 0.02f 
)
Python:
dst1, dst2=cv.pencilSketch(src[, dst1[, dst2[, sigma_s[, sigma_r[, shade_factor]]]]])

Pencil-like non-photorealistic line drawing.

Parameters
srcInput 8-bit 3-channel image.
dst1Output 8-bit 1-channel image.
dst2Output image with the same size and type as src.
sigma_sRange between 0 to 200.
sigma_rRange between 0 to 1.
shade_factorRange between 0 to 0.1.
Examples:
samples/cpp/tutorial_code/photo/non_photorealistic_rendering/npr_demo.cpp.

§ stylization()

void cv::stylization ( InputArray  src,
OutputArray  dst,
float  sigma_s = 60,
float  sigma_r = 0.45f 
)
Python:
dst=cv.stylization(src[, dst[, sigma_s[, sigma_r]]])

Stylization aims to produce digital imagery with a wide variety of effects not focused on photorealism. Edge-aware filters are ideal for stylization, as they can abstract regions of low contrast while preserving, or enhancing, high-contrast features.

Parameters
srcInput 8-bit 3-channel image.
dstOutput image with the same size and type as src.
sigma_sRange between 0 to 200.
sigma_rRange between 0 to 1.
Examples:
samples/cpp/tutorial_code/photo/non_photorealistic_rendering/npr_demo.cpp.