From f91f369788d061963a77bc0acc17177795def3dc Mon Sep 17 00:00:00 2001 From: abidrahmank Date: Thu, 11 Jul 2013 09:32:49 +0530 Subject: [PATCH] PyDocs for FAST, ORB etc --- .../doc/feature_detection_and_description.rst | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/modules/features2d/doc/feature_detection_and_description.rst b/modules/features2d/doc/feature_detection_and_description.rst index f265ab3c4ffc..7c283b016d9d 100644 --- a/modules/features2d/doc/feature_detection_and_description.rst +++ b/modules/features2d/doc/feature_detection_and_description.rst @@ -10,6 +10,11 @@ Detects corners using the FAST algorithm .. ocv:function:: void FAST( InputArray image, vector& keypoints, int threshold, bool nonmaxSupression=true ) .. ocv:function:: void FAST( InputArray image, vector& keypoints, int threshold, bool nonmaxSupression, int type ) +.. ocv:pyfunction:: cv2.FastFeatureDetector([, threshold[, nonmaxSuppression]]) -> +.. ocv:pyfunction:: cv2.FastFeatureDetector(threshold, nonmaxSuppression, type) -> +.. ocv:pyfunction:: cv2.FastFeatureDetector.detect(image[, mask]) -> keypoints + + :param image: grayscale image where keypoints (corners) are detected. :param keypoints: keypoints detected on the image. @@ -22,6 +27,9 @@ Detects corners using the FAST algorithm Detects corners using the FAST algorithm by [Rosten06]_. +..note:: In Python API, types are given as ``cv2.FAST_FEATURE_DETECTOR_TYPE_5_8``, ``cv2.FAST_FEATURE_DETECTOR_TYPE_7_12`` and ``cv2.FAST_FEATURE_DETECTOR_TYPE_9_16``. For corner detection, use ``cv2.FAST.detect()`` method. + + .. [Rosten06] E. Rosten. Machine Learning for High-speed Corner Detection, 2006. @@ -65,6 +73,9 @@ The ORB constructor .. ocv:function:: ORB::ORB(int nfeatures = 500, float scaleFactor = 1.2f, int nlevels = 8, int edgeThreshold = 31, int firstLevel = 0, int WTA_K=2, int scoreType=ORB::HARRIS_SCORE, int patchSize=31) +.. ocv:pyfunction:: cv2.ORB([, nfeatures[, scaleFactor[, nlevels[, edgeThreshold[, firstLevel[, WTA_K[, scoreType[, patchSize]]]]]]]]) -> + + :param nfeatures: The maximum number of features to retain. :param scaleFactor: Pyramid decimation ratio, greater than 1. ``scaleFactor==2`` means the classical pyramid, where each next level has 4x less pixels than the previous, but such a big scale factor will degrade feature matching scores dramatically. On the other hand, too close to 1 scale factor will mean that to cover certain scale range you will need more pyramid levels and so the speed will suffer. @@ -87,6 +98,11 @@ Finds keypoints in an image and computes their descriptors .. ocv:function:: void ORB::operator()(InputArray image, InputArray mask, vector& keypoints, OutputArray descriptors, bool useProvidedKeypoints=false ) const +.. ocv:pyfunction:: cv2.ORB.detect(image[, mask]) -> keypoints +.. ocv:pyfunction:: cv2.ORB.compute(image, keypoints[, descriptors]) -> keypoints, descriptors +.. ocv:pyfunction:: cv2.ORB.detectAndCompute(image, mask[, descriptors[, useProvidedKeypoints]]) -> keypoints, descriptors + + :param image: The input 8-bit grayscale image. :param mask: The operation mask. @@ -96,6 +112,7 @@ Finds keypoints in an image and computes their descriptors :param descriptors: The output descriptors. Pass ``cv::noArray()`` if you do not need it. :param useProvidedKeypoints: If it is true, then the method will use the provided vector of keypoints instead of detecting them. + BRISK ----- @@ -111,6 +128,8 @@ The BRISK constructor .. ocv:function:: BRISK::BRISK(int thresh=30, int octaves=3, float patternScale=1.0f) +.. ocv:pyfunction:: cv2.BRISK([, thresh[, octaves[, patternScale]]]) -> + :param thresh: FAST/AGAST detection threshold score. :param octaves: detection octaves. Use 0 to do single scale. @@ -123,6 +142,8 @@ The BRISK constructor for a custom pattern .. ocv:function:: BRISK::BRISK(std::vector &radiusList, std::vector &numberList, float dMax=5.85f, float dMin=8.2f, std::vector indexChange=std::vector()) +.. ocv:pyfunction:: cv2.BRISK(radiusList, numberList[, dMax[, dMin[, indexChange]]]) -> + :param radiusList: defines the radii (in pixels) where the samples around a keypoint are taken (for keypoint scale 1). :param numberList: defines the number of sampling points on the sampling circle. Must be the same size as radiusList.. @@ -139,6 +160,10 @@ Finds keypoints in an image and computes their descriptors .. ocv:function:: void BRISK::operator()(InputArray image, InputArray mask, vector& keypoints, OutputArray descriptors, bool useProvidedKeypoints=false ) const +.. ocv:pyfunction:: cv2.BRISK.detect(image[, mask]) -> keypoints +.. ocv:pyfunction:: cv2.BRISK.compute(image, keypoints[, descriptors]) -> keypoints, descriptors +.. ocv:pyfunction:: cv2.BRISK.detectAndCompute(image, mask[, descriptors[, useProvidedKeypoints]]) -> keypoints, descriptors + :param image: The input 8-bit grayscale image. :param mask: The operation mask.