Skip to content

Instantly share code, notes, and snippets.

@atinfinity
Created October 21, 2014 12:58
Show Gist options
  • Save atinfinity/e096aca982994e4df10e to your computer and use it in GitHub Desktop.
Save atinfinity/e096aca982994e4df10e to your computer and use it in GitHub Desktop.
メモリ確保テスト用プログラム
#include <opencv2/core/core.hpp>
#include <iostream>
int main(int argc, const char* argv[])
{
cv::Mat img1(cv::Size(32 * 1024, 32 * 1024), CV_8UC3, cv::Scalar(0, 0, 255));
if(img1.empty()) std::cout << "NG" << std::endl;
else std::cout << "OK" << std::endl;
cv::Mat img2(cv::Size(32 * 1024, 32 * 1024), CV_8UC3, cv::Scalar(255, 0, 0));
if(img2.empty()) std::cout << "NG" << std::endl;
else std::cout << "OK" << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment