Skip to content
Snippets Groups Projects
Commit 120eb3ff authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Update CMake hopefully to work on windows

parent 6dc0377e
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,8 @@ set(FTL_VERSION "${ftl_VERSION_MAJOR}.${ftl_VERSION_MINOR}.${ftl_VERSION_PATCH}"
add_definitions(-DFTL_VERSION=${FTL_VERSION})
if (WIN32)
set(FTL_CONFIG_ROOT "$ENV{USERPROFILE}/AppData/ftl")
set(FTL_CONFIG_ROOT "\"$ENV{USERPROFILE}/AppData/ftl\"")
message(STATUS "Config root is ${FTL_CONFIG_ROOT}")
set(FTL_CACHE_ROOT "$ENV{USERPROFILE}/AppData/ftl")
set(FTL_DATA_ROOT "$ENV{USERPROFILE}/AppData/ftl")
add_definitions(-DWIN32)
......@@ -38,11 +39,12 @@ endif (WIN32)
if (UNIX)
add_definitions(-DUNIX)
set(FTL_CONFIG_ROOT "\"$ENV{HOME}/.config/ftl\"")
message(STATUS "Config root is ${FTL_CONFIG_ROOT}")
set(FTL_CACHE_ROOT "$ENV{HOME}/.cache/ftl")
set(FTL_DATA_ROOT "$ENV{HOME}/.local/share/ftl")
endif (UNIX)
add_definitions(-DFTL_CONFIG_ROOT=${FTL_CONFIG_ROOT})
add_definitions("-DFTL_CONFIG_ROOT=${FTL_CONFIG_ROOT}")
add_definitions(-DFTL_CACHE_ROOT=${FTL_CACHE_ROOT})
add_definitions(-DFTL_DATA_ROOT=${FTL_DATA_ROOT})
......
......@@ -101,7 +101,7 @@ int main(int argc, char **argv) {
LOG(WARNING) << "Cameras are not calibrated!";
}
int max_disp = 208; //256;
int max_disp = 256; //208;
int wsize = 5;
float sigma = 1.5;
float lambda = 8000.0;
......@@ -137,8 +137,8 @@ int main(int argc, char **argv) {
// TODO Pose and disparity etc here...
// Downscale to half
cv::resize(l, l, cv::Size(l.cols * 0.75,l.rows * 0.75), 0, 0, INTER_LINEAR);
cv::resize(r, r, cv::Size(r.cols * 0.75,r.rows * 0.75), 0, 0, INTER_LINEAR);
//cv::resize(l, l, cv::Size(l.cols * 0.75,l.rows * 0.75), 0, 0, INTER_LINEAR);
//cv::resize(r, r, cv::Size(r.cols * 0.75,r.rows * 0.75), 0, 0, INTER_LINEAR);
cvtColor(l, l, COLOR_BGR2GRAY);
cvtColor(r, r, COLOR_BGR2GRAY);
......@@ -161,7 +161,7 @@ int main(int argc, char **argv) {
cv::imshow("Left",filtered_disp);
//if (lsrc->isStereo()) cv::imshow("Right",right_disp);
if(cv::waitKey(20) == 27){
if(cv::waitKey(1) == 27){
//exit if ESC is pressed
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment