Open Source Computer Vision Library https://opencv.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.6 KiB

Inpainting
==========
.. highlight:: cpp
inpaint
-----------
Restores the selected region in an image using the region neighborhood.
.. ocv:function:: void inpaint( InputArray src, InputArray inpaintMask, OutputArray dst, double inpaintRadius, int flags )
.. ocv:pyfunction:: cv2.inpaint(src, inpaintMask, inpaintRadius, flags[, dst]) -> dst
.. ocv:cfunction:: void cvInpaint( const CvArr* src, const CvArr* inpaint_mask, CvArr* dst, double inpaintRange, int flags )
:param src: Input 8-bit 1-channel or 3-channel image.
:param inpaintMask: Inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that needs to be inpainted.
:param dst: Output image with the same size and type as ``src`` .
:param inpaintRadius: Radius of a circular neighborhood of each point inpainted that is considered by the algorithm.
:param flags: Inpainting method that could be one of the following:
* **INPAINT_NS** Navier-Stokes based method.
* **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.
.. Sample code::
* : An example using the inpainting technique can be found at opencv_source_code/samples/cpp/inpaint.cpp
Merge remote-tracking branch 'origin/2.4' Conflicts: 3rdparty/ffmpeg/ffmpeg_version.cmake cmake/OpenCVFindLibsGrfmt.cmake cmake/templates/cvconfig.h.cmake modules/bioinspired/doc/retina/index.rst modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst modules/calib3d/src/precomp.hpp modules/contrib/src/inputoutput.cpp modules/contrib/src/precomp.hpp modules/core/include/opencv2/core/internal.hpp modules/core/include/opencv2/core/types_c.h modules/core/src/drawing.cpp modules/core/src/precomp.hpp modules/core/src/system.cpp modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst modules/features2d/doc/common_interfaces_of_feature_detectors.rst modules/features2d/include/opencv2/features2d/features2d.hpp modules/features2d/src/precomp.hpp modules/flann/src/precomp.hpp modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst modules/gpu/doc/image_filtering.rst modules/gpu/doc/image_processing.rst modules/gpu/doc/video.rst modules/gpu/perf/perf_imgproc.cpp modules/gpu/perf4au/main.cpp modules/gpu/src/imgproc.cpp modules/gpu/src/precomp.hpp modules/gpu/test/test_imgproc.cpp modules/highgui/CMakeLists.txt modules/highgui/test/test_precomp.hpp modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst modules/imgproc/src/precomp.hpp modules/java/generator/src/cpp/Mat.cpp modules/legacy/src/precomp.hpp modules/ml/doc/k_nearest_neighbors.rst modules/ml/src/precomp.hpp modules/nonfree/doc/feature_detection.rst modules/nonfree/src/precomp.hpp modules/objdetect/include/opencv2/objdetect/objdetect.hpp modules/objdetect/src/cascadedetect.cpp modules/objdetect/src/hog.cpp modules/objdetect/src/precomp.hpp modules/objdetect/test/test_latentsvmdetector.cpp modules/ocl/src/hog.cpp modules/ocl/src/opencl/objdetect_hog.cl modules/ocl/src/precomp.hpp modules/photo/src/precomp.hpp modules/stitching/src/precomp.hpp modules/superres/perf/perf_precomp.hpp modules/superres/src/optical_flow.cpp modules/superres/src/precomp.hpp modules/superres/test/test_precomp.hpp modules/ts/include/opencv2/ts.hpp modules/video/src/precomp.hpp modules/videostab/src/precomp.hpp modules/world/src/precomp.hpp
11 years ago
* : PYTHON : An example using the inpainting technique can be found at opencv_source_code/samples/python2/inpaint.py