From 7820c343eb1faeb120714fc56e0de0b3d870a1f4 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Mon, 15 Aug 2011 07:05:04 +0000 Subject: [PATCH] Documentation: fixed CvSlice and FeatureDetector descriptions. --- modules/core/doc/dynamic_structures.rst | 26 ++++++++++-------- ...common_interfaces_of_feature_detectors.rst | 27 ------------------- 2 files changed, 15 insertions(+), 38 deletions(-) diff --git a/modules/core/doc/dynamic_structures.rst b/modules/core/doc/dynamic_structures.rst index de3c29a596..ef646c2613 100644 --- a/modules/core/doc/dynamic_structures.rst +++ b/modules/core/doc/dynamic_structures.rst @@ -112,27 +112,31 @@ CvSlice .. ocv:struct:: CvSlice -A sequence slice. In C++ interface the class :ocv:class:`Range` should be used instead. + A sequence slice. In C++ interface the class :ocv:class:`Range` should be used instead. - .. ocv:member: int start_index + .. ocv:member:: int start_index - inclusive start index of the sequence slice + inclusive start index of the sequence slice - .. ocv:member: int end_index + .. ocv:member:: int end_index - exclusive end index of the sequence slice + exclusive end index of the sequence slice + +There are helper functions to construct the slice and to compute its length: + +.. ocv:cfunction:: CvSlice cvSlice( int start, int end ) + +:: -There are helper functions to construct the slice and to compute its length: :: - - inline CvSlice cvSlice( int start, int end ); #define CV_WHOLE_SEQ_END_INDEX 0x3fffffff #define CV_WHOLE_SEQ cvSlice(0, CV_WHOLE_SEQ_END_INDEX) - - /* calculates the sequence slice length */ - int cvSliceLength( CvSlice slice, const CvSeq* seq ); .. +.. ocv:cfunction:: int cvSliceLength( CvSlice slice, const CvSeq* seq ) + + Calculates the sequence slice length + Some of functions that operate on sequences take a ``CvSlice slice`` parameter that is often set to the whole sequence (CV_WHOLE_SEQ) by default. Either of the ``start_index`` and ``end_index`` may be negative or exceed the sequence length. If they are equal, the slice is considered empty (i.e., contains no elements). Because sequences are treated as circular structures, the slice may select a few elements in the end of a sequence followed by a few elements at the beginning of the sequence. For example, ``cvSlice(-2, 3)`` in the case of a 10-element sequence will select a 5-element slice, containing the pre-last (8th), last (9th), the very first (0th), second (1th) and third (2nd) elements. The functions normalize the slice argument in the following way: diff --git a/modules/features2d/doc/common_interfaces_of_feature_detectors.rst b/modules/features2d/doc/common_interfaces_of_feature_detectors.rst index 926060b19e..ab33f144a1 100644 --- a/modules/features2d/doc/common_interfaces_of_feature_detectors.rst +++ b/modules/features2d/doc/common_interfaces_of_feature_detectors.rst @@ -589,30 +589,3 @@ SurfAdjuster SurfAdjuster(); ... }; - -FeatureDetector ---------------- -.. ocv:class:: FeatureDetector - -Abstract base class for 2D image feature detectors. :: - - class CV_EXPORTS FeatureDetector - { - public: - virtual ~FeatureDetector(); - - void detect( const Mat& image, vector& keypoints, - const Mat& mask=Mat() ) const; - - void detect( const vector& images, - vector >& keypoints, - const vector& masks=vector() ) const; - - virtual void read(const FileNode&); - virtual void write(FileStorage&) const; - - static Ptr create( const string& detectorType ); - - protected: - ... - };