1 Feature Detection And Description
2 =================================
8 Finds edges in an image using the [Canny86]_ algorithm.
10 .. ocv:function:: void ocl::Canny(const oclMat& image, oclMat& edges, double low_thresh, double high_thresh, int apperture_size = 3, bool L2gradient = false)
12 .. ocv:function:: void ocl::Canny(const oclMat& image, CannyBuf& buf, oclMat& edges, double low_thresh, double high_thresh, int apperture_size = 3, bool L2gradient = false)
14 .. ocv:function:: void ocl::Canny(const oclMat& dx, const oclMat& dy, oclMat& edges, double low_thresh, double high_thresh, bool L2gradient = false)
16 .. ocv:function:: void ocl::Canny(const oclMat& dx, const oclMat& dy, CannyBuf& buf, oclMat& edges, double low_thresh, double high_thresh, bool L2gradient = false)
18 :param image: Single-channel 8-bit input image.
20 :param dx: First derivative of image in the vertical direction. Support only ``CV_32S`` type.
22 :param dy: First derivative of image in the horizontal direction. Support only ``CV_32S`` type.
24 :param edges: Output edge map. It has the same size and type as ``image`` .
26 :param low_thresh: First threshold for the hysteresis procedure.
28 :param high_thresh: Second threshold for the hysteresis procedure.
30 :param apperture_size: Aperture size for the :ocv:func:`Sobel` operator.
32 :param L2gradient: Flag indicating whether a more accurate :math:`L_2` norm :math:`=\sqrt{(dI/dx)^2 + (dI/dy)^2}` should be used to compute the image gradient magnitude ( ``L2gradient=true`` ), or a faster default :math:`L_1` norm :math:`=|dI/dx|+|dI/dy|` is enough ( ``L2gradient=false`` ).
34 :param buf: Optional buffer to avoid extra memory allocations (for many calls with the same sizes).
36 .. seealso:: :ocv:func:`Canny`
39 ocl::BruteForceMatcher_OCL_base
40 -------------------------------
41 .. ocv:class:: ocl::BruteForceMatcher_OCL_base
43 Brute-force descriptor matcher. For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one. This descriptor matcher supports masking permissible matches between descriptor sets. ::
45 class BruteForceMatcher_OCL_base
48 enum DistType {L1Dist = 0, L2Dist, HammingDist};
50 // Add descriptors to train descriptor collection.
51 void add(const std::vector<oclMat>& descCollection);
53 // Get train descriptors collection.
54 const std::vector<oclMat>& getTrainDescriptors() const;
56 // Clear train descriptors collection.
59 // Return true if there are no train descriptors in collection.
62 // Return true if the matcher supports mask in match methods.
63 bool isMaskSupported() const;
65 void matchSingle(const oclMat& query, const oclMat& train,
66 oclMat& trainIdx, oclMat& distance,
67 const oclMat& mask = oclMat());
69 static void matchDownload(const oclMat& trainIdx,
70 const oclMat& distance, std::vector<DMatch>& matches);
71 static void matchConvert(const Mat& trainIdx,
72 const Mat& distance, std::vector<DMatch>& matches);
74 void match(const oclMat& query, const oclMat& train,
75 std::vector<DMatch>& matches, const oclMat& mask = oclMat());
77 void makeGpuCollection(oclMat& trainCollection, oclMat& maskCollection,
78 const vector<oclMat>& masks = std::vector<oclMat>());
80 void matchCollection(const oclMat& query, const oclMat& trainCollection,
81 oclMat& trainIdx, oclMat& imgIdx, oclMat& distance,
82 const oclMat& maskCollection);
84 static void matchDownload(const oclMat& trainIdx, oclMat& imgIdx,
85 const oclMat& distance, std::vector<DMatch>& matches);
86 static void matchConvert(const Mat& trainIdx, const Mat& imgIdx,
87 const Mat& distance, std::vector<DMatch>& matches);
89 void match(const oclMat& query, std::vector<DMatch>& matches,
90 const std::vector<oclMat>& masks = std::vector<oclMat>());
92 void knnMatchSingle(const oclMat& query, const oclMat& train,
93 oclMat& trainIdx, oclMat& distance, oclMat& allDist, int k,
94 const oclMat& mask = oclMat());
96 static void knnMatchDownload(const oclMat& trainIdx, const oclMat& distance,
97 std::vector< std::vector<DMatch> >& matches, bool compactResult = false);
98 static void knnMatchConvert(const Mat& trainIdx, const Mat& distance,
99 std::vector< std::vector<DMatch> >& matches, bool compactResult = false);
101 void knnMatch(const oclMat& query, const oclMat& train,
102 std::vector< std::vector<DMatch> >& matches, int k,
103 const oclMat& mask = oclMat(), bool compactResult = false);
105 void knnMatch2Collection(const oclMat& query, const oclMat& trainCollection,
106 oclMat& trainIdx, oclMat& imgIdx, oclMat& distance,
107 const oclMat& maskCollection = oclMat());
109 static void knnMatch2Download(const oclMat& trainIdx, const oclMat& imgIdx, const oclMat& distance,
110 std::vector< std::vector<DMatch> >& matches, bool compactResult = false);
111 static void knnMatch2Convert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance,
112 std::vector< std::vector<DMatch> >& matches, bool compactResult = false);
114 void knnMatch(const oclMat& query, std::vector< std::vector<DMatch> >& matches, int k,
115 const std::vector<oclMat>& masks = std::vector<oclMat>(),
116 bool compactResult = false);
118 void radiusMatchSingle(const oclMat& query, const oclMat& train,
119 oclMat& trainIdx, oclMat& distance, oclMat& nMatches, float maxDistance,
120 const oclMat& mask = oclMat());
122 static void radiusMatchDownload(const oclMat& trainIdx, const oclMat& distance, const oclMat& nMatches,
123 std::vector< std::vector<DMatch> >& matches, bool compactResult = false);
124 static void radiusMatchConvert(const Mat& trainIdx, const Mat& distance, const Mat& nMatches,
125 std::vector< std::vector<DMatch> >& matches, bool compactResult = false);
127 void radiusMatch(const oclMat& query, const oclMat& train,
128 std::vector< std::vector<DMatch> >& matches, float maxDistance,
129 const oclMat& mask = oclMat(), bool compactResult = false);
131 void radiusMatchCollection(const oclMat& query, oclMat& trainIdx, oclMat& imgIdx, oclMat& distance, oclMat& nMatches, float maxDistance,
132 const std::vector<oclMat>& masks = std::vector<oclMat>());
134 static void radiusMatchDownload(const oclMat& trainIdx, const oclMat& imgIdx, const oclMat& distance, const oclMat& nMatches,
135 std::vector< std::vector<DMatch> >& matches, bool compactResult = false);
136 static void radiusMatchConvert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, const Mat& nMatches,
137 std::vector< std::vector<DMatch> >& matches, bool compactResult = false);
139 void radiusMatch(const oclMat& query, std::vector< std::vector<DMatch> >& matches, float maxDistance,
140 const std::vector<oclMat>& masks = std::vector<oclMat>(), bool compactResult = false);
145 std::vector<oclMat> trainDescCollection;
149 The class ``BruteForceMatcher_OCL_base`` has an interface similar to the class :ocv:class:`DescriptorMatcher`. It has two groups of ``match`` methods: for matching descriptors of one image with another image or with an image set. Also, all functions have an alternative to save results either to the GPU memory or to the CPU memory. ``BruteForceMatcher_OCL_base`` supports only the ``L1<float>``, ``L2<float>``, and ``Hamming`` distance types.
151 .. seealso:: :ocv:class:`DescriptorMatcher`, :ocv:class:`BFMatcher`
155 ocl::BruteForceMatcher_OCL_base::match
156 --------------------------------------
157 Finds the best match for each descriptor from a query set with train descriptors.
159 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::match(const oclMat& query, const oclMat& train, std::vector<DMatch>& matches, const oclMat& mask = oclMat())
161 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::matchSingle(const oclMat& query, const oclMat& train, oclMat& trainIdx, oclMat& distance, const oclMat& mask = oclMat())
163 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::match(const oclMat& query, std::vector<DMatch>& matches, const std::vector<oclMat>& masks = std::vector<oclMat>())
165 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::matchCollection( const oclMat& query, const oclMat& trainCollection, oclMat& trainIdx, oclMat& imgIdx, oclMat& distance, const oclMat& masks=oclMat() )
167 .. seealso:: :ocv:func:`DescriptorMatcher::match`
171 ocl::BruteForceMatcher_OCL_base::makeGpuCollection
172 --------------------------------------------------
173 Performs a GPU collection of train descriptors and masks in a suitable format for the :ocv:func:`ocl::BruteForceMatcher_OCL_base::matchCollection` function.
175 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::makeGpuCollection(oclMat& trainCollection, oclMat& maskCollection, const vector<oclMat>& masks = std::vector<oclMat>())
178 ocl::BruteForceMatcher_OCL_base::matchDownload
179 ----------------------------------------------
180 Downloads matrices obtained via :ocv:func:`ocl::BruteForceMatcher_OCL_base::matchSingle` or :ocv:func:`ocl::BruteForceMatcher_OCL_base::matchCollection` to vector with :ocv:class:`DMatch`.
182 .. ocv:function:: static void ocl::BruteForceMatcher_OCL_base::matchDownload( const oclMat& trainIdx, const oclMat& distance, std::vector<DMatch>& matches )
184 .. ocv:function:: static void ocl::BruteForceMatcher_OCL_base::matchDownload( const oclMat& trainIdx, const oclMat& imgIdx, const oclMat& distance, std::vector<DMatch>& matches )
187 ocl::BruteForceMatcher_OCL_base::matchConvert
188 ---------------------------------------------
189 Converts matrices obtained via :ocv:func:`ocl::BruteForceMatcher_OCL_base::matchSingle` or :ocv:func:`ocl::BruteForceMatcher_OCL_base::matchCollection` to vector with :ocv:class:`DMatch`.
191 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::matchConvert(const Mat& trainIdx, const Mat& distance, std::vector<DMatch>&matches)
193 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::matchConvert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, std::vector<DMatch>&matches)
197 ocl::BruteForceMatcher_OCL_base::knnMatch
198 -----------------------------------------
199 Finds the ``k`` best matches for each descriptor from a query set with train descriptors.
201 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::knnMatch(const oclMat& query, const oclMat& train, std::vector< std::vector<DMatch> >&matches, int k, const oclMat& mask = oclMat(), bool compactResult = false)
203 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::knnMatchSingle(const oclMat& query, const oclMat& train, oclMat& trainIdx, oclMat& distance, oclMat& allDist, int k, const oclMat& mask = oclMat())
205 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::knnMatch(const oclMat& query, std::vector< std::vector<DMatch> >&matches, int k, const std::vector<oclMat>&masks = std::vector<oclMat>(), bool compactResult = false )
207 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::knnMatch2Collection(const oclMat& query, const oclMat& trainCollection, oclMat& trainIdx, oclMat& imgIdx, oclMat& distance, const oclMat& maskCollection = oclMat())
209 :param query: Query set of descriptors.
211 :param train: Training set of descriptors. It is not be added to train descriptors collection stored in the class object.
213 :param k: Number of the best matches per each query descriptor (or less if it is not possible).
215 :param mask: Mask specifying permissible matches between the input query and train matrices of descriptors.
217 :param compactResult: If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors.
220 The function returns detected ``k`` (or less if not possible) matches in the increasing order by distance.
222 The third variant of the method stores the results in GPU memory.
224 .. seealso:: :ocv:func:`DescriptorMatcher::knnMatch`
228 ocl::BruteForceMatcher_OCL_base::knnMatchDownload
229 -------------------------------------------------
230 Downloads matrices obtained via :ocv:func:`ocl::BruteForceMatcher_OCL_base::knnMatchSingle` or :ocv:func:`ocl::BruteForceMatcher_OCL_base::knnMatch2Collection` to vector with :ocv:class:`DMatch`.
232 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::knnMatchDownload(const oclMat& trainIdx, const oclMat& distance, std::vector< std::vector<DMatch> >&matches, bool compactResult = false)
234 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::knnMatch2Download(const oclMat& trainIdx, const oclMat& imgIdx, const oclMat& distance, std::vector< std::vector<DMatch> >& matches, bool compactResult = false)
236 If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors.
240 ocl::BruteForceMatcher_OCL_base::knnMatchConvert
241 ------------------------------------------------
242 Converts matrices obtained via :ocv:func:`ocl::BruteForceMatcher_OCL_base::knnMatchSingle` or :ocv:func:`ocl::BruteForceMatcher_OCL_base::knnMatch2Collection` to CPU vector with :ocv:class:`DMatch`.
244 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::knnMatchConvert(const Mat& trainIdx, const Mat& distance, std::vector< std::vector<DMatch> >&matches, bool compactResult = false)
246 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::knnMatch2Convert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, std::vector< std::vector<DMatch> >& matches, bool compactResult = false)
248 If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors.
252 ocl::BruteForceMatcher_OCL_base::radiusMatch
253 --------------------------------------------
254 For each query descriptor, finds the best matches with a distance less than a given threshold.
256 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::radiusMatch(const oclMat& query, const oclMat& train, std::vector< std::vector<DMatch> >&matches, float maxDistance, const oclMat& mask = oclMat(), bool compactResult = false)
258 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::radiusMatchSingle(const oclMat& query, const oclMat& train, oclMat& trainIdx, oclMat& distance, oclMat& nMatches, float maxDistance, const oclMat& mask = oclMat())
260 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::radiusMatch(const oclMat& query, std::vector< std::vector<DMatch> >&matches, float maxDistance, const std::vector<oclMat>& masks = std::vector<oclMat>(), bool compactResult = false)
262 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::radiusMatchCollection(const oclMat& query, oclMat& trainIdx, oclMat& imgIdx, oclMat& distance, oclMat& nMatches, float maxDistance, const std::vector<oclMat>& masks = std::vector<oclMat>())
264 :param query: Query set of descriptors.
266 :param train: Training set of descriptors. It is not added to train descriptors collection stored in the class object.
268 :param maxDistance: Distance threshold.
270 :param mask: Mask specifying permissible matches between the input query and train matrices of descriptors.
272 :param compactResult: If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors.
275 The function returns detected matches in the increasing order by distance.
277 The methods work only on devices with the compute capability :math:`>=` 1.1.
279 The third variant of the method stores the results in GPU memory and does not store the points by the distance.
281 .. seealso:: :ocv:func:`DescriptorMatcher::radiusMatch`
285 ocl::BruteForceMatcher_OCL_base::radiusMatchDownload
286 ----------------------------------------------------
287 Downloads matrices obtained via :ocv:func:`ocl::BruteForceMatcher_OCL_base::radiusMatchSingle` or :ocv:func:`ocl::BruteForceMatcher_OCL_base::radiusMatchCollection` to vector with :ocv:class:`DMatch`.
289 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::radiusMatchDownload(const oclMat& trainIdx, const oclMat& distance, const oclMat& nMatches, std::vector< std::vector<DMatch> >&matches, bool compactResult = false)
291 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::radiusMatchDownload(const oclMat& trainIdx, const oclMat& imgIdx, const oclMat& distance, const oclMat& nMatches, std::vector< std::vector<DMatch> >& matches, bool compactResult = false)
293 If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors.
298 ocl::BruteForceMatcher_OCL_base::radiusMatchConvert
299 ---------------------------------------------------
300 Converts matrices obtained via :ocv:func:`ocl::BruteForceMatcher_OCL_base::radiusMatchSingle` or :ocv:func:`ocl::BruteForceMatcher_OCL_base::radiusMatchCollection` to vector with :ocv:class:`DMatch`.
302 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::radiusMatchConvert(const Mat& trainIdx, const Mat& distance, const Mat& nMatches, std::vector< std::vector<DMatch> >&matches, bool compactResult = false)
304 .. ocv:function:: void ocl::BruteForceMatcher_OCL_base::radiusMatchConvert(const Mat& trainIdx, const Mat& imgIdx, const Mat& distance, const Mat& nMatches, std::vector< std::vector<DMatch> >& matches, bool compactResult = false)
306 If ``compactResult`` is ``true`` , the ``matches`` vector does not contain matches for fully masked-out query descriptors.
311 .. ocv:struct:: ocl::HOGDescriptor
313 The class implements Histogram of Oriented Gradients ([Dalal2005]_) object detector. ::
315 struct CV_EXPORTS HOGDescriptor
317 enum { DEFAULT_WIN_SIGMA = -1 };
318 enum { DEFAULT_NLEVELS = 64 };
319 enum { DESCR_FORMAT_ROW_BY_ROW, DESCR_FORMAT_COL_BY_COL };
321 HOGDescriptor(Size win_size=Size(64, 128), Size block_size=Size(16, 16),
322 Size block_stride=Size(8, 8), Size cell_size=Size(8, 8),
323 int nbins=9, double win_sigma=DEFAULT_WIN_SIGMA,
324 double threshold_L2hys=0.2, bool gamma_correction=true,
325 int nlevels=DEFAULT_NLEVELS);
327 size_t getDescriptorSize() const;
328 size_t getBlockHistogramSize() const;
330 void setSVMDetector(const vector<float>& detector);
332 static vector<float> getDefaultPeopleDetector();
333 static vector<float> getPeopleDetector48x96();
334 static vector<float> getPeopleDetector64x128();
336 void detect(const oclMat& img, vector<Point>& found_locations,
337 double hit_threshold=0, Size win_stride=Size(),
338 Size padding=Size());
340 void detectMultiScale(const oclMat& img, vector<Rect>& found_locations,
341 double hit_threshold=0, Size win_stride=Size(),
342 Size padding=Size(), double scale0=1.05,
343 int group_threshold=2);
345 void getDescriptors(const oclMat& img, Size win_stride,
347 int descr_format=DESCR_FORMAT_COL_BY_COL);
355 double threshold_L2hys;
356 bool gamma_correction;
364 Interfaces of all methods are kept similar to the ``CPU HOG`` descriptor and detector analogues as much as possible.
368 (Ocl) An example using the HOG descriptor can be found at opencv_source_code/samples/ocl/hog.cpp
370 ocl::HOGDescriptor::HOGDescriptor
371 -------------------------------------
372 Creates the ``HOG`` descriptor and detector.
374 .. ocv:function:: ocl::HOGDescriptor::HOGDescriptor(Size win_size=Size(64, 128), Size block_size=Size(16, 16), Size block_stride=Size(8, 8), Size cell_size=Size(8, 8), int nbins=9, double win_sigma=DEFAULT_WIN_SIGMA, double threshold_L2hys=0.2, bool gamma_correction=true, int nlevels=DEFAULT_NLEVELS)
376 :param win_size: Detection window size. Align to block size and block stride.
378 :param block_size: Block size in pixels. Align to cell size. Only (16,16) is supported for now.
380 :param block_stride: Block stride. It must be a multiple of cell size.
382 :param cell_size: Cell size. Only (8, 8) is supported for now.
384 :param nbins: Number of bins. Only 9 bins per cell are supported for now.
386 :param win_sigma: Gaussian smoothing window parameter.
388 :param threshold_L2hys: L2-Hys normalization method shrinkage.
390 :param gamma_correction: Flag to specify whether the gamma correction preprocessing is required or not.
392 :param nlevels: Maximum number of detection window increases.
396 ocl::HOGDescriptor::getDescriptorSize
397 -----------------------------------------
398 Returns the number of coefficients required for the classification.
400 .. ocv:function:: size_t ocl::HOGDescriptor::getDescriptorSize() const
404 ocl::HOGDescriptor::getBlockHistogramSize
405 ---------------------------------------------
406 Returns the block histogram size.
408 .. ocv:function:: size_t ocl::HOGDescriptor::getBlockHistogramSize() const
412 ocl::HOGDescriptor::setSVMDetector
413 --------------------------------------
414 Sets coefficients for the linear SVM classifier.
416 .. ocv:function:: void ocl::HOGDescriptor::setSVMDetector(const vector<float>& detector)
420 ocl::HOGDescriptor::getDefaultPeopleDetector
421 ------------------------------------------------
422 Returns coefficients of the classifier trained for people detection (for default window size).
424 .. ocv:function:: static vector<float> ocl::HOGDescriptor::getDefaultPeopleDetector()
428 ocl::HOGDescriptor::getPeopleDetector48x96
429 ----------------------------------------------
430 Returns coefficients of the classifier trained for people detection (for 48x96 windows).
432 .. ocv:function:: static vector<float> ocl::HOGDescriptor::getPeopleDetector48x96()
436 ocl::HOGDescriptor::getPeopleDetector64x128
437 -----------------------------------------------
438 Returns coefficients of the classifier trained for people detection (for 64x128 windows).
440 .. ocv:function:: static vector<float> ocl::HOGDescriptor::getPeopleDetector64x128()
444 ocl::HOGDescriptor::detect
445 ------------------------------
446 Performs object detection without a multi-scale window.
448 .. ocv:function:: void ocl::HOGDescriptor::detect(const oclMat& img, vector<Point>& found_locations, double hit_threshold=0, Size win_stride=Size(), Size padding=Size())
450 :param img: Source image. ``CV_8UC1`` and ``CV_8UC4`` types are supported for now.
452 :param found_locations: Left-top corner points of detected objects boundaries.
454 :param hit_threshold: Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specfied in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here.
456 :param win_stride: Window stride. It must be a multiple of block stride.
458 :param padding: Mock parameter to keep the CPU interface compatibility. It must be (0,0).
462 ocl::HOGDescriptor::detectMultiScale
463 ----------------------------------------
464 Performs object detection with a multi-scale window.
466 .. ocv:function:: void ocl::HOGDescriptor::detectMultiScale(const oclMat& img, vector<Rect>& found_locations, double hit_threshold=0, Size win_stride=Size(), Size padding=Size(), double scale0=1.05, int group_threshold=2)
468 :param img: Source image. See :ocv:func:`ocl::HOGDescriptor::detect` for type limitations.
470 :param found_locations: Detected objects boundaries.
472 :param hit_threshold: Threshold for the distance between features and SVM classifying plane. See :ocv:func:`ocl::HOGDescriptor::detect` for details.
474 :param win_stride: Window stride. It must be a multiple of block stride.
476 :param padding: Mock parameter to keep the CPU interface compatibility. It must be (0,0).
478 :param scale0: Coefficient of the detection window increase.
480 :param group_threshold: Coefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping. See :ocv:func:`groupRectangles` .
484 ocl::HOGDescriptor::getDescriptors
485 --------------------------------------
486 Returns block descriptors computed for the whole image.
488 .. ocv:function:: void ocl::HOGDescriptor::getDescriptors(const oclMat& img, Size win_stride, oclMat& descriptors, int descr_format=DESCR_FORMAT_COL_BY_COL)
490 :param img: Source image. See :ocv:func:`ocl::HOGDescriptor::detect` for type limitations.
492 :param win_stride: Window stride. It must be a multiple of block stride.
494 :param descriptors: 2D array of descriptors.
496 :param descr_format: Descriptor storage format:
498 * **DESCR_FORMAT_ROW_BY_ROW** - Row-major order.
500 * **DESCR_FORMAT_COL_BY_COL** - Column-major order.
502 The function is mainly used to learn the classifier.