Commit c8ed2927 authored by Patrik Huber's avatar Patrik Huber

Initial version of fit-model-ceres app

* Fits the pose (camera) to landmarks using the newly added Ceres cost functions
* Added find_package(Ceres) to CMakeLists.txt
parent 9b17ea9b
...@@ -33,10 +33,19 @@ if(MSVC) ...@@ -33,10 +33,19 @@ if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
endif() endif()
# Find Ceres, for the fit-model-ceres app:
find_package(Ceres REQUIRED)
message(STATUS "Ceres locations: Headers: ${CERES_INCLUDE_DIRS} Library: ${CERES_LIBRARIES}")
include_directories(${CERES_INCLUDE_DIRS})
# Model fitting (affine cam & shape to landmarks) example: # Model fitting (affine cam & shape to landmarks) example:
add_executable(fit-model fit-model.cpp) add_executable(fit-model fit-model.cpp)
target_link_libraries(fit-model ${OpenCV_LIBS} ${Boost_LIBRARIES}) target_link_libraries(fit-model ${OpenCV_LIBS} ${Boost_LIBRARIES})
# Single and multi-image non-linear model fitting with Ceres example:
add_executable(fit-model-ceres fit-model-ceres.cpp)
target_link_libraries(fit-model-ceres ${CERES_LIBRARIES} ${OpenCV_LIBS} ${Boost_LIBRARIES})
# Generate random samples from the model: # Generate random samples from the model:
add_executable(generate-obj generate-obj.cpp) add_executable(generate-obj generate-obj.cpp)
target_link_libraries(generate-obj ${OpenCV_LIBS} ${Boost_LIBRARIES}) target_link_libraries(generate-obj ${OpenCV_LIBS} ${Boost_LIBRARIES})
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment