Using Camera Config Files in Sapera ++

1.3k views Asked by At

I am currently having trouble with using Sapera LT camera config files (.ccf) with my current project that uses the Sapera ++ API. so far I can get output from a camera when using the default settings, but the default settings mean that my camera (genie Nano-C 1280) makes the input monochromatic. as such, I wanted to use a configuration file that would set the camera to color. the configuration file works with Saperas' CamExpert tool but so far not with my code, here is what I have tried so far.

//default example
    char serverName[CORSERVER_MAX_STRLEN];
        cameraName(serverName);
        printf("/n starting : %s ", serverName);
        if (serverName) {
            SapAcqDevice *camera = new SapAcqDevice(serverName, FALSE);
            //blah rest of code

        // failed attempt 1 
    char serverName[CORSERVER_MAX_STRLEN];
        const char settings[] = "C:\\Program Files\\Teledyne DALSA\\Sapera\CamFiles\\User\\T_Nano-C1280_Night.ccf";
        cameraName(serverName);
        printf("/n starting : %s ", serverName);
        if (serverName) {
            SapAcqDevice *camera = new SapAcqDevice(serverName, settings);
            //blah rest of code

    //failed attempt 2 
    char serverName[CORSERVER_MAX_STRLEN];
        const char settings[] = "T_Nano-C1280_Night.ccf";
        cameraName(serverName);
        printf("/n starting : %s ", serverName);
        if (serverName) {
            SapAcqDevice *camera = new SapAcqDevice(serverName, settings);
            //blah rest of code

when using the default I connect to the camera but my other attempst don't make it that far. I am a bit stuck as to what else I could do/try to get this camera returning frames in colour. any help would be apreciated thanks in advance!

1

There are 1 answers

2
Griddle On

ok So figured it out the answer, it shows I made a kinda of silly mistakes on two accounts. the first one being that:

char serverName[CORSERVER_MAX_STRLEN];
        const char settings[] = "C:\\Program Files\\Teledyne DALSA\\Sapera\\CamFiles\\User\\T_Nano-C1280_Night.ccf";
        cameraName(serverName);
        printf("/n starting : %s ", serverName);
        if (serverName) {
            SapAcqDevice *camera = new SapAcqDevice(serverName, settings);

does work for loading a .ccf file just to remember that when using std namespace to double up on ALL of our backward slashes. in order to get RBG format out of your Teledyne Dalsa camera you need to load the appropriate firmware first. I hope this helps you as much as it has me.