当前位置: 首页>>代码示例>>C++>>正文


C++ Transporter::transport方法代码示例

本文整理汇总了C++中Transporter::transport方法的典型用法代码示例。如果您正苦于以下问题:C++ Transporter::transport方法的具体用法?C++ Transporter::transport怎么用?C++ Transporter::transport使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Transporter的用法示例。


在下文中一共展示了Transporter::transport方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

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

    //VideoSource vs(false, "./Various.avi");
    VideoSource vs(true, "");

    vs.enableDisplayWindow();

    SupportedImageWidths siw = W512;

    // Left to Right is bottom layer to top
    //uint centroid_counts[]  = {3,3,4,3,3,3,3,5};
    uint centroid_counts[]  = {4,3,5,3,3,2,3,4};
    bool isUniform = true;

    DestinNetworkAlt * network = new DestinNetworkAlt(siw, 8, centroid_counts, isUniform);

    Transporter t;
    vs.grab();//throw away first frame in case its garbage
    int frameCount = 0;

    while(vs.grab()){

        frameCount++;


        t.setSource(vs.getOutput());
        t.transport(); //move video from host to card
        testNan(t.getDest(), 512*512);

        network->doDestin(t.getDest());

        if(frameCount % 2 != 0 ){ //only print every 2rd so display is not so jumpy
            printFPS(false);
            continue;
        }

        // Old clear screen method
        //printf("\033[2J");

        // New clear screen method (might give less flickering...?)
        printf("\033[2J\033[1;1H");

        printf("Frame: %i\n", frameCount);
        printFPS(true);
        int layer = 1;
        Node & n = *network->getNode(layer,0,0);
        printf("Node %i,0,0 winner: %i\n",layer, n.winner);
        printf("Node centroids: %i\n", n.nb);

        printf("Node starv:");
        printFloatArray(n.starv, n.nb);
        printf("Starv coef: %f \n", n.starvCoeff);
        printf("\n");

        // 2013.4.5
        // CZT
        //
        //printf("layer %i node 0 centroid locations:\n", layer);
        //network->printNodeCentroidPositions(layer, 0, 0);
        for(int l = 0 ; l < 8 ; l++){
            printf("belief graph layer: %i\n",l);
            network->printBeliefGraph(l,0,0);
        }

    }

    delete network;
    return 0;
}
开发者ID:BK-University,项目名称:destin,代码行数:69,代码来源:WebcamExp1.cpp


注:本文中的Transporter::transport方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。