Ask Your Question

d9magai's profile - activity

2016-08-09 06:12:18 -0600 commented question Read image from Amazon S3 directly to MAT with AWS SDK for C++?

Hi, Cuongvt101. I wrote an article for using OpenCV and AWS SDK for C++. http://qiita.com/d9magai@github/items...

This is the snippet.


    std::stringstream ss;
    ss << getObjectOutcome.GetResult().GetBody().rdbuf();
    std::string str = ss.str();
    std::vector<char> vec(str.begin(), str.end());
    cv::Mat img = cv::imdecode(cv::Mat(vec), CV_LOAD_IMAGE_COLOR);