15Bundle::Feature3D::contains_view_id (
int id)
const
17 for (std::size_t i = 0; i < this->refs.size(); ++i)
18 if (this->refs[i].view_id ==
id)
26Bundle::get_byte_size (
void)
const
29 ret += this->cameras.capacity() *
sizeof(
CameraInfo);
30 ret += this->features.capacity() *
sizeof(
Feature3D);
31 for (std::size_t i = 0; i < this->features.size(); ++i)
32 ret += this->features[i].refs.capacity() *
sizeof(
Feature2D);
39Bundle::get_num_cameras (
void)
const
41 return this->cameras.size();
47Bundle::get_num_valid_cameras (
void)
const
50 for (std::size_t i = 0; i < this->cameras.size(); ++i)
51 ret += (this->cameras[i].flen != 0.0f ? 1 : 0);
58Bundle::get_features_as_mesh (
void)
const
63 for (std::size_t i = 0; i < this->features.size(); ++i)
75Bundle::delete_camera (std::size_t index)
77 if (index >= this->cameras.size())
78 throw std::invalid_argument(
"Invalid camera index");
81 this->cameras[index].flen = 0.0f;
84 for (std::size_t i = 0; i < this->features.size(); ++i)
87 typedef std::vector<Feature2D> FeatureRefs;
88 FeatureRefs& refs = feature.
refs;
90 for (FeatureRefs::iterator iter = refs.begin(); iter != refs.end();)
91 if (iter->view_id ==
static_cast<int>(index))
92 iter = refs.erase(iter);
Vector class for arbitrary dimensions and types.
std::vector< math::Vec3f > VertexList
std::vector< math::Vec4f > ColorList
std::shared_ptr< TriangleMesh > Ptr
#define MVE_NAMESPACE_BEGIN
#define MVE_NAMESPACE_END
Representation of a 2D feature.
Representation of a 3D feature with position and color.
std::vector< Feature2D > refs
References to views that see the feature.
float pos[3]
3D Position of the feature (track).
float color[3]
RGB color of the feature in [0,1]^3.
Per-view camera information with various helper functions.