【问题标题】:Using Camera Config Files in Sapera ++在 Sapera ++ 中使用相机配置文件
【发布时间】:2017-03-03 04:51:12
【问题描述】:

我目前在使用 Sapera ++ API 的当前项目中使用 Sapera LT 相机配置文件 (.ccf) 时遇到问题。到目前为止,我可以在使用默认设置时从相机获得输出,但默认设置意味着我的相机(genie Nano-C 1280)使输入单色。因此,我想使用一个将相机设置为彩色的配置文件。配置文件适用于 Saperas 的 CamExpert 工具,但到目前为止不适用于我的代码,这是我迄今为止尝试过的。

//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

使用默认设置时,我连接到相机,但我的其他尝试并没有做到那么远。对于我还能做什么/尝试让这台相机返回彩色帧,我有点坚持。任何帮助都会提前感谢!

【问题讨论】:

    标签: visual-studio image-processing visual-c++ camera sapera


    【解决方案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);
    

    确实适用于加载 .ccf 文件,只是为了记住在使用 std 命名空间对我们所有的反斜杠加倍时。为了从 Teledyne Dalsa 相机中获取 RBG 格式,您需要先加载适当的固件。我希望这对您和我一样有帮助。

    【讨论】:

    • 您能否提供标准的 C++ 代码来从 Teledyne Dalsa 抓取并保存一个简单的图像?任何帮助将不胜感激
    • @Lossofhumanidentity 查看如何拍摄图像:stackoverflow.com/questions/54591304
    猜你喜欢
    • 1970-01-01
    • 2017-05-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-02
    • 2016-02-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多