OpenCV: Computational Photography

| OpenCV 3.4.2 Open Source Computer Vision

Modules | Enumerations | Functions
Computational Photography

## Modules
| Denoising
| HDR imaging
| Seamless Cloning
| Non-Photorealistic Rendering
| C API

## Enumerations
enum | { cv::INPAINT_NS = 0, cv::INPAINT_TELEA = 1 }
| the inpainting algorithm More...
enum | { cv::NORMAL_CLONE = 1, cv::MIXED_CLONE = 2, cv::MONOCHROME_TRANSFER = 3 }
enum | { cv::RECURS_FILTER = 1, cv::NORMCONV_FILTER = 2 }

## Functions
void | cv::decolor (InputArray src, OutputArray grayscale, OutputArray color_boost)
| 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] . More...
void | cv::inpaint (InputArray src, InputArray inpaintMask, OutputArray dst, double inpaintRadius, int flags)
| Restores the selected region in an image using the region neighborhood. More...

## Detailed Description

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

the inpainting algorithm

Enumerator
INPAINT_NS |
INPAINT_TELEA |

## ◆ anonymous enum

anonymous enum

Enumerator
NORMAL_CLONE |
MIXED_CLONE |
MONOCHROME_TRANSFER |

## ◆ anonymous enum

anonymous enum

Enumerator
RECURS_FILTER |
NORMCONV_FILTER |

## Function Documentation

## ◆ decolor()

void cv::decolor | ( | InputArray | src,
|  | OutputArray | grayscale,
|  | OutputArray | color_boost
| ) |  |

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] .

Parameters

  src | Input 8-bit 3-channel image.
  grayscale | Output 8-bit 1-channel image.
  color_boost | Output 8-bit 3-channel image.

This function is to be applied on color images.

## ◆ inpaint()

void cv::inpaint | ( | InputArray | src,
|  | InputArray | inpaintMask,
|  | OutputArray | dst,
|  | double | inpaintRadius,
|  | int | flags
| ) |  |

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

Parameters

  src | Input 8-bit, 16-bit unsigned or 32-bit float 1-channel or 8-bit 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 [Navier01] INPAINT_TELEA Method by Alexandru Telea [Telea04] .

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.

Note
  - An example using the inpainting technique can be found at opencv_source_code/samples/cpp/inpaint.cpp
    - (Python) An example using the inpainting technique can be found at opencv_source_code/samples/python/inpaint.py