class cv::FarnebackOpticalFlow

Class computing a dense optical flow using the Gunnar Farneback’s algorithm.

#include <tracking.hpp>

class FarnebackOpticalFlow: public cv::DenseOpticalFlow
{
public:
    // methods

    virtual
    bool
    getFastPyramids() const = 0;

    virtual
    int
    getFlags() const = 0;

    virtual
    int
    getNumIters() const = 0;

    virtual
    int
    getNumLevels() const = 0;

    virtual
    int
    getPolyN() const = 0;

    virtual
    double
    getPolySigma() const = 0;

    virtual
    double
    getPyrScale() const = 0;

    virtual
    int
    getWinSize() const = 0;

    virtual
    void
    setFastPyramids(bool fastPyramids) = 0;

    virtual
    void
    setFlags(int flags) = 0;

    virtual
    void
    setNumIters(int numIters) = 0;

    virtual
    void
    setNumLevels(int numLevels) = 0;

    virtual
    void
    setPolyN(int polyN) = 0;

    virtual
    void
    setPolySigma(double polySigma) = 0;

    virtual
    void
    setPyrScale(double pyrScale) = 0;

    virtual
    void
    setWinSize(int winSize) = 0;

    static
    Ptr<FarnebackOpticalFlow>
    create(
        int numLevels = 5,
        double pyrScale = 0.5,
        bool fastPyramids = false,
        int winSize = 13,
        int numIters = 10,
        int polyN = 5,
        double polySigma = 1.1,
        int flags = 0
        );
};

Inherited Members

public:
    // methods

    virtual
    void
    clear();

    virtual
    bool
    empty() const;

    virtual
    String
    getDefaultName() const;

    virtual
    void
    read(const FileNode& fn);

    virtual
    void
    save(const String& filename) const;

    virtual
    void
    write(FileStorage& fs) const;

    template <typename _Tp>
    static
    Ptr<_Tp>
    load(
        const String& filename,
        const String& objname = String()
        );

    template <typename _Tp>
    static
    Ptr<_Tp>
    loadFromString(
        const String& strModel,
        const String& objname = String()
        );

    template <typename _Tp>
    static
    Ptr<_Tp>
    read(const FileNode& fn);

    virtual
    void
    calc(
        InputArray I0,
        InputArray I1,
        InputOutputArray flow
        ) = 0;

    virtual
    void
    collectGarbage() = 0;

protected:
    // methods

    void
    writeFormat(FileStorage& fs) const;