Ask Your Question
0

How to use firewire camera with opencv?

asked 2014-02-17 08:33:37 -0600

tiho_bg gravatar image

updated 2014-02-17 08:37:18 -0600

berak gravatar image

Hi

I would like to ask how to use firewire camera with opencv? My camera is progres speedxt core5. Normally it is with USB cable but when I was starting the driver installation on windows 7 x64 it was installed T1394bus driver (driver from thesycon). I have tried to open my camera with the standart code. After build execution there were no errors but in the line: imshow("wind1", frame); the program was stopped. I have checked the call stack and I saw that the program was stopped in >
ntdll.dll!776615de()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]

I have checked the code with a simple webcam and with a specialised usb ueye camera and everything was OK. Unfortunately with the firewire camera it was not possible to work. Could you please help me to resolve the problem. May be it will be necessary to use another software as directshow par example.

Here is my code:

#include <opencv2\core\core.hpp>
#include <opencv2\highgui\highgui.hpp>
#include <opencv2\opencv.hpp>
#include <opencv2\imgproc\imgproc.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main(){

    VideoCapture cap(0);
    cap.open(0);
    if (false)
    {
        return -1;
    }
    namedWindow("wind1", 0);
 Mat frame;  
 while(1)

 {
         cap>>frame;
    imshow("wind1", frame);
         int key = cvWaitKey(1);
    if (key == 27) break;
         }
    return 0;
}
edit retag flag offensive close merge delete

Comments

try : VideoCapture cap(CV_CAP_FIREWIRE + 0);

(also, either use the constructor or the open function. not both)

berak gravatar imageberak ( 2014-02-17 08:39:26 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-02-17 20:23:32 -0600

maria_otago gravatar image

I had the same problem with my UniBrain FireWire cameras. They worked in OpenCV 2.3.0, but don't work in any newer version. I think there might be some problem with the frame format. If your camera streams uncompressed video, OpenCV doesn't know how to handle this video correctly. In the end, I decided to use the camera native API to get frames and then convert them into the OpenCV Mat for processing.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-02-17 08:33:37 -0600

Seen: 1,691 times

Last updated: Feb 17 '14