Controlling settings for a Fire-i

Hi
I have a Fire-i camera and i need to control settings like gamma, shutter, black level… Does anybody have experience with this and/or a piece of oF code? I can imagine this has been done quite a few times.

I’ve read this thread: http://forum.openframeworks.cc/t/problem-using-1394-cam-with-of/831/0 about the IPL98 and CMU1934 libraries, but maybe there is something more up to date? Maybe even something more Fire-i specific?

Thanks
/cj

If you are on Linux then you can use coriander to control these values. It will save them to the device but next time you power up the camera these will be lost.
Not sure about other platforms, surely someone knows…

Hey Pierre,
thanks
but im on windows
:slight_smile:
/cj

I am not sure if this is what you are trying to achieve, but if you put this it will open a window when you press p, where you will be able to change camera configuration.

  
void testApp::keyPress(int key){  
    if(key=='p'){  
        vidGrabber.videoSettings();  
    }  
}  

I am using the same camera in xcode mac.

Oh,
Maybe i didn’t express my problem very clear.
I need to be able to do

  
  
camera.gamma = 1.f;  
camera.sharpness = 0.f;  
  

so that i can load values from an xml-file and not recalibrate the camera everytime the installation restarts. There is this SDK for the Fire-i, but it costs money, no? Did anyone use that? Is it worth the money?

/cj

Hi Windows guy :stuck_out_tongue:

Actually libdc1394 that Coriander uses is rumoured to have alpha windows support…if you were very brave you could check it out. The API has full control over camera values. Libdc1394 can also be compiled for OSX.
http://damien.douxchamps.net/ieee1394/coriander/
http://damien.douxchamps.net/ieee1394/libdc1394/

Don’t you get the unibrain SDK with a camera? I’m on mac so never looked into it, but as far as I remember you get the SDK with the camera and it will let you do whatever you want (on windows)

for longterm a cross platform / cross camera solution would be ace of course :stuck_out_tongue:

Hi,
If anybody else will ever have this need, the code i came up with is here: http://www.carljohanrosen.com/share/cjxFireiCamera.zip

It’s a small addon based on the ub1394 library by unibrain. The unibrain examples are all based on VisualStudio and the whole Windows/DirectShow SDK, but this one is compleately DirectShow free and made for CodeBlocks/GCC. (Would that mean this works under Linux?) To use it do something like this:

  
  
// in startup  
cjxFireiCamera* pCamera = new cjxFireiCamera();  
pCamera->ListDevices();  
pCamera->OpenCamera(0);  
pCamera->SetGamma(0);  
pCamera->SetBlackLevel(200);  
  
// in update  
pCamera->Update();  
if (pCamera->IsFrameNew())  
    ?? = pCamera->GetPixels(); /// returns an array of gray pixels  
  
// on close  
delete pCamera;  
  

The code is desigend for ONE camera. Creating two instances will probably not work, but I think it would be possible to make it work.

The Firei updating is threaded and uses Windows-style threading, but can probably also be exhanged for ofxThread or Poco threads.

The only Firewire camera i have is the Fire-i B/W board camera, therefore this class only supports grayscale images for now. And also only SetXXX(int) for properties that apply to this camera are implemented.

Oh, i forgot to mention that i did some changes in the FireiTypes.h which is part of the FireiAPI to make it work with CodeBlocks. But the rest of the files in the API are untouched.

Would love to hear if someone improves this!
/cj