1 // This file is part of OpenMVG, an Open Multiple View Geometry C++ library. 2 3 // Copyright (c) 2015 Sida Li, Pierre Moulon. 4 5 // This Source Code Form is subject to the terms of the Mozilla Public 6 // License, v. 2.0. If a copy of the MPL was not distributed with this 7 // file, You can obtain one at http://mozilla.org/MPL/2.0/. 8 9 #ifndef OPENMVG_CAMERAS_CAMERA_PINHOLE_BROWN_IO_HPP 10 #define OPENMVG_CAMERAS_CAMERA_PINHOLE_BROWN_IO_HPP 11 12 #include "openMVG/cameras/Camera_Pinhole_Brown.hpp" 13 14 #include <cereal/types/polymorphic.hpp> 15 #include <cereal/types/vector.hpp> 16 17 template <class Archive> save(Archive & ar) const18inline void openMVG::cameras::Pinhole_Intrinsic_Brown_T2::save( Archive & ar ) const 19 { 20 Pinhole_Intrinsic::save( ar ); 21 ar( cereal::make_nvp( "disto_t2", params_ ) ); 22 } 23 24 template <class Archive> load(Archive & ar)25inline void openMVG::cameras::Pinhole_Intrinsic_Brown_T2::load( Archive & ar ) 26 { 27 Pinhole_Intrinsic::load( ar ); 28 ar( cereal::make_nvp( "disto_t2", params_ ) ); 29 } 30 31 CEREAL_REGISTER_TYPE_WITH_NAME( openMVG::cameras::Pinhole_Intrinsic_Brown_T2, "pinhole_brown_t2" ); 32 CEREAL_REGISTER_POLYMORPHIC_RELATION(openMVG::cameras::IntrinsicBase, openMVG::cameras::Pinhole_Intrinsic_Brown_T2) 33 34 #endif // #ifndef OPENMVG_CAMERAS_CAMERA_PINHOLE_BROWN_IO_HPP 35 36