OpenCV Error: Insufficient memory (Failed to allocate 542081088 bytes) in cv::OutOfMemoryError

   最近在研究影像拼接代码时,出现了这个问题:OpenCV Error: Insufficient memory (Failed to allocate 542081088 bytes) in cv::OutOfMemoryError,本人操作系统是Win10,VS 2013,OpenCV3.0

OpenCV Error: Insufficient memory (Failed to allocate 542081088 bytes) in cv::OutOfMemoryError_第1张图片

大多数说法是32位VS编译器内存不够,解决方法就是改成X64平台,具体操作流程可以为:

打开配置资源管理器,平台新建项目平台,选择x64

OpenCV Error: Insufficient memory (Failed to allocate 542081088 bytes) in cv::OutOfMemoryError_第2张图片

OpenCV Error: Insufficient memory (Failed to allocate 542081088 bytes) in cv::OutOfMemoryError_第3张图片

在【VC++目录】→【包含目录】添加OpenCV库常需要配置的目录:

OpenCV Error: Insufficient memory (Failed to allocate 542081088 bytes) in cv::OutOfMemoryError_第4张图片

【VC++目录】→【库目录】,此时的路径是x64,vc12 = Visual Studio 2013,vc11 = Visual Studio 2012

OpenCV Error: Insufficient memory (Failed to allocate 542081088 bytes) in cv::OutOfMemoryError_第5张图片

【链接器】→【输入】→【附加依赖项】

opencv_ts300d.lib
opencv_world300d.lib

这是Debug版本的

完成以上操作即可以在Debug版本下的x64平台运行程序了,如有错误,欢迎大家指出。

你可能感兴趣的:(环境配置,编程)