I edit QtOpenCV project example.I built on PC and for KIT ARM is OK.When I copy file to KIT,telnet to KIT and run with the same error.
[root@FriendlyARM /myApp]# chmod a+rwx QtOpenCV
[root@FriendlyARM /myApp]# ./QtOpenCV -qws
QtOpenCV: main.cpp:13: int main(int, char**): Assertion `camera' failed.
Aborted
[root@FriendlyARM /myApp]# chmod a+rwx QtOpenCV
[root@FriendlyARM /myApp]# ./QtOpenCV -qws
QtOpenCV: main.cpp:13: int main(int, char**): Assertion `camera' failed.
Aborted
To copy to clipboard, switch view to plain text mode
======================================
main.cpp
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <stdio.h>
#include <assert.h>
#include <QApplication>
#include <QWidget>
#include <QVBoxLayout>
#include "QOpenCVWidget.h"
#include "MyCameraWindow.h"
int main(int argc, char **argv) {
CvCapture * camera = cvCaptureFromCAM(-1);
assert(camera);
IplImage * image=cvQueryFrame(camera);
assert(image);
printf("Image depth=%i\n", image->depth);
printf("Image nChannels=%i\n", image->nChannels);
MyCameraWindow *mainWin = new MyCameraWindow(camera);
mainWin->setWindowTitle("OpenCV --> QtImage");
mainWin->show();
int retval = app.exec();
cvReleaseCapture(&camera);
return retval;
}
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <stdio.h>
#include <assert.h>
#include <QApplication>
#include <QWidget>
#include <QVBoxLayout>
#include "QOpenCVWidget.h"
#include "MyCameraWindow.h"
int main(int argc, char **argv) {
CvCapture * camera = cvCaptureFromCAM(-1);
assert(camera);
IplImage * image=cvQueryFrame(camera);
assert(image);
printf("Image depth=%i\n", image->depth);
printf("Image nChannels=%i\n", image->nChannels);
QApplication app(argc, argv);
MyCameraWindow *mainWin = new MyCameraWindow(camera);
mainWin->setWindowTitle("OpenCV --> QtImage");
mainWin->show();
int retval = app.exec();
cvReleaseCapture(&camera);
return retval;
}
To copy to clipboard, switch view to plain text mode
==================================================
Can everybody help me run App use Opencv on KIT ARM
Thanks
I too try cvCreateCameraCapture() function but same this error!
Bookmarks