21 #ifndef EDGE_VANISHING_POINT_H
22 #define EDGE_VANISHING_POINT_H
65 if(position.
size() != 2)
155 if(position.
size() != 2)
164 void read(std::istream& in);
167 void write(std::ostream& out)
const;
171 #warning "[Code police] Please don't start identifiers with underscore."
187 std::vector<Vanishing_point> & vpts,
188 double & focal_length,
189 std::string file_name
196 const Line_segment & segment,
197 const Vanishing_point & vpt,
208 unsigned int img_cols,
209 unsigned int img_rows,
210 const Line_segment & ls,
211 Vanishing_point & vpt
219 unsigned int img_rows,
220 unsigned int img_cols,
221 Vanishing_point & vpt
226 std::vector<Vanishing_point> & vpts,
228 const std::string & file_path,
229 unsigned int num_cols,
230 unsigned int num_rows
235 Vanishing_point & vp1,
236 Vanishing_point & vp2,
237 Vanishing_point & estimated_vertical,
238 unsigned int img_cols,
239 unsigned int img_rows
void set_position(const kjb::Vector &position)
Sets the position of this Vanishing point.
Definition: vanishing_point.h:153
Vanishing_point(const kjb::Vector &position)
Definition: vanishing_point.h:63
double get_x() const
returns the x coordinate of this vanishing point
Definition: vanishing_point.h:112
Abstract class to write this object to an output stream.
Definition: l_writeable.h:41
bool read_hedau_vanishing_points(std::vector< Vanishing_point > &vpts, double &focal, const std::string &file_path, unsigned int num_cols, unsigned int num_rows)
Definition: vanishing_point.cpp:330
void set_y(double iy)
Definition: vanishing_point.h:128
size_type size() const
Alias to get_length(). Required to comply with stl Container concept.
Definition: m_vector.h:510
const Vanishing_point_type & get_type() const
returns the vanishing point type
Definition: vanishing_point.h:106
Abstract class to read this object from an input stream.
Definition: l_readable.h:39
bool operator==(const Vanishing_point &vp)
Definition: vanishing_point.cpp:85
Vanishing_point(Vanishing_point_type itype=REGULAR)
Default constructor, it initialize the vanishing point in (0,0)
Definition: vanishing_point.h:53
A vanishing point for a set of parallel lines in an image.
Definition: vanishing_point.h:37
Vanishing_point_type
the possible types of vanishing point. We need this to differentiate between vanishing points with fi...
Definition: vanishing_point.h:44
bool find_vanishing_point_given_one_and_line(const kjb::Vanishing_point &vp1, double focal, unsigned int img_cols, unsigned int img_rows, const Line_segment &ls, Vanishing_point &vpt)
Definition: vanishing_point.cpp:245
void set_x(double ix)
Definition: vanishing_point.h:123
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
Definition: vanishing_point.h:47
Vanishing_point(double x, double y)
Definition: vanishing_point.h:56
void read_CMU_vanishing_points(std::vector< Vanishing_point > &vpts, double &focal_length, std::string file_name)
Definition: vanishing_point.cpp:111
Definition: vanishing_point.h:49
Vanishing_point(const char *filename)
Definition: vanishing_point.h:73
Vanishing_point & operator=(const Vanishing_point &src)
Definition: vanishing_point.h:87
Definition: vanishing_point.h:48
x
Definition: APPgetLargeConnectedEdges.m:100
Vanishing_point(const Vanishing_point &src)
Definition: vanishing_point.h:84
void set_point(double x, double y)
Sets the position of this Vanishing point.
Definition: vanishing_point.h:145
~Vanishing_point()
Definition: vanishing_point.h:97
void draw_mid_point_to_vanishing_point(kjb::Image &img, const Line_segment &segment, const Vanishing_point &vpt, double ir, double ig, double ib, double width)
Definition: vanishing_point.cpp:204
void set_type(const Vanishing_point_type &itype)
Sets the type of this Vanishing point.
Definition: vanishing_point.h:134
double get_y() const
returns the y coordinate of this vanishing point
Definition: vanishing_point.h:118
void read(std::istream &in)
Reads this Vanishing point from an input stream.
Definition: vanishing_point.cpp:39
Object thrown when an argument to a function is not acceptable.
Definition: l_exception.h:377
bool find_third_vanishing_point(const kjb::Vanishing_point &vp1, const kjb::Vanishing_point &vp2, double focal, unsigned int img_rows, unsigned int img_cols, Vanishing_point &vpt)
Definition: vanishing_point.cpp:290
Vanishing_point(std::istream &in)
Definition: vanishing_point.h:78
virtual void read(std::istream &in)=0
Reads this Readable from an input stream.
Code for a wrapper class around the C struct KJB_Image.
Definition: vanishing_point.h:45
Wrapped version of the C struct KJB_image.
Definition: i_image.h:76
Definition: vanishing_point.h:46
bool is_at_infinity() const
returns true is the vanishing point is at infinity
Definition: vanishing_point.h:100
Definition for the Vector class, a thin wrapper on the KJB Vector struct and its related functionalit...
bool find_vertical_vanishing_point(Vanishing_point &vp1, Vanishing_point &vp2, Vanishing_point &estimated_vertical, unsigned int img_cols, unsigned int img_rows)
Definition: vanishing_point.cpp:375
void write(std::ostream &out) const
Writes this Vanishing point to an output stream.
Definition: vanishing_point.cpp:79