A Photography forum. PhotoBanter.com

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PhotoBanter.com forum » Digital Photography » Digital Photography
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Problem using CMU driver with PGR camera



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old June 18th 07, 07:25 PM posted to rec.photo.digital
[email protected]
external usenet poster
 
Posts: 1
Default Problem using CMU driver with PGR camera

Hi,

I have used the CMU camera driver for the 1394 spec with Matlab before
and have been able to use the PGR DragonFly for live image streaming.
There was no problem then.

I am using the same driver now with only Visual C++ (MS VS 2005) but
am not able to get this camera working with my code. The code works
fine with other cameras but not this one. It cant initialise this type
of camera. The demo that comes with CMU runs the camera in its RAW
Bayer format ( i.e. black and white with the dots). I think it may be
a bayersensoralignment problem but havent been able to work out how to
rectify this. Ive extracted bits from the code and pasted them
below.:


#include "stdafx.h"
#include "cv.h"
#include "highgui.h"
#include "cxcore.h"
#include "cvaux.h"
#include "1394camera.h"

#define CAM_RES_WIDTH 640
#define CAM_RES_HEIGHT 480
#define CAM_RES_CHANNELS 3


int main( int argc, char** argv )
{


// Camera initialisation


C1394Camera cam0;


// cam1.RefreshCameraList();


cam0.RefreshCameraList();
cam0.SelectCamera(0);


if(cam0.InitCamera() != CAM_SUCCESS)
{
printf("\nInitialization failed .");
return 1;
}
if(cam0.SetVideoFormat(0) != CAM_SUCCESS)
{
printf("\nCould not set video format.");
return 1;
}
if(cam0.SetVideoMode(2) != CAM_SUCCESS)
{
printf("\nCould not set video mode.");
return 1;
}
if(cam0.SetVideoFrameRate(4) != CAM_SUCCESS)
{
printf("\nCould not set frame rate.");
return 1;
}
if(cam0.StartImageAcquisition() != CAM_SUCCESS)
{
printf("\nCould not start image acquisation.");
return 1;
}


cvWaitKey(1000);

cvNamedWindow( "Live Input",1);
HWND hWnD =reinterpret_castHWND(cvGetWindowHandle( "Live
Input" ));
CameraControlDialog(hWnD,&cam0,TRUE);

// declaring image pointer (OPENCV)
IplImage *I1 =
cvCreateImage( cvSize(CAM_RES_WIDTH,CAM_RES_HEIGHT),
8U,CAM_RES_CHANNELS);

//acquire image ...
while (j==1)
{


if(cam0.AcquireImage() != CAM_SUCCESS)
{
printf("\nCould not acquire image. from cam0");
return 1;
}



cam0.getRGB((unsigned char*)(I1-imageData),
(CAM_RES_WIDTH*CAM_RES_HEIGHT*CAM_RES_CHANNELS));

cvShowImage("Live Input", I1);
}

}
--------------

I have tried various combinations of values in the intialisation bit .
It just fails to initialise giving the error in the printf bit above,
i.e. first step, which is

if(cam0.InitCamera() != CAM_SUCCESS)
{
printf("\nInitialization failed .");
return 1;
}

Any advice on this will be helpful.


Thank you,
Saad Choudri

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need a device driver for a digital camera John Fredrickson Digital Photography 4 January 16th 06 12:25 AM
Vivitar Camera Driver Jerry Digital Photography 0 October 27th 05 02:22 PM
Fuji finepix A330 Driver problem (I think) - help please! dab828 Digital Photography 3 October 31st 04 10:20 PM
Canon EOS 10D TWAIN driver problem on Win98SE Duane Stevens Digital Photography 0 July 23rd 04 05:56 AM
Driver needed for mini camera. John Ingram Digital Photography 2 June 30th 04 02:24 AM


All times are GMT +1. The time now is 08:47 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright 2004-2022 PhotoBanter.com.
The comments are property of their posters.