Skip to content

비전 기반 카메라 위치 추출 및 openGL 연동(openCV, openGL)

License

Notifications You must be signed in to change notification settings

seareale/vision-based-localization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vision-based-localization

OS : Ubuntu 18.04.3 LTS
OpenCV version : 4.1.1
OpenGL version : 4.3

비전 기반 카메라 위치 추출 및 openGL 연동


Required Library

  • assimp

    $ sudo apt-get install libassimp-dev assimp-utils
    $ sudo apt-get install libxmu-dev libxi-dev
  • glfw

    $ sudo apt-get install libglfw3-dev libglfw3
  • glm

    $ sudo apt install libglm-dev

1. ChArUco

  1. make a charucoboard to calibrate
    g++ -o charucoboard charucoboard.cpp $(pkg-config opencv4 --cflags --libs)
    create board.jpg
  2. calibrate
    $ g++ -o calibrate calibrate.cpp $(pkg-config opencv4 --cflags --libs)

    press 'c' 5 or more times. 'ESC' to finish and calibrate. create output.txt

2. Build

  1. In "KnuMakerViewer", $ cmake CMakeLists.txt
  2. create viewer by $ make

Error - 하드웨어 성능 차이

  • GLSL 3.30 is not supported : In ./KnuMarkerViewer/shader/grid.vs, change like this.
    #version 130
    
    // ...
    in vec3 vertexPosition;
    in vec3 vertexColor;
    ...
    In ./KnuMarkerViewer/shader/grid.fs, change like this.
    #version 130
    ...

3. Run

  1. $./viewer
    default - marker ID : 0, threadMode : 0(= false), camera ID : 0

  2. $./viewer (marker ID)
    $./viewer (marker ID) (threadMode)
    $./viewer (marker ID) (threadMode) (cameara ID)

    -> 프레임 향상을 위해 threadMode 활성화 시 1 입력
    -> maker ID : imgui 메뉴로 통합 예정

4. Result

  • 2019.11.12_ 삼각형, 사각형 오브젝트 추가