33 #ifndef CV2_SGMATRIX_FACTORY_H_ 
   34 #define CV2_SGMATRIX_FACTORY_H_ 
   36 #include <opencv2/core/core.hpp> 
   61         template<
typename SG_T> 
static SGMatrix<SG_T> get_sgmatrix(cv::Mat);
 
   68         template<
typename SG_T> 
static CDenseFeatures<SG_T>* get_dense_features(cv::Mat);
 
   71 template<
typename SG_T> CDenseFeatures<SG_T>* CV2SGFactory::get_dense_features
 
   74     SGMatrix<SG_T> sgMat=CV2SGFactory::get_sgmatrix<SG_T>(cvMat);
 
   75     CDenseFeatures<SG_T>* features=
new CDenseFeatures<SG_T>(sgMat);
 
   79 template<
typename SG_T> SGMatrix<SG_T> CV2SGFactory::get_sgmatrix
 
   82     int num_rows=cvMat.rows;
 
   83     int num_cols=cvMat.cols;
 
   84     SGMatrix<SG_T> sgMat(num_rows, num_cols);
 
   85     const int inType=OpenCVTypeName<SG_T>::get_opencv_type();
 
   86     cvMat.convertTo(cvMat,inType);
 
   87     memcpy(sgMat.matrix, cvMat.data, num_rows*num_cols*
sizeof(SG_T));
 
static void transpose_matrix(T *&matrix, int32_t &num_feat, int32_t &num_vec)
all of classes and functions are contained in the shogun namespace