Skip to content

Commit

Permalink
[build] openMVG_camera module does not longer depends on openMVG_mult…
Browse files Browse the repository at this point in the history
…iview. openMVG#1293

- nor on pre-compiled openMVG_geometry (only the header only geometry/pose3.hpp file is used)
  • Loading branch information
pmoulon committed Jun 14, 2018
1 parent 6b6980a commit 6bf97a2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
24 changes: 12 additions & 12 deletions src/openMVG/cameras/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ set_property(TARGET openMVG_camera APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:include>")

target_compile_features(openMVG_camera INTERFACE ${CXX11_FEATURES})
target_link_libraries(openMVG_camera INTERFACE openMVG_numeric openMVG_geometry)
target_link_libraries(openMVG_camera INTERFACE openMVG_numeric)
install(TARGETS openMVG_camera DESTINATION lib EXPORT openMVG-targets)

add_library(openMVG_camera_test INTERFACE)
target_link_libraries(openMVG_camera_test INTERFACE openMVG_camera openMVG_multiview)
target_include_directories(openMVG_camera_test
INTERFACE $<BUILD_INTERFACE:${CEREAL_INCLUDE_DIRS}>)
UNIT_TEST(openMVG Camera_Pinhole openMVG_camera)

UNIT_TEST(openMVG Camera_IO "openMVG_camera_test;${STLPLUS_LIBRARY}")
UNIT_TEST(openMVG Camera_Pinhole_Radial openMVG_camera)

UNIT_TEST(openMVG Camera_Pinhole "openMVG_camera_test")
UNIT_TEST(openMVG Camera_Pinhole_Brown openMVG_camera)

UNIT_TEST(openMVG Camera_Pinhole_Radial "openMVG_camera_test")
UNIT_TEST(openMVG Camera_Pinhole_Fisheye openMVG_camera)

UNIT_TEST(openMVG Camera_Pinhole_Brown "openMVG_camera_test")
UNIT_TEST(openMVG Camera_Spherical openMVG_camera)

UNIT_TEST(openMVG Camera_Pinhole_Fisheye "openMVG_camera_test")
UNIT_TEST(openMVG Camera_Subset_Parametrization openMVG_camera)

UNIT_TEST(openMVG Camera_Spherical "openMVG_camera_test")
add_library(openMVG_camera_test INTERFACE)
target_link_libraries(openMVG_camera_test INTERFACE openMVG_camera)
target_include_directories(openMVG_camera_test
INTERFACE $<BUILD_INTERFACE:${CEREAL_INCLUDE_DIRS}>)

UNIT_TEST(openMVG Camera_Subset_Parametrization "openMVG_camera_test")
UNIT_TEST(openMVG Camera_IO "openMVG_camera_test;${STLPLUS_LIBRARY}")
5 changes: 1 addition & 4 deletions src/openMVG/cameras/Camera_Pinhole.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "openMVG/cameras/Camera_Common.hpp"
#include "openMVG/cameras/Camera_Intrinsics.hpp"
#include "openMVG/geometry/pose3.hpp"
#include "openMVG/multiview/projection.hpp"
#include "openMVG/numeric/eigen_alias_definition.hpp"

namespace openMVG
Expand Down Expand Up @@ -205,9 +204,7 @@ class Pinhole_Intrinsic : public IntrinsicBase
*/
Mat34 get_projective_equivalent( const geometry::Pose3 & pose ) const override
{
Mat34 P;
P_From_KRt( K(), pose.rotation(), pose.translation(), &P );
return P;
return K_ * (Mat34() << pose.rotation(), pose.translation()).finished();
}


Expand Down

0 comments on commit 6bf97a2

Please sign in to comment.