I'm using your QOpenCVWidget in one of my GPL projects. I'd like to thank you and include your copyright notice in the source files. Could you give me your copyright information please?
i ran your code but it gave me this error:
QtOpenCV: ../QtOpenCV/main.cpp:13: int main(int, char**): Assertion `camera' failed.
The program has unexpectedly finished.
i am using logitech c310 in ubuntu 11.04
have you got a repository where you have the code?
If I want to use it in my software, it would be great to have a git repo, where I can suggest you patches as well?
gitorious? github? google code?
hi, we usually make a proglam using opencv or webcam. when we run the program, it will show the webcam.(put the webcam code in the main.cpp)
now, i want the webcam will be shown after another widget/page.
example, first i have a login page, after i login successfully, i want the webcam is shown.(put the webcam code to another .cpp, like webcam.cpp or capture.cpp)
what should i do?
It works perfectly. Thank you for posting this sample program. I just modified a few lines for creating a fisiogram viewer.
Obviously my modification will be under GPL and I will mention you.
Thanks again. Good Job!
Compile program without problems. But whe i'm trying to run program i get:
QtOpenCV: ../QtOpenCV/main.cpp:13: int main(int, char**): Assertion `camera' failed.
The program has unexpectedly finished.
hello.. .i've tried to debug this code in my PC, but this following error occur,
C:\Qt\2010.05\QtOpenCV-build-desktop\debug\QtOpenCV.exe exited with code -1073741515
is there any idea ? thanks before
Hi,
Every time I want compile your Code, I get these Errors:
cannot find -lcv
cannot find -lhighgui
collect2: ld returned 1 exit status
I have all headerfiles in the right Directory. Does anyone have an Idea?
Greez Tectz
I replace your algorithm with this two lines....
IplImage *cvimage = cvQueryFrame(camera);
image = QImage((const uchar *)cvimage->imageData, cvimage->width, cvimage->height, QImage::Format_RGB888).rgbSwapped();
Hallo,
I have downloaded the code and tried to extend it in which I added two buttons "START RECORDING" and "STOP RECORDING" recording. When I pressed the "START RECORDING" button, i start another timer in which I capture the frame and save it in a QQueue<QQueue<IplImage*> imageQueue.
It has worked, it seems.
Now when I press the "STOP RECODING" Button, i tried to write the capture to a video file.
following is the code:
void MyCameraWindow::StopRec()
{
InitializeWrite();
IplImage* img = 0;
for (int i=0 ;i<imageQueue.length();i++)
{
img=imageQueue.dequeue();
cvWriteFrame(writer,img);
cvWaitKey(20);
}
tmrStart->stop();
btnStartRecording->setVisible(true);
btnStopRecording->setEnabled(false);
}
void MyCameraWindow::InitializeWrite()
{
writer = 0;
int isColor = 1;
int fps = 25;
int frameW = 640;
int frameH = 480;
writer=cvCreateVideoWriter("out.avi",CV_FOURCC('P','I','M','1'),
fps,cvSize(frameW,frameH),isColor);
}
when I debug step by step the code works until cvWriteFrame(writer,img);
I have checked the writer is not null and the img as well. when I execute cvWriteFrame(writer,img ), I get the error in qglobal.h file on line 2188.
please help.
Roy
HI,
I want to Stream multiple IP Cameras. My camera's are connected to a Switch
(4 cameras) and my hardware (a i.MX27 based ) is also connected to switch. the hardware codec is integrated with gstreamer plugins. we can successfully stream single camera. But we need to stream all 4 cameras and create a quad view on 7 inch tft display. Our hardware video codes supports 4 channels where we can all 4 channels simultaneously.
Please throw some light on this.
hi, I'm running example and capture frame size isn't changing, it seems to me that cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH, 640); does nothing. Or have I missed something?
Thanks for any reply.
I builded my project. Done
I runs. It appears a very strange bugs
Quote:
Starting C:/Documents and Settings/Mr. Diego/My Documents/QtOpenCV/debug/QtOpenCV.exe...
C:/Documents and Settings/Mr. Diego/My Documents/QtOpenCV/debug/QtOpenCV.exe exited with code -1072365566
What happens with me ? Please help me.
Thanks in advance.
Diego
I builded my project. Done
I runs. It appears a very strange bugs
Quote:
Starting C:/Documents and Settings/Mr. Diego/My Documents/QtOpenCV/debug/QtOpenCV.exe...
C:/Documents and Settings/Mr. Diego/My Documents/QtOpenCV/debug/QtOpenCV.exe exited with code -1072365566
What happens with me ? Please help me.
Thanks in advance.
Diego
Ratings & Comments
21 Comments
I'm using your QOpenCVWidget in one of my GPL projects. I'd like to thank you and include your copyright notice in the source files. Could you give me your copyright information please?
i ran your code but it gave me this error: QtOpenCV: ../QtOpenCV/main.cpp:13: int main(int, char**): Assertion `camera' failed. The program has unexpectedly finished. i am using logitech c310 in ubuntu 11.04
have you got a repository where you have the code? If I want to use it in my software, it would be great to have a git repo, where I can suggest you patches as well? gitorious? github? google code?
hi, we usually make a proglam using opencv or webcam. when we run the program, it will show the webcam.(put the webcam code in the main.cpp) now, i want the webcam will be shown after another widget/page. example, first i have a login page, after i login successfully, i want the webcam is shown.(put the webcam code to another .cpp, like webcam.cpp or capture.cpp) what should i do?
It works perfectly. Thank you for posting this sample program. I just modified a few lines for creating a fisiogram viewer. Obviously my modification will be under GPL and I will mention you. Thanks again. Good Job!
Compile program without problems. But whe i'm trying to run program i get: QtOpenCV: ../QtOpenCV/main.cpp:13: int main(int, char**): Assertion `camera' failed. The program has unexpectedly finished.
hello.. .i've tried to debug this code in my PC, but this following error occur, C:\Qt\2010.05\QtOpenCV-build-desktop\debug\QtOpenCV.exe exited with code -1073741515 is there any idea ? thanks before
Hi, Every time I want compile your Code, I get these Errors: cannot find -lcv cannot find -lhighgui collect2: ld returned 1 exit status I have all headerfiles in the right Directory. Does anyone have an Idea? Greez Tectz
Your problem is with the opencv libraries, not the include files, but I guess you already figured it out.
I'm trying to staticaly linking the OpenCV library with this application in Windows but it doesn't work... Whit shared librarys all is fine...
I replace your algorithm with this two lines.... IplImage *cvimage = cvQueryFrame(camera); image = QImage((const uchar *)cvimage->imageData, cvimage->width, cvimage->height, QImage::Format_RGB888).rgbSwapped();
Hallo, I have downloaded the code and tried to extend it in which I added two buttons "START RECORDING" and "STOP RECORDING" recording. When I pressed the "START RECORDING" button, i start another timer in which I capture the frame and save it in a QQueue<QQueue<IplImage*> imageQueue. It has worked, it seems. Now when I press the "STOP RECODING" Button, i tried to write the capture to a video file. following is the code: void MyCameraWindow::StopRec() { InitializeWrite(); IplImage* img = 0; for (int i=0 ;i<imageQueue.length();i++) { img=imageQueue.dequeue(); cvWriteFrame(writer,img); cvWaitKey(20); } tmrStart->stop(); btnStartRecording->setVisible(true); btnStopRecording->setEnabled(false); } void MyCameraWindow::InitializeWrite() { writer = 0; int isColor = 1; int fps = 25; int frameW = 640; int frameH = 480; writer=cvCreateVideoWriter("out.avi",CV_FOURCC('P','I','M','1'), fps,cvSize(frameW,frameH),isColor); } when I debug step by step the code works until cvWriteFrame(writer,img); I have checked the writer is not null and the img as well. when I execute cvWriteFrame(writer,img ), I get the error in qglobal.h file on line 2188. please help. Roy
Got it to build and work on my system. What I did is documented here: http://www.qtcentre.org/forum/f-newbie-4/t-qt-connect-logitech-webcam-21945-post113678.html#post113678 cheers Carl
HI, I want to Stream multiple IP Cameras. My camera's are connected to a Switch (4 cameras) and my hardware (a i.MX27 based ) is also connected to switch. the hardware codec is integrated with gstreamer plugins. we can successfully stream single camera. But we need to stream all 4 cameras and create a quad view on 7 inch tft display. Our hardware video codes supports 4 channels where we can all 4 channels simultaneously. Please throw some light on this.
hi, I'm running example and capture frame size isn't changing, it seems to me that cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH, 640); does nothing. Or have I missed something? Thanks for any reply.
if(size == Size640) { cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH, 640); cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT, 480); qDebug() << "Setting 640x480:CV_CAP_PROP_FRAME_WIDTH:" << cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH); qDebug() << "Setting 640x480CV_CAP_PROP_FRAME_HEIGHT:" << cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT); } returns: Setting 640x480:CV_CAP_PROP_FRAME_WIDTH: 320 Setting 640x480CV_CAP_PROP_FRAME_HEIGHT: 240
Looks like your camera does not support these resolutions? I think it is an opencv issue.
Hi all. I am starting working with camera. I went to here and downloaded source code http://www.qt-apps.org/content/show.php/Qt+Opencv+webcam+viewer?content=89995 Continued : I installed Qt and OpenCV on my computer I changed my.pro file Quote:
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += "C:\OpenCV\cxcore\include" \
"C:\OpenCV\cv\include" \
"C:\OpenCV\cvaux\include"
win32 {
LIBS += -L"C:\OpenCV\lib"
}
LIBS += -lcv -lhighgui
SOURCES += main.cpp QOpenCVWidget.cpp MyCameraWindow.cpp
HEADERS += QOpenCVWidget.cpp MyCameraWindow.h
I builded my project. Done
I runs. It appears a very strange bugs
Quote:
Starting C:/Documents and Settings/Mr. Diego/My Documents/QtOpenCV/debug/QtOpenCV.exe...
C:/Documents and Settings/Mr. Diego/My Documents/QtOpenCV/debug/QtOpenCV.exe exited with code -1072365566
What happens with me ? Please help me.
Thanks in advance.
Diego
Hi all. I am starting working with camera. I went to here and downloaded source code http://www.qt-apps.org/content/show.php/Qt+Opencv+webcam+viewer?content=89995 Continued : I installed Qt and OpenCV on my computer I changed my.pro file Quote:
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += "C:\OpenCV\cxcore\include" \
"C:\OpenCV\cv\include" \
"C:\OpenCV\cvaux\include"
win32 {
LIBS += -L"C:\OpenCV\lib"
}
LIBS += -lcv -lhighgui
SOURCES += main.cpp QOpenCVWidget.cpp MyCameraWindow.cpp
HEADERS += QOpenCVWidget.cpp MyCameraWindow.h
I builded my project. Done
I runs. It appears a very strange bugs
Quote:
Starting C:/Documents and Settings/Mr. Diego/My Documents/QtOpenCV/debug/QtOpenCV.exe...
C:/Documents and Settings/Mr. Diego/My Documents/QtOpenCV/debug/QtOpenCV.exe exited with code -1072365566
What happens with me ? Please help me.
Thanks in advance.
Diego
Thanks for the simple tutorial, exactly what I need as a starter. What will be your next step?
What would you like to see next?