1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 02:16:34 +08:00

Remove all sphinx files

This commit is contained in:
Maksim Shabunin
2015-02-17 12:19:26 +03:00
parent 61f36de542
commit 7d9bbdcaad
91 changed files with 0 additions and 10050 deletions

View File

@@ -1,116 +0,0 @@
Dense Optical Flow
===================
Dense optical flow algorithms compute motion for each point
calcOpticalFlowSF
-----------------
Calculate an optical flow using "SimpleFlow" algorithm.
.. ocv:function:: void calcOpticalFlowSF( InputArray from, InputArray to, OutputArray flow, int layers, int averaging_block_size, int max_flow )
.. ocv:function:: calcOpticalFlowSF( InputArray from, InputArray to, OutputArray flow, int layers, int averaging_block_size, int max_flow, double sigma_dist, double sigma_color, int postprocess_window, double sigma_dist_fix, double sigma_color_fix, double occ_thr, int upscale_averaging_radius, double upscale_sigma_dist, double upscale_sigma_color, double speed_up_thr )
:param prev: First 8-bit 3-channel image.
:param next: Second 8-bit 3-channel image of the same size as ``prev``
:param flow: computed flow image that has the same size as ``prev`` and type ``CV_32FC2``
:param layers: Number of layers
:param averaging_block_size: Size of block through which we sum up when calculate cost function for pixel
:param max_flow: maximal flow that we search at each level
:param sigma_dist: vector smooth spatial sigma parameter
:param sigma_color: vector smooth color sigma parameter
:param postprocess_window: window size for postprocess cross bilateral filter
:param sigma_dist_fix: spatial sigma for postprocess cross bilateralf filter
:param sigma_color_fix: color sigma for postprocess cross bilateral filter
:param occ_thr: threshold for detecting occlusions
:param upscale_averaging_radius: window size for bilateral upscale operation
:param upscale_sigma_dist: spatial sigma for bilateral upscale operation
:param upscale_sigma_color: color sigma for bilateral upscale operation
:param speed_up_thr: threshold to detect point with irregular flow - where flow should be recalculated after upscale
See [Tao2012]_. And site of project - http://graphics.berkeley.edu/papers/Tao-SAN-2012-05/.
.. note::
* An example using the simpleFlow algorithm can be found at samples/simpleflow_demo.cpp
optflow::OpticalFlowDeepFlow
-----------------------------
DeepFlow optical flow algorithm implementation.
.. ocv:class:: optflow::OpticalFlowDeepFlow: public DenseOpticalFlow
The class implements the DeepFlow optical flow algorithm described in [Weinzaepfel2013]_ . See also http://lear.inrialpes.fr/src/deepmatching/ .
Parameters - class fields - that may be modified after creating a class instance:
.. ocv:member:: float alpha
Smoothness assumption weight
.. ocv:member:: float delta
Color constancy assumption weight
.. ocv:member:: float gamma
Gradient constancy weight
.. ocv:member:: float sigma
Gaussian smoothing parameter
.. ocv:member:: int minSize
Minimal dimension of an image in the pyramid (next, smaller images in the pyramid are
generated until one of the dimensions reaches this size)
.. ocv:member:: float downscaleFactor
Scaling factor in the image pyramid (must be < 1)
.. ocv:member:: int fixedPointIterations
How many iterations on each level of the pyramid
.. ocv:member:: int sorIterations
Iterations of Succesive Over-Relaxation (solver)
.. ocv:member:: float omega
Relaxation factor in SOR
optflow::createOptFlow_DeepFlow
---------------------------------
Create an OpticalFlowDeepFlow instance
.. ocv:function:: Ptr<DenseOpticalFlow> optflow::createOptFlow_DeepFlow()
Returns a pointer to a ``DenseOpticalFlow`` instance - see ``DenseOpticalFlow::calc()``
.. [Tao2012] Michael Tao, Jiamin Bai, Pushmeet Kohli and Sylvain Paris. SimpleFlow: A Non-iterative, Sublinear Optical Flow Algorithm. Computer Graphics Forum (Eurographics 2012)
.. [Weinzaepfel2013] P. Weinzaepfel, J. Revaud, Z. Harchaoui, and C. Schmid, “DeepFlow: Large Displacement Optical Flow with Deep Matching,” 2013 IEEE Int. Conf. Comput. Vis., pp. 13851392, Dec. 2013.

