Direct Graphical Models  v.1.7.0
HSV.cpp
1 #include "HSV.h"
2 #include "macroses.h"
3 
4 namespace DirectGraphicalModels { namespace fex
5 {
6 Mat CHSV::get(const Mat &img)
7 {
8  DGM_ASSERT_MSG(img.channels() == 3, "Input image has %d channel(s), but must have 3.", img.channels());
9  Mat res;
10  cvtColor(img, res, cv::ColorConversionCodes::COLOR_BGR2HSV);
11  return res;
12 }
13 } }
virtual Mat get(void) const
Extracts and returns the required feature.
Definition: HSV.h:24