CImg
CImg copied to clipboard
[Feature Request] - OpenCV; cv::UMat (Data Structure)
There is the Plugin for converting the image data structure to the OpenCV (www.opencv.org) data structure, cv::Mat:
CImg/plugins/cvMat.h
But OpenCV also has a similar image data structure: cv::UMat
Can a plug-In be made for this also ?.
There is the Plugin for converting the image data structure to the OpenCV (www.opencv.org) data structure,
cv::Mat:
CImg/plugins/cvMat.hBut OpenCV also has a similar image data structure:
cv::UMatCan a plug-In be made for this also ?.
how to use cv::Mat,i include the cvMat, then compile,but so many errors.
To use the plugin:
#include <opencv2/core.hpp> #define cimg_plugin1 "cvMat.h" #define cimg_use_opencv #include <CImg.h> ....
============ SAMPLE COMPLETE PROGRAM =======
#include
#define cimg_plugin1 "cvMat.h" #define cimg_use_opencv #include <CImg.h>
using namespace cv; using namespace cimg_library;
int main( int argc, char** argv ) {
namedWindow( "OpenCV-Display", cv::WINDOW_AUTOSIZE );
if(argc < 2) {
std::cerr << "An argument must be given\n";
exit(0);
}
//Read CIMG Image
CImg
//Create an OPENCV copy from CIMG Mat cv_image = cimg.get_MAT(); imshow("OpenCV-Display", cv_image); std::cout << "Press key...\n"; cv::waitKey(0); //Wait for key press destroyWindow("OpenCV-Display"); //Close OpenCV Window
// Convert to CIMG from OPENCV
CImg
return 0;