Blender  V3.3
libmv/simple_pipeline/tracks.h
Go to the documentation of this file.
1 // Copyright (c) 2011 libmv authors.
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to
5 // deal in the Software without restriction, including without limitation the
6 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 // sell copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 // IN THE SOFTWARE.
20 
21 #ifndef LIBMV_SIMPLE_PIPELINE_TRACKS_H_
22 #define LIBMV_SIMPLE_PIPELINE_TRACKS_H_
23 
24 #include "libmv/base/vector.h"
25 #include "libmv/numeric/numeric.h"
26 
27 namespace libmv {
28 
44 // TODO(sergey): Consider using comment for every member separately
45 // instead of having one giantic comment block.
46 struct Marker {
47  int image;
48  int track;
49  double x, y;
50  double weight;
51 };
52 
65 class Tracks {
66  public:
67  Tracks() {}
68 
69  // Copy constructor for a tracks object.
70  Tracks(const Tracks& other);
71 
73  explicit Tracks(const vector<Marker>& markers);
74 
88  // TODO(sergey): Consider using InsetWeightedMarker istead of using
89  // stupid default value?
90  void Insert(int image, int track, double x, double y, double weight = 1.0);
91 
93  vector<Marker> AllMarkers() const;
94 
96  vector<Marker> MarkersForTrack(int track) const;
97 
100 
102  vector<Marker> MarkersInBothImages(int image1, int image2) const;
103 
110  vector<Marker> MarkersForTracksInBothImages(int image1, int image2) const;
111 
113  Marker MarkerInImageForTrack(int image, int track) const;
114 
116  void RemoveMarkersForTrack(int track);
117 
119  void RemoveMarker(int image, int track);
120 
122  int MaxImage() const;
123 
125  int MaxTrack() const;
126 
128  int NumMarkers() const;
129 
130  private:
131  vector<Marker> markers_;
132 };
133 
135  int image,
136  Mat* coordinates);
137 
138 } // namespace libmv
139 
140 #endif // LIBMV_SIMPLE_PIPELINE_MARKERS_H_
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
void RemoveMarker(int image, int track)
Removes the marker in image belonging to track.
vector< Marker > MarkersInImage(int image) const
Returns all the markers visible in image.
vector< Marker > MarkersInBothImages(int image1, int image2) const
Returns all the markers visible in image1 and image2.
void RemoveMarkersForTrack(int track)
Removes all the markers belonging to track.
int MaxTrack() const
Returns the maximum track identifier used.
vector< Marker > AllMarkers() const
Returns all the markers.
vector< Marker > MarkersForTracksInBothImages(int image1, int image2) const
int MaxImage() const
Returns the maximum image identifier used.
void Insert(int image, int track, double x, double y, double weight=1.0)
vector< Marker > MarkersForTrack(int track) const
Returns all the markers belonging to a track.
int NumMarkers() const
Returns the number of markers.
Marker MarkerInImageForTrack(int image, int track) const
Returns the marker in image belonging to track.
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
const vector< Marker > & markers
Eigen::MatrixXd Mat
Definition: numeric.h:60
void CoordinatesForMarkersInImage(const vector< Marker > &markers, int image, Mat *coordinates)