Commit 88125136 authored by Hamdi Sahloul's avatar Hamdi Sahloul

Remove cuda.HOG unnamed enum

parent bcf8f15a
......@@ -48,6 +48,7 @@
#endif
#include "opencv2/core/cuda.hpp"
#include "opencv2/objdetect.hpp"
/**
@addtogroup cuda
......@@ -78,12 +79,6 @@ namespace cv { namespace cuda {
class CV_EXPORTS_W HOG : public Algorithm
{
public:
enum
{
DESCR_FORMAT_ROW_BY_ROW,
DESCR_FORMAT_COL_BY_COL
};
/** @brief Creates the HOG descriptor and detector.
@param win_size Detection window size. Align to block size and block stride.
......@@ -138,8 +133,8 @@ public:
//! Descriptor storage format:
//! - **DESCR_FORMAT_ROW_BY_ROW** - Row-major order.
//! - **DESCR_FORMAT_COL_BY_COL** - Column-major order.
CV_WRAP virtual void setDescriptorFormat(int descr_format) = 0;
CV_WRAP virtual int getDescriptorFormat() const = 0;
CV_WRAP virtual void setDescriptorFormat(HOGDescriptor::DescriptorStorageFormat descr_format) = 0;
CV_WRAP virtual HOGDescriptor::DescriptorStorageFormat getDescriptorFormat() const = 0;
/** @brief Returns the number of coefficients required for the classification.
*/
......
......@@ -170,8 +170,8 @@ namespace
virtual void setGroupThreshold(int group_threshold) { group_threshold_ = group_threshold; }
virtual int getGroupThreshold() const { return group_threshold_; }
virtual void setDescriptorFormat(int descr_format) { descr_format_ = descr_format; }
virtual int getDescriptorFormat() const { return descr_format_; }
virtual void setDescriptorFormat(HOGDescriptor::DescriptorStorageFormat descr_format) { descr_format_ = descr_format; }
virtual HOGDescriptor::DescriptorStorageFormat getDescriptorFormat() const { return descr_format_; }
virtual size_t getDescriptorSize() const;
......@@ -208,7 +208,7 @@ namespace
Size win_stride_;
double scale0_;
int group_threshold_;
int descr_format_;
HOGDescriptor::DescriptorStorageFormat descr_format_;
Size cells_per_block_;
private:
......@@ -240,7 +240,7 @@ namespace
win_stride_(block_stride),
scale0_(1.05),
group_threshold_(2),
descr_format_(DESCR_FORMAT_COL_BY_COL),
descr_format_(HOGDescriptor::DESCR_FORMAT_COL_BY_COL),
cells_per_block_(block_size.width / cell_size.width, block_size.height / cell_size.height)
{
CV_Assert((win_size.width - block_size.width ) % block_stride.width == 0 &&
......@@ -502,7 +502,7 @@ namespace
switch (descr_format_)
{
case DESCR_FORMAT_ROW_BY_ROW:
case HOGDescriptor::DESCR_FORMAT_ROW_BY_ROW:
hog::extract_descrs_by_rows(win_size_.height, win_size_.width,
block_stride_.height, block_stride_.width,
win_stride_.height, win_stride_.width,
......@@ -512,7 +512,7 @@ namespace
descriptors,
StreamAccessor::getStream(stream));
break;
case DESCR_FORMAT_COL_BY_COL:
case HOGDescriptor::DESCR_FORMAT_COL_BY_COL:
hog::extract_descrs_by_cols(win_size_.height, win_size_.width,
block_stride_.height, block_stride_.width,
win_stride_.height, win_stride_.width,
......
......@@ -187,10 +187,10 @@ CUDA_TEST_P(HOG, GetDescriptors)
hog->setWinStride(Size(64, 128));
hog->setDescriptorFormat(cv::cuda::HOG::DESCR_FORMAT_ROW_BY_ROW);
hog->setDescriptorFormat(HOGDescriptor::DESCR_FORMAT_ROW_BY_ROW);
hog->compute(d_img, descriptors);
hog->setDescriptorFormat(cv::cuda::HOG::DESCR_FORMAT_COL_BY_COL);
hog->setDescriptorFormat(HOGDescriptor::DESCR_FORMAT_COL_BY_COL);
hog->compute(d_img, descriptors_by_cols);
// Check size of the result train table
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment