Added initial docs for the videostab module
[profile/ivi/opencv.git] / modules / videostab / doc / fast_marching.rst
1 Fast Marching Method
2 ====================
3
4 .. highlight:: cpp
5
6 The Fast Marching Method [T04]_ is used in of the video stabilization routines to do motion and color inpainting. The method is implemented is a flexible way and it's made public for other users.
7
8 videostab::FastMarchingMethod
9 -----------------------------
10
11 .. ocv:class:: videostab::FastMarchingMethod
12
13 Describes the Fast Marching Method implementation. 
14
15 ::
16
17     class CV_EXPORTS FastMarchingMethod
18     {
19     public:
20         FastMarchingMethod();
21
22         template <typename Inpaint>
23         Inpaint run(const Mat &mask, Inpaint inpaint);
24
25         Mat distanceMap() const;
26     };
27
28
29 videostab::FastMarchingMethod::FastMarchingMethod
30 -------------------------------------------------
31
32 Constructor. 
33
34 .. ocv:function:: videostab::FastMarchingMethod::FastMarchingMethod()
35
36
37 videostab::FastMarchingMethod::run
38 ----------------------------------
39
40 Template method that runs the Fast Marching Method. 
41
42 .. ocv:function:: Inpaint FastMarchingMethod::run(const Mat &mask, Inpaint inpaint)
43
44     :param mask: Image mask. ``0`` value indicates that the pixel value must be inpainted, ``255`` indicates that the pixel value is known, other values aren't acceptable.
45
46     :param inpaint: Inpainting functor that overloads ``void operator ()(int x, int y)``.
47
48     :return: Inpainting functor. 
49
50
51 videostab::FastMarchingMethod::distanceMap
52 ------------------------------------------
53
54 .. ocv:function:: Mat videostab::FastMarchingMethod::distanceMap() const
55
56     :return: Distance map that's created during working of the method.