ARM的OpenCV的错误 [英] Opencv error on ARM

查看:437
本文介绍了ARM的OpenCV的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望有人能帮助我。我有使用OpenCV的库一个C ++文件。
我需要在其中我必须运行一个ARM的可执行文件。我的可执行文件应该是编译静态链接的方式。

我不是一个exepert很抱歉,如果我做一些奇怪,我按照这个步骤进行:

我下载ARM库OpenCV的,我和cmake的建立它,我得到了OpenCV的静态ARM库没有问题。

然后我尝试编译我的C ++文件是这样的:

  ARM-Linux的G ++ -static -o exampleWindows IPCamera.cpp`pkg配置--cflags --libs opencv`

和它的作品,所以我得到了一个可执行文件,我写的:

 可执行文件

和我得到这样的输出:

  ELF 32位LSB的可执行文件,ARM版本1(SYSV),静态链接,为GNU / Linux 2.6.26,不可剥离

所以看起来是好的,是一个ARM格式,是一个静态链接。但是,当我尝试运行我的手臂这个可执行文件正在添加这个错误:

  OpenCV的错误:未指定错误(该功能尚未实现。
 重建与Windows,GTK + 2.x或碳支持库。
 如果您在Ubuntu或Debian的安装libgtk2.0-dev的和pkg配置,
 然后重新运行cmake或cvNamedWindow配置脚本)
 文件/home/jesus/opencv/opencv/modules/highgui/src/window.cpp,行483
 扔CV ::例外的一个实例后终止叫
  什么():/home/jesus/opencv/opencv/modules/highgui/src/window.cpp:483:错误:(-2)的功能尚未实现。
 重建与Windows,GTK + 2.x或碳支持库。如果您在Ubuntu或Debian的安装libgtk2.0-dev的和pkg配置,
 然后重新运行cmake或配置功能cvNamedWindow脚本

那么,我怎么不是专家我试图按照错误信息说什么,所以我donwload的libgtk2.0在我的Ubuntu,然后我又做cmake并作出构建ARM的静态库,但没有什么是解决了。​​

所以,我需要一些帮助,这错误,或告知是什么意思,因为它看起来很简单,但我不知道该怎么办。

下面是我的code:

 的#include<&iostream的GT;
#包括LT&;&pthreads.h中GT;
#包括LT&; opencv2 / opencv.hpp>
#包括LT&; opencv2 / imgproc / imgproc.hpp>
#包括LT&; OpenCV的/ highgui.h>
#包括LT&;&string.h中GT;
#包括LT&;&stdio.h中GT;
#包括LT&;&time.h中GT;使用命名空间std;
使用命名空间的简历;诠释的main()
{
 COUT<<准备就绪<< ENDL;
 CV ::垫架; CV :: namedWindow(前,CV_WINDOW_NORMAL);
 cvMoveWindow(前,0,0);
 cvSetWindowProperty(前,CV_WND_PROP_FULLSCREEN,CV_WINDOW_FULLSCREEN); 返回0;
}

感谢你这么多,我希望someon能帮助我。


解决方案

  1. 运行 ccmake。并启用 WITH_GTK WITH_GTK_2_X

  2. 运行使&放大器;&安培;使安装

  3. ldconfig的

I hope someone can help me. I have a c++ file which use opencv libraries. I need to get an executable for an ARM in which I have to run it. My executable should be compile in a static linker way.

I am not an exepert so sorry If I am doing something weird, I follow this steps:

I download the opencv for ARM libraries, I build it with the cmake and I got the statics opencv ARM libraries without problems.

Then I try to compile my c++ file like this:

 arm-linux-g++ -static -o exampleWindows IPCamera.cpp `pkg-config --cflags --libs opencv`

And it works, so I got an executable, I write:

 file executable 

And I get this output:

  ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux    2.6.26, not stripped

So it seems that is ok, is an ARM format and is a static linked. But when I try to run this executable in my ARM is comming this error:

 OpenCV Error: Unspecified error (The function is not implemented. 
 Rebuild the library with Windows, GTK+ 2.x or Carbon support. 
 If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, 
 then re-run cmake or configure script) in cvNamedWindow, 
 file /home/jesus/opencv/opencv/modules/highgui/src/window.cpp, line 483
 terminate called after throwing an instance of 'cv::Exception'
  what():  /home/jesus/opencv/opencv/modules/highgui/src/window.cpp:483: error: (-2)    The function is not implemented.
 Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or   Debian, install libgtk2.0-dev and pkg-config, 
 then re-run cmake or configure script in function cvNamedWindow

Then how I am not an expert I tried to follow what the error message says, so I donwload the libgtk2.0 in my ubuntu, and then I make again the cmake and make for build the ARM static libraries, but nothing is solved.

So I need some help with this error, or tell what is the meaning, because it seem that is simple but I do not know what to do.

Here is my code:

#include <iostream>
#include <pthread.h>
#include <opencv2/opencv.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv/highgui.h>
#include <string.h>
#include <stdio.h>
#include <time.h>

using namespace std;
using namespace cv;

int main()
{
 cout<<"ready"<<endl;
 cv::Mat frame;

 cv::namedWindow("front", CV_WINDOW_NORMAL);
 cvMoveWindow("front", 0, 0);
 cvSetWindowProperty( "front", CV_WND_PROP_FULLSCREEN, CV_WINDOW_FULLSCREEN);

 return 0;
}

Thank you so much I hope someon could help me.

解决方案

  1. run ccmake . and enable WITH_GTK and WITH_GTK_2_X
  2. run make && make install
  3. ldconfig

这篇关于ARM的OpenCV的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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