KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Friends | List of all members
kjb::Manhattan_segment Class Reference

A manhattan segment defined by a line segment and the vanishing point it converges to. More...

#include <manhattan_world.h>

Public Member Functions

 Manhattan_segment (const Edge_segment &isegment, Vanishing_point *ivp=0)
 
 Manhattan_segment (const Manhattan_segment &src)
 
const Edge_segmentget_edge_segment () const
 returns the edge segment defining this manhattan segment More...
 
const Vanishing_pointget_vanishing_point () const
 Returns the vanishing point this Manhattan segment converges to. More...
 
void set_vanishing_point (Vanishing_point *ivp)
 
void mark_as_outlier ()
 Marks this segment as an outlier. More...
 
bool is_outlier () const
 Returns true if this segment is an outlier, ie it is not aligned with one of the three orthogonal directions defining Manhattan world. More...
 
double get_alpha () const
 returns alpha More...
 
 ~Manhattan_segment ()
 
void draw (kjb::Image &img, double ir, double ig, double ib, double width=1.0) const
 Draws this Manhattan segment. More...
 
void randomly_color (kjb::Image &img, double width=1.0) const
 Randomly colors this Manhattan segment on an image. More...
 
void draw_mid_point_to_vanishing_point (kjb::Image &img, double ir, double ig, double ib, double width=1.0) const
 Draws a line between the line segment mid point and the vanishing point it converges to Mostly for debug purposes. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const Manhattan_segment &ms)
 

Detailed Description

A manhattan segment defined by a line segment and the vanishing point it converges to.

Constructor & Destructor Documentation

kjb::Manhattan_segment::Manhattan_segment ( const Edge_segment isegment,
Vanishing_point ivp = 0 
)
inline
kjb::Manhattan_segment::Manhattan_segment ( const Manhattan_segment src)
inline
kjb::Manhattan_segment::~Manhattan_segment ( )
inline

Member Function Documentation

void kjb::Manhattan_segment::draw ( kjb::Image img,
double  ir,
double  ig,
double  ib,
double  width = 1.0 
) const
inline

Draws this Manhattan segment.

void Manhattan_segment::draw_mid_point_to_vanishing_point ( kjb::Image img,
double  ir,
double  ig,
double  ib,
double  width = 1.0 
) const

Draws a line between the line segment mid point and the vanishing point it converges to Mostly for debug purposes.

Draws a line on the image between the segment mid point and the vanishing point the segment converges to

Parameters
imgthe image
irthe red channel
igthe green channel
ibthe blue channel
widththe width of the segment to be drawn (in pixel)
double kjb::Manhattan_segment::get_alpha ( ) const
inline

returns alpha

const Edge_segment& kjb::Manhattan_segment::get_edge_segment ( ) const
inline

returns the edge segment defining this manhattan segment

const Vanishing_point* kjb::Manhattan_segment::get_vanishing_point ( ) const
inline

Returns the vanishing point this Manhattan segment converges to.

bool kjb::Manhattan_segment::is_outlier ( ) const
inline

Returns true if this segment is an outlier, ie it is not aligned with one of the three orthogonal directions defining Manhattan world.

void kjb::Manhattan_segment::mark_as_outlier ( )
inline

Marks this segment as an outlier.

void kjb::Manhattan_segment::randomly_color ( kjb::Image img,
double  width = 1.0 
) const
inline

Randomly colors this Manhattan segment on an image.

void kjb::Manhattan_segment::set_vanishing_point ( Vanishing_point ivp)
inline

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Manhattan_segment ms 
)
friend

The documentation for this class was generated from the following files: