最近在研究影像拼接代码时,出现了这个问题: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

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

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

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

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

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

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

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

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

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

opencv_ts300d.lib
opencv_world300d.lib

这是Debug版本的

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

相关文章:

  • 2021-09-23
  • 2021-09-18
  • 2022-12-23
  • 2021-12-01
  • 2021-10-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
相关资源
相似解决方案