1 // This file is part of OpenMVG, an Open Multiple View Geometry C++ library.
2
3 // Copyright (c) 2015 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_PATENTED_SIFT_SIFT_DESCRIBER_IO_HPP
10 #define OPENMVG_PATENTED_SIFT_SIFT_DESCRIBER_IO_HPP
11
12 #include "nonFree/sift/SIFT_describer.hpp"
13
14 #include <cereal/types/polymorphic.hpp>
15
16 template<class Archive>
serialize(Archive & ar)17 void openMVG::features::SIFT_Image_describer::Params::serialize( Archive & ar )
18 {
19 ar(
20 cereal::make_nvp("first_octave", _first_octave),
21 cereal::make_nvp("num_octaves",_num_octaves),
22 cereal::make_nvp("num_scales",_num_scales),
23 cereal::make_nvp("edge_threshold",_edge_threshold),
24 cereal::make_nvp("peak_threshold",_peak_threshold),
25 cereal::make_nvp("root_sift",_root_sift));
26 }
27
28 template<class Archive>
serialize(Archive & ar)29 void openMVG::features::SIFT_Image_describer::serialize( Archive & ar )
30 {
31 ar(
32 cereal::make_nvp("params", _params),
33 cereal::make_nvp("bOrientation", _bOrientation));
34 }
35
36 CEREAL_REGISTER_TYPE_WITH_NAME(openMVG::features::SIFT_Image_describer, "SIFT_Image_describer");
37 CEREAL_REGISTER_POLYMORPHIC_RELATION(openMVG::features::Image_describer, openMVG::features::SIFT_Image_describer)
38
39 #endif // OPENMVG_PATENTED_SIFT_SIFT_DESCRIBER_IO_HPP
40