SaDVIO
Public Member Functions | Public Attributes | List of all members
upm::FullSegmentInfo Class Reference

#include <FullSegmentInfo.h>

Public Member Functions

 FullSegmentInfo (const std::vector< Pixel > &pts)
 
 FullSegmentInfo (const std::vector< Pixel > &pts, int startIdx)
 
void init (const std::vector< Pixel > &pts, int startIdx)
 
bool isInlier (int x, int y, double lineFitErrThreshold)
 
void addPixel (int x, int y, int pixelIndexInEdge, bool isPixelAtTheEnd=true)
 
void finish ()
 
void skipPositions ()
 
double getFitError () const
 
void removeLastPx (bool removeFromTheEnd=true)
 
void reset ()
 
bool horizontal () const
 
int getNumOfPixels () const
 
const Segment & getEndpoints () const
 
ImageEdge getPixels () const
 
const Pixel & getFirstPixel () const
 
const Pixel & getLastPixel () const
 
const Pixel * begin () const
 
const Pixel * end () const
 
const cv::Vec3d & getLineEquation () const
 
bool hasSecondSideElements () const
 

Public Attributes

bool firstEndpointExtended = false
 
bool secondEndpointExtended = false
 

Detailed Description

This class represents a line segment and its associated information such as:

The implementation is highly optimized to add or subtract new pixels and recompute all parameters. Internally,

Constructor & Destructor Documentation

◆ FullSegmentInfo() [1/2]

upm::FullSegmentInfo::FullSegmentInfo ( const std::vector< Pixel > &  pts)

◆ FullSegmentInfo() [2/2]

upm::FullSegmentInfo::FullSegmentInfo ( const std::vector< Pixel > &  pts,
int  startIdx 
)

Member Function Documentation

◆ addPixel()

void upm::FullSegmentInfo::addPixel ( int  x,
int  y,
int  pixelIndexInEdge,
bool  isPixelAtTheEnd = true 
)

◆ begin()

const Pixel* upm::FullSegmentInfo::begin ( ) const
inline

◆ end()

const Pixel* upm::FullSegmentInfo::end ( ) const
inline

◆ finish()

void upm::FullSegmentInfo::finish ( )

◆ getEndpoints()

const Segment& upm::FullSegmentInfo::getEndpoints ( ) const
inline

◆ getFirstPixel()

const Pixel& upm::FullSegmentInfo::getFirstPixel ( ) const
inline

◆ getFitError()

double upm::FullSegmentInfo::getFitError ( ) const
inline

◆ getLastPixel()

const Pixel& upm::FullSegmentInfo::getLastPixel ( ) const
inline

◆ getLineEquation()

const cv::Vec3d& upm::FullSegmentInfo::getLineEquation ( ) const
inline

◆ getNumOfPixels()

int upm::FullSegmentInfo::getNumOfPixels ( ) const
inline

◆ getPixels()

ImageEdge upm::FullSegmentInfo::getPixels ( ) const

◆ hasSecondSideElements()

bool upm::FullSegmentInfo::hasSecondSideElements ( ) const
inline

◆ horizontal()

bool upm::FullSegmentInfo::horizontal ( ) const
inline

◆ init()

void upm::FullSegmentInfo::init ( const std::vector< Pixel > &  pts,
int  startIdx 
)

◆ isInlier()

bool upm::FullSegmentInfo::isInlier ( int  x,
int  y,
double  lineFitErrThreshold 
)
inline

◆ removeLastPx()

void upm::FullSegmentInfo::removeLastPx ( bool  removeFromTheEnd = true)

◆ reset()

void upm::FullSegmentInfo::reset ( )
inline

◆ skipPositions()

void upm::FullSegmentInfo::skipPositions ( )

Member Data Documentation

◆ firstEndpointExtended

bool upm::FullSegmentInfo::firstEndpointExtended = false

◆ secondEndpointExtended

bool upm::FullSegmentInfo::secondEndpointExtended = false

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