OpenCV 2.2 Windows XP MinGW 构建在 namedWindow 上崩溃,imshow [英] OpenCV 2.2 Windows XP MinGW build crashes on namedWindow, imshow

查看:18
本文介绍了OpenCV 2.2 Windows XP MinGW 构建在 namedWindow 上崩溃,imshow的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了适用于 Windows 的最新 OpenCV 2.2 源代码,并在 CMake 2.8 的帮助下使用 MinGW 4.4.1 在 Windows XP 上编译.

I downloaded the latest OpenCV 2.2 sources for Windows and compiled on Windows XP using MinGW 4.4.1, with the help of CMake 2.8.

一切顺利,编译(mingw32-make)和安装(mingw32-make install)成功完成.

Everything went smoothly and compilation (mingw32-make) and installation (mingw32-make install) completed successfully.

但是,当我编译一些包含 highgui 的 namedWindow() 和 imshow() 函数的代码时,它编译但程序崩溃了.以下单行代码崩溃:

However, when I compile some code containing namedWindow() and imshow() functions of highgui, it compiles but the program crashes. The following single line of code crashes:

namedWindow("img", CV_WINDOW_AUTOSIZE);

namedWindow("img", CV_WINDOW_AUTOSIZE);

OpenCV 附带的示例程序显示图像也会崩溃.

The sample programs coming with OpenCV, displaying images, also crash.

有没有人遇到过同样的问题,你有解决办法吗?

Have anyone experienced the same problem, and do you have a solution?

我还编译并在 linux (Ubuntu) 上使用 OpenCV 2.2 没有任何问题.

I have also compiled and am using OpenCV 2.2 on linux (Ubuntu) without any problem.

非常感谢.

推荐答案

我也有同样的问题.我在 WindowsXP 下使用 CMake、MSYS-make 和 mingw 构建了 OpenCV 2.2.

I've the same problem. I built OpenCV 2.2 under WindowsXP, using CMake, MSYS-make and mingw.

这里解释了解决方案:mingw32 SSE/SSE2 instabilities

我所做的如下:

  1. 使用 CMake (2.8.4),指定目标目录并为 MSYS 的 make 运行配置".
  2. 在CMAKE_BUILD_TYPE"处键入 Debug.
  3. 删除SSE2"的复选标记.
  4. 再次运行配置".
  5. 运行生成".
  6. 在目标目录运行make.
  7. 运行make install.

这对我有用.

这篇关于OpenCV 2.2 Windows XP MinGW 构建在 namedWindow 上崩溃,imshow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