Non-Photorealistic Rendering#
Detailed Description#
Useful links:
http://www.inf.ufrgs.br/~eslgastal/DomainTransform
https://www.learnopencv.com/non-photorealistic-rendering-using-opencv-python-c/
Enumerations#
enum cv {
RECURS_FILTER = 1,
NORMCONV_FILTER = 2
}Edge preserving filters. View details
Enumeration Type Documentation#
enum#
#include <opencv2/photo.hpp>
Edge preserving filters.
Enumerator:
|
Recursive Filtering. |
|
Normalized Convolution Filtering. |
Function Documentation#
detailEnhance()#
void cv::detailEnhance(
InputArray src,
OutputArray dst,
float sigma_s = 10,
float sigma_r = 0.15f )
#include <opencv2/photo.hpp>
Python:
cv.detailEnhance(src[, dst[, sigma_s[, sigma_r]]]) -> dst
This filter enhances the details of a particular image.
Parameters
src— Input 8-bit 3-channel image.dst— Output image with the same size and type as src.sigma_s— Range between 0 to 200.sigma_r— Range between 0 to 1.
edgePreservingFilter()#
void cv::edgePreservingFilter(
InputArray src,
OutputArray dst,
int flags = 1,
float sigma_s = 60,
float sigma_r = 0.4f )
#include <opencv2/photo.hpp>
Python:
cv.edgePreservingFilter(src[, dst[, flags[, sigma_s[, sigma_r]]]]) -> dst
Filtering is the fundamental operation in image and video processing. Edge-preserving smoothing filters are used in many different applications [112] .
Parameters
src— Input 8-bit 3-channel image.dst— Output 8-bit 3-channel image.flags— Edge preserving filters: cv::RECURS_FILTER or cv::NORMCONV_FILTERsigma_s— Range between 0 to 200.sigma_r— Range between 0 to 1.
pencilSketch()#
void cv::pencilSketch(
InputArray src,
OutputArray dst1,
OutputArray dst2,
float sigma_s = 60,
float sigma_r = 0.07f,
float shade_factor = 0.02f )
#include <opencv2/photo.hpp>
Python:
cv.pencilSketch(src[, dst1[, dst2[, sigma_s[, sigma_r[, shade_factor]]]]]) -> dst1, dst2
Pencil-like non-photorealistic line drawing.
Parameters
src— Input 8-bit 3-channel image.dst1— Output 8-bit 1-channel image.dst2— Output image with the same size and type as src.sigma_s— Range between 0 to 200.sigma_r— Range between 0 to 1.shade_factor— Range between 0 to 0.1.
stylization()#
void cv::stylization(
InputArray src,
OutputArray dst,
float sigma_s = 60,
float sigma_r = 0.45f )
#include <opencv2/photo.hpp>
Python:
cv.stylization(src[, dst[, sigma_s[, sigma_r]]]) -> dst
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
src— Input 8-bit 3-channel image.dst— Output image with the same size and type as src.sigma_s— Range between 0 to 200.sigma_r— Range between 0 to 1.