소스는 아래와 같다.<접기 or 펼치기 참조>


  • 배경(BgImg)와 현재 입력 이미지의 픽셀 차 값이 fgThreshold 이상인 것만 우믹이는 물체로 본다.
  • 영상 분야에서 움직이는 물체를 구분하는 방법중 가장 쉬운 방법이기도 하다.
  • 초기 값으로 다음과 같다.
    • fgThreshold    = 16
    • minBlobSize    = 0
  • OpenTLD 기본 설정에서는 ForegroundDetector를 사용하지 않는다.
  • DetectionResult *detectionResult는 왜 있지???



'STUDY > OpenTLD' 카테고리의 다른 글

[Class]Main  (0) 2014.04.01
main  (0) 2014.04.01
설치  (0) 2014.04.01



#include "TLD.h"

#include "ImAcq.h"

#include "Gui.h"


위의 항목들을 불러온다.




class Main

{

public:

    tld::TLD *tld;

    ImAcq *imAcq;

    tld::Gui *gui;

    bool showOutput;

bool showTrajectory;

int trajectoryLength;

    const char *printResults;

    const char *saveDir;

    double threshold;

    bool showForeground;

    bool showNotConfident;

    bool selectManually;

    int *initialBB;

    bool reinit;

    bool exportModelAfterRun;

    bool loadModel;

    const char *modelPath;

    const char *modelExportFile;

    int seed;


    Main()

    {

        tld = new tld::TLD();

        showOutput = 1;

        printResults = NULL;

        saveDir = ".";

        threshold = 0.5;

        showForeground = 0;


showTrajectory = false;

trajectoryLength = 0;


        selectManually = 0;


        initialBB = NULL;

        showNotConfident = true;


        reinit = 0;


        loadModel = false;


        exportModelAfterRun = false;

        modelExportFile = "model";

        seed = 0;


        gui = NULL;

        modelPath = NULL;

        imAcq = NULL;

    }


    ~Main()

    {

        delete tld;

        imAcqFree(imAcq);

    }


    void doWork();

};


TLD를 컨트롤 하는 메인 소스코드이다. 간단하군....



'STUDY > OpenTLD' 카테고리의 다른 글

[Class]ForegroundDetector  (0) 2014.04.12
main  (0) 2014.04.01
설치  (0) 2014.04.01


/*  Copyright 2011 AIT Austrian Institute of Technology

*

*   This file is part of OpenTLD.

*

*   OpenTLD is free software: you can redistribute it and/or modify

*   it under the terms of the GNU General Public License as published by

*    the Free Software Foundation, either version 3 of the License, or

*   (at your option) any later version.

*

*   OpenTLD is distributed in the hope that it will be useful,

*   but WITHOUT ANY WARRANTY; without even the implied warranty of

*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

*   GNU General Public License for more details.

*

*   You should have received a copy of the GNU General Public License

*   along with OpenTLD.  If not, see <http://www.gnu.org/licenses/>.

*

*/


/**

  * @author Georg Nebehay

  */


#include "Main.h"

#include "Config.h"

#include "ImAcq.h"

#include "Gui.h"


using tld::Config;

using tld::Gui;

using tld::Settings;


int main(int argc, char **argv)

{


    Main *main = new Main();

    Config config;

    ImAcq *imAcq = imAcqAlloc();

    Gui *gui = new Gui();


    main->gui = gui;

    main->imAcq = imAcq;


    if(config.init(argc, argv) == PROGRAM_EXIT)

    {

        return EXIT_FAILURE;

    }


    config.configure(main);


    srand(main->seed);


    imAcqInit(imAcq);


    if(main->showOutput)

    {

        gui->init();

    }


    main->doWork();


    delete main;

    main = NULL;

    delete gui;

    gui = NULL;


    return EXIT_SUCCESS;

}




메인 소스 코드는 위와같이 간단하다!

'STUDY > OpenTLD' 카테고리의 다른 글

[Class]ForegroundDetector  (0) 2014.04.12
[Class]Main  (0) 2014.04.01
설치  (0) 2014.04.01

+ Recent posts