Line.h
Go to the documentation of this file.
1 /*
2  * This file is part of ALVAR, A Library for Virtual and Augmented Reality.
3  *
4  * Copyright 2007-2012 VTT Technical Research Centre of Finland
5  *
6  * Contact: VTT Augmented Reality Team <alvar.info@vtt.fi>
7  * <http://www.vtt.fi/multimedia/alvar.html>
8  *
9  * ALVAR is free software; you can redistribute it and/or modify it under the
10  * terms of the GNU Lesser General Public License as published by the Free
11  * Software Foundation; either version 2.1 of the License, or (at your option)
12  * any later version.
13  *
14  * This library is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
17  * for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with ALVAR; if not, see
21  * <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>.
22  */
23 
24 #ifndef _LINE_H
25 #define _LINE_H
26 
33 #include "Alvar.h"
34 #include "Util.h"
35 
36 namespace alvar {
37 
42 {
47  Line(float params[4]);
48  Line()
49  {}
50 
54  PointDouble c; // center
58  PointDouble s; // direction vector
59 };
60 
68 int ALVAR_EXPORT FitLines(std::vector<Line> &lines,
69  const std::vector<int>& corners,
70  const std::vector<PointInt >& edge,
71  IplImage *grey=0);
72 
79 PointDouble ALVAR_EXPORT Intersection(const Line& l1, const Line& l2);
80 
81 } // namespace alvar
82 
83 #endif
84 
85 
86 
87 
88 
89 
90 
91 
92 
Main ALVAR namespace.
Definition: Alvar.h:174
PointDouble s
Direction vector.
Definition: Line.h:58
Line()
Definition: Line.h:48
Struct representing a line. The line is parametrized by its center and direction vector.
Definition: Line.h:41
This file implements generic utility functions and a serialization interface.
#define ALVAR_EXPORT
Definition: Alvar.h:168
PointDouble ALVAR_EXPORT Intersection(const Line &l1, const Line &l2)
Calculates an intersection point of two lines.
Definition: Line.cpp:98
ALVAR_EXPORT Point< CvPoint2D64f > PointDouble
The default double point type.
Definition: Util.h:108
int ALVAR_EXPORT FitLines(std::vector< Line > &lines, const std::vector< int > &corners, const std::vector< PointInt > &edge, IplImage *grey=0)
Fit lines to vector of points.
This file defines library export definitions, version numbers and build information.
PointDouble c
Line center.
Definition: Line.h:54


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Mon Jun 10 2019 12:47:04