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

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

问题描述

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

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.

然而,当我编译一些包含namedWindow()和imgu它编译但程序崩溃。以下单行代码崩溃:

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);

示例程序

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

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

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

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

非常感谢。

推荐答案

我有同样的问题。我在WindowsXP下创建了OpenCV 2.2,使用CMake,MSYS-make和mingw。

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

解决方案解释如下: mingw32 SSE / SSE2不稳定性

我做了以下工作: p>

What I have done is the following:


  1. 使用CMake(2.8.4),指定目标目录并为MSYS的make运行Configure。


  2. 在SSE2中删除复选标记。

  3. 在CMAKE_BUILD_TYPE上输入 Debug 再次运行配置。

  4. 运行生成。

  5. 在目标位置运行 make

  1. Use CMake (2.8.4), specify target directory and run "Configure" for MSYS's make.
  2. Type Debug at "CMAKE_BUILD_TYPE".
  3. Remove checkmark for "SSE2".
  4. Run "Configure" again.
  5. Run "Generate".
  6. Run make at target directory.
  7. Run make install.




这对我有用。

This worked for me.

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

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