[][src]Module opencv::photo

Computational Photography

This module includes photo processing algorithms

Inpainting

Denoising

HDR imaging

This section describes high dynamic range imaging algorithms namely tonemapping, exposure alignment, camera calibration with multiple exposures and exposure fusion.

Contrast Preserving Decolorization

Useful links:

http://www.cse.cuhk.edu.hk/leojia/projects/color2gray/index.html

Seamless Cloning

Useful links:

https://www.learnopencv.com/seamless-cloning-using-opencv-python-cpp

Non-Photorealistic Rendering

Useful links:

http://www.inf.ufrgs.br/~eslgastal/DomainTransform

https://www.learnopencv.com/non-photorealistic-rendering-using-opencv-python-c/

C API

Constants

INPAINT_NS

Use Navier-Stokes based method

INPAINT_TELEA

Use the algorithm proposed by Alexandru Telea Telea04

LDR_SIZE
MIXED_CLONE
MONOCHROME_TRANSFER
NORMAL_CLONE
NORMCONV_FILTER

Normalized Convolution Filtering

RECURS_FILTER

Recursive Filtering

Traits

AlignExposures

The base class for algorithms that align images of the same scene with different exposures

AlignMTB

This algorithm converts images to median threshold bitmaps (1 for pixels brighter than median luminance and 0 otherwise) and than aligns the resulting bitmaps using bit operations.

CalibrateCRF

The base class for camera response calibration algorithms.

CalibrateDebevec

Inverse camera response function is extracted for each brightness value by minimizing an objective function as linear system. Objective function is constructed using pixel values on the same position in all images, extra term is added to make the result smoother.

CalibrateRobertson

Inverse camera response function is extracted for each brightness value by minimizing an objective function as linear system. This algorithm uses all image pixels.

MergeDebevec

The resulting HDR image is calculated as weighted average of the exposures considering exposure values and camera response.

MergeExposures

The base class algorithms that can merge exposure sequence to a single image.

MergeMertens

Pixels are weighted using contrast, saturation and well-exposedness measures, than images are combined using laplacian pyramids.

MergeRobertson

The resulting HDR image is calculated as weighted average of the exposures considering exposure values and camera response.

Tonemap

Base class for tonemapping algorithms - tools that are used to map HDR image to 8-bit range.

TonemapDrago

Adaptive logarithmic mapping is a fast global tonemapping algorithm that scales the image in logarithmic domain.

TonemapMantiuk

This algorithm transforms image to contrast using gradients on all levels of gaussian pyramid, transforms contrast values to HVS response and scales the response. After this the image is reconstructed from new contrast values.

TonemapReinhard

This is a global tonemapping operator that models human visual system.

Functions

color_change

Given an original color image, two differently colored versions of this image can be mixed seamlessly.

create_align_mtb

Creates AlignMTB object

create_calibrate_debevec

Creates CalibrateDebevec object

create_calibrate_robertson

Creates CalibrateRobertson object

create_merge_debevec

Creates MergeDebevec object

create_merge_mertens

Creates MergeMertens object

create_merge_robertson

Creates MergeRobertson object

create_tonemap

Creates simple linear mapper with gamma correction

create_tonemap_drago

Creates TonemapDrago object

create_tonemap_mantiuk

Creates TonemapMantiuk object

create_tonemap_reinhard

Creates TonemapReinhard object

decolor

Transforms a color image to a grayscale image. It is a basic tool in digital printing, stylized black-and-white photograph rendering, and in many single channel image processing applications CL12 .

denoise_tvl1

Primal-dual algorithm is an algorithm for solving special types of variational problems (that is, finding a function to minimize some functional). As the image denoising, in particular, may be seen as the variational problem, primal-dual algorithm then can be used to perform denoising and this is exactly what is implemented.

detail_enhance

This filter enhances the details of a particular image.

edge_preserving_filter

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

fast_nl_means_denoising

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

fast_nl_means_denoising_colored

Modification of fastNlMeansDenoising function for colored images

fast_nl_means_denoising_colored_multi

Modification of fastNlMeansDenoisingMulti function for colored images sequences

fast_nl_means_denoising_multi

Modification of fastNlMeansDenoising function for images sequence where consecutive 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

fast_nl_means_denoising_multi_vec

Modification of fastNlMeansDenoising function for images sequence where consecutive 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

fast_nl_means_denoising_vec

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

illumination_change

Applying an appropriate non-linear transformation to the gradient field inside the selection and then integrating back with a Poisson solver, modifies locally the apparent illumination of an image.

inpaint

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

pencil_sketch

Pencil-like non-photorealistic line drawing

seamless_clone

Image editing tasks concern either global changes (color/intensity corrections, filters, deformations) or local changes concerned to a selection. Here we are interested in achieving local changes, ones that are restricted to a region manually selected (ROI), in a seamless and effortless manner. The extent of the changes ranges from slight distortions to complete replacement by novel content PM03 .

stylization

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.

texture_flattening

By retaining only the gradients at edge locations, before integrating with the Poisson solver, one washes out the texture of the selected region, giving its contents a flat aspect. Here Canny Edge %Detector is used.