View File

@@ -1,125 +0,0 @@
Motion Templates
================
Motion templates is alternative technique for detecting motion and computing its direction.
See ``samples/motempl.py``.
updateMotionHistory
-----------------------
Updates the motion history image by a moving silhouette.
.. ocv:function:: void updateMotionHistory( InputArray silhouette, InputOutputArray mhi, double timestamp, double duration )
.. ocv:pyfunction:: cv2.updateMotionHistory(silhouette, mhi, timestamp, duration) -> mhi
:param silhouette: Silhouette mask that has non-zero pixels where the motion occurs.
:param mhi: Motion history image that is updated by the function (single-channel, 32-bit floating-point).
:param timestamp: Current time in milliseconds or other units.
:param duration: Maximal duration of the motion track in the same units as ``timestamp`` .
The function updates the motion history image as follows:
.. math::
\texttt{mhi} (x,y)= \forkthree{\texttt{timestamp}}{if $\texttt{silhouette}(x,y) \ne 0$}{0}{if $\texttt{silhouette}(x,y) = 0$ and $\texttt{mhi} < (\texttt{timestamp} - \texttt{duration})$}{\texttt{mhi}(x,y)}{otherwise}
That is, MHI pixels where the motion occurs are set to the current ``timestamp`` , while the pixels where the motion happened last time a long time ago are cleared.
The function, together with
:ocv:func:`calcMotionGradient` and
:ocv:func:`calcGlobalOrientation` , implements a motion templates technique described in
[Davis97]_ and [Bradski00]_.
calcMotionGradient
----------------------
Calculates a gradient orientation of a motion history image.
.. ocv:function:: void calcMotionGradient( InputArray mhi, OutputArray mask, OutputArray orientation, double delta1, double delta2, int apertureSize=3 )
.. ocv:pyfunction:: cv2.calcMotionGradient(mhi, delta1, delta2[, mask[, orientation[, apertureSize]]]) -> mask, orientation
:param mhi: Motion history single-channel floating-point image.
:param mask: Output mask image that has the type ``CV_8UC1`` and the same size as ``mhi`` . Its non-zero elements mark pixels where the motion gradient data is correct.
:param orientation: Output motion gradient orientation image that has the same type and the same size as ``mhi`` . Each pixel of the image is a motion orientation, from 0 to 360 degrees.
:param delta1: Minimal (or maximal) allowed difference between ``mhi`` values within a pixel neighborhood.
:param delta2: Maximal (or minimal) allowed difference between ``mhi`` values within a pixel neighborhood. That is, the function finds the minimum ( :math:`m(x,y)` ) and maximum ( :math:`M(x,y)` ) ``mhi`` values over :math:`3 \times 3` neighborhood of each pixel and marks the motion orientation at :math:`(x, y)` as valid only if
.. math::
\min ( \texttt{delta1} , \texttt{delta2} ) \le M(x,y)-m(x,y) \le \max ( \texttt{delta1} , \texttt{delta2} ).
:param apertureSize: Aperture size of the :ocv:func:`Sobel` operator.
The function calculates a gradient orientation at each pixel
:math:`(x, y)` as:
.. math::
\texttt{orientation} (x,y)= \arctan{\frac{d\texttt{mhi}/dy}{d\texttt{mhi}/dx}}
In fact,
:ocv:func:`fastAtan2` and
:ocv:func:`phase` are used so that the computed angle is measured in degrees and covers the full range 0..360. Also, the ``mask`` is filled to indicate pixels where the computed angle is valid.
.. note::
* (Python) An example on how to perform a motion template technique can be found at opencv_source_code/samples/python2/motempl.py
calcGlobalOrientation
-------------------------
Calculates a global motion orientation in a selected region.
.. ocv:function:: double calcGlobalOrientation( InputArray orientation, InputArray mask, InputArray mhi, double timestamp, double duration )
.. ocv:pyfunction:: cv2.calcGlobalOrientation(orientation, mask, mhi, timestamp, duration) -> retval
:param orientation: Motion gradient orientation image calculated by the function :ocv:func:`calcMotionGradient` .
:param mask: Mask image. It may be a conjunction of a valid gradient mask, also calculated by :ocv:func:`calcMotionGradient` , and the mask of a region whose direction needs to be calculated.
:param mhi: Motion history image calculated by :ocv:func:`updateMotionHistory` .
:param timestamp: Timestamp passed to :ocv:func:`updateMotionHistory` .
:param duration: Maximum duration of a motion track in milliseconds, passed to :ocv:func:`updateMotionHistory` .
The function calculates an average
motion direction in the selected region and returns the angle between
0 degrees and 360 degrees. The average direction is computed from
the weighted orientation histogram, where a recent motion has a larger
weight and the motion occurred in the past has a smaller weight, as recorded in ``mhi`` .
segmentMotion
-------------
Splits a motion history image into a few parts corresponding to separate independent motions (for example, left hand, right hand).
.. ocv:function:: void segmentMotion(InputArray mhi, OutputArray segmask, vector<Rect>& boundingRects, double timestamp, double segThresh)
.. ocv:pyfunction:: cv2.segmentMotion(mhi, timestamp, segThresh[, segmask]) -> segmask, boundingRects
:param mhi: Motion history image.
:param segmask: Image where the found mask should be stored, single-channel, 32-bit floating-point.
:param boundingRects: Vector containing ROIs of motion connected components.
:param timestamp: Current time in milliseconds or other units.
:param segThresh: Segmentation threshold that is recommended to be equal to the interval between motion history "steps" or greater.
The function finds all of the motion segments and marks them in ``segmask`` with individual values (1,2,...). It also computes a vector with ROIs of motion connected components. After that the motion direction for every component can be calculated with :ocv:func:`calcGlobalOrientation` using the extracted mask of the particular component.
.. [Bradski00] Davis, J.W. and Bradski, G.R. "Motion Segmentation and Pose Recognition with Motion History Gradients", WACV00, 2000
.. [Davis97] Davis, J.W. and Bobick, A.F. "The Representation and Recognition of Action Using Temporal Templates", CVPR97, 1997

View File

@@ -1,14 +0,0 @@
******************************************
optflow. Optical Flow Algorithms
******************************************
.. highlight:: cpp
The opencv_optflow module includes different algorithms for tracking points
.. toctree::
:maxdepth: 2
dense_optflow
motion_templates
optflow_io

View File

@@ -1,36 +0,0 @@
Optical flow input / output
============================
Functions reading and writing .flo files in "Middlebury" format, see: [MiddleburyFlo]_
readOpticalFlow
-----------------
Read a .flo file
.. ocv:function:: Mat readOpticalFlow( const String& path )
:param path: Path to the file to be loaded
The function readOpticalFlow loads a flow field from a file and returns it as a single matrix.
Resulting ``Mat`` has a type ``CV_32FC2`` - floating-point, 2-channel.
First channel corresponds to the flow in the horizontal direction (u), second - vertical (v).
writeOpticalFlow
-----------------
Write a .flo to disk
.. ocv:function:: bool writeOpticalFlow( const String& path, InputArray flow )
:param path: Path to the file to be written
:param flow: Flow field to be stored
The function stores a flow field in a file, returns ``true`` on success, ``false`` otherwise.
The flow field must be a 2-channel, floating-point matrix (``CV_32FC2``).
First channel corresponds to the flow in the horizontal direction (u), second - vertical (v).
.. [MiddleburyFlo] http://vision.middlebury.edu/flow/code/flow-code/README.txt