This is what i have: rows = 9208 cols = 15152 cv::Mat img_masked = cv::Mat(sourceImage.rows, sourceImage.cols, sourceImage.type()); Error: OpenCV Error: Insufficient memory (Failed to allocate 418558848 bytes) in cv::OutOfMemoryError, file C:\builds\master_PackSlave-win32-vc11-shared\opencv\modules\core\src\alloc.cpp, line 52 OpenCV Error: Assertion failed (u != 0) in cv::Mat::create, file C:\builds\master_PackSlave-win32-vc11-shared\opencv\modules\core\src\matrix.cpp, line 411
Do you know why? Or how I can do differently?