Advertisement
Guest User

Untitled

a guest
May 12th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <opencv2/core/core.hpp>
  2. #include <opencv2/highgui/highgui.hpp>
  3.  
  4. #include <shogun/base/init.h>
  5. #include <shogun/lib/common.h>
  6. #include <shogun/lib/SGMatrix.h>
  7. #include <shogun/features/DenseFeatures.h>
  8.  
  9. #include <iostream>
  10.  
  11. using namespace cv;
  12. using namespace shogun;
  13.  
  14. int main()
  15. {
  16. init_shogun_with_defaults();
  17.  
  18. Mat cvMat = Mat::eye(3,3,CV_8UC1);
  19. cvMat.at<unsigned char>(0,1) = 3;
  20. SGMatrix<unsigned char> sgMat(cvMat.data,3,3,false);
  21.  
  22. std::cout << cvMat << std::endl ;
  23. sgMat.display_matrix();
  24.  
  25.  
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement