initial commit
This commit is contained in:
commit
e505acdb29
41 changed files with 2922 additions and 0 deletions
36
exe/CMakeLists.txt
Normal file
36
exe/CMakeLists.txt
Normal file
|
@ -0,0 +1,36 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
project(OpenGazeExe VERSION 1.0)
|
||||
|
||||
set(OPENGAZE_DIR "$ENV{HOME}/OpenGaze")
|
||||
|
||||
add_definitions(-DOPENGAZE_DIR="${CMAKE_SOURCE_DIR}")
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/)
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
find_package( OpenCV 3.1 REQUIRED COMPONENTS calib3d highgui objdetect imgproc core)
|
||||
|
||||
# Boost, for reading configuration file
|
||||
find_package(Boost 1.5 COMPONENTS system filesystem timer thread program_options REQUIRED)
|
||||
set(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR} ${Boost_INCLUDE_DIR}/boost)
|
||||
|
||||
include_directories(/usr/local/include/opengaze /usr/local/cuda/include ${OpenCV_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
|
||||
link_directories(/usr/lib /usr/local/lib /usr/local/cuda/lib64 ${Boost_LIBRARY_DIRS} ${OPENGAZE_DIR}/3rdParty)
|
||||
|
||||
## -lX11 is for getting screen resolution in pixel in the Linux system
|
||||
set(LIBS opengaze LandmarkDetector ${OpenCV_LIBS} ${Boost_LIBRARIES} tbb openblas dlib lmdb glog caffe X11)
|
||||
|
||||
add_executable(GazeVisualization GazeVisualization.cpp)
|
||||
target_link_libraries(GazeVisualization ${LIBS})
|
||||
|
||||
add_executable(Calibration Calibration.cpp)
|
||||
target_link_libraries(Calibration ${LIBS})
|
||||
|
||||
add_executable(GazeEstimation GazeEstimation.cpp)
|
||||
target_link_libraries(GazeEstimation ${LIBS})
|
||||
|
||||
add_executable(DataExtraction DataExtraction.cpp)
|
||||
target_link_libraries(DataExtraction ${LIBS})
|
29
exe/Calibration.cpp
Normal file
29
exe/Calibration.cpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
#include "opengaze/opengaze.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace opengaze;
|
||||
|
||||
vector<string> get_arguments(int argc, char **argv) {
|
||||
vector<string> arguments;
|
||||
for (int i = 0; i < argc; ++i){
|
||||
arguments.emplace_back(string(argv[i]));
|
||||
}
|
||||
return arguments;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
vector<string> arguments = get_arguments(argc, argv);
|
||||
OpenGaze open_gaze(argc, argv);
|
||||
int num_calibration_point = 20;
|
||||
open_gaze.runPersonalCalibration(num_calibration_point);
|
||||
|
||||
return 1;
|
||||
}
|
28
exe/DataExtraction.cpp
Normal file
28
exe/DataExtraction.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
#include "opengaze/opengaze.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace opengaze;
|
||||
|
||||
vector<string> get_arguments(int argc, char **argv) {
|
||||
vector<string> arguments;
|
||||
for (int i = 0; i < argc; ++i){
|
||||
arguments.emplace_back(string(argv[i]));
|
||||
}
|
||||
return arguments;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
vector<string> arguments = get_arguments(argc, argv);
|
||||
OpenGaze open_gaze(argc, argv);
|
||||
open_gaze.runDataExtraction();
|
||||
|
||||
return 1;
|
||||
}
|
28
exe/GazeEstimation.cpp
Normal file
28
exe/GazeEstimation.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
#include "opengaze/opengaze.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace opengaze;
|
||||
|
||||
vector<string> get_arguments(int argc, char **argv) {
|
||||
vector<string> arguments;
|
||||
for (int i = 0; i < argc; ++i){
|
||||
arguments.emplace_back(string(argv[i]));
|
||||
}
|
||||
return arguments;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
vector<string> arguments = get_arguments(argc, argv);
|
||||
OpenGaze open_gaze(argc, argv);
|
||||
open_gaze.runGazeOnScreen();
|
||||
|
||||
return 1;
|
||||
}
|
28
exe/GazeVisualization.cpp
Normal file
28
exe/GazeVisualization.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
#include "opengaze/opengaze.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace opengaze;
|
||||
|
||||
vector<string> get_arguments(int argc, char **argv) {
|
||||
vector<string> arguments;
|
||||
for (int i = 0; i < argc; ++i){
|
||||
arguments.emplace_back(string(argv[i]));
|
||||
}
|
||||
return arguments;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
vector<string> arguments = get_arguments(argc, argv);
|
||||
OpenGaze open_gaze(argc, argv);
|
||||
open_gaze.runGazeVisualization();
|
||||
|
||||
return 1;
|
||||
}
|
BIN
exe/test.mp4
Normal file
BIN
exe/test.mp4
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue