Alpy

conversion.h

Aug 18th, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. /*
  2. Some function to convert images between different formats
  3. Author: Alperen AYDIN
  4. */
  5. #ifndef CONVERSION_H
  6. #define CONVERSION_H
  7.  
  8. #include <opencv2/core/core.hpp>
  9. #include <opencv2/highgui/highgui.hpp>
  10. #include <eigen3/unsupported/Eigen/CXX11/Tensor>
  11.  
  12.  
  13. #include "tensorflow/core/public/session.h"
  14. #include "tensorflow/core/platform/env.h"
  15. #include "tensorflow/core/framework/tensor.h"
  16.  
  17. #include <vector>
  18.  
  19.  
  20.  
  21. Eigen::Tensor<float,4> convertImage_eigen(cv::Mat M);
  22. Eigen::Tensor<float,4> convertImage_eigen(std::vector<cv::Mat> L);
  23.  
  24. tensorflow::Tensor convertImage(cv::Mat M);
  25. tensorflow::Tensor convertImage(std::vector<cv::Mat> L);
  26.  
  27. cv::Mat convertTensor_unitary( Eigen::Tensor<float,4> T);
  28. std::vector<cv::Mat> convertTensor( Eigen::Tensor<float,4> T);
  29.  
  30. cv::Mat convertTensor_unitary(tensorflow::Tensor T);
  31. std::vector<cv::Mat> convertTensor(tensorflow::Tensor T);
  32.  
  33. #endif
Add Comment
Please, Sign In to add comment