All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Functions
vanishing_point_detector.h File Reference
#include "m/m_incl.h"
#include "i/i_float.h"
#include <i_cpp/i_image.h>
#include "edge/edge_base.h"
#include "edge_cpp/line_segment_set.h"
#include "m_cpp/m_int_vector.h"
#include "edge_cpp/vanishing_point.h"
#include <vector>
#include <list>
#include <string>

Go to the source code of this file.


class  kjb::Vanishing_point_detector
 This class computes the position of the three vanishing points from a set of line segments. The ass. More...


 Classes and functions for dealing with trajectory files.


#define VPD_MAX_LINE_SEGMENT_FITTING_ERROR   0.5 /* 0.5 */
#define VPD_MAX_PRINCIPAL_POINT_POSITION_TOLERANCE   18 /* vero: 30 //16 // 80 */


bool kjb::robustly_estimate_vanishing_points (std::vector< Vanishing_point > &vpts, double &focal_length, const kjb::Image &img, double success_probability=VPD_RANSAC_ROBUST_SUCCESS_PROBABILITY, bool jointly_estimate=false, std::vector< Vanishing_point > right_ones=std::vector< Vanishing_point >(0))
 Estimates the vanishing points for the three orthogonal directions of a Manhattan world scene (where most of all planes are aligned with three main orthogonal directions). This function works ONLY under the Manhattan world assumption. More...
bool kjb::robustly_estimate_vertical_vanishing_point (Vanishing_point &vertical, const kjb::Image &img, double success_probability=VPD_RANSAC_ROBUST_SUCCESS_PROBABILITY)
bool kjb::relaxed_vanishing_point_estimation (std::vector< Vanishing_point > &vpts, double &focal_length, const kjb::Image &img, double success_probability)
 This function uses less constraints coming from geometry and uses the data more, relying on the assumption that there is less noise. This is convenient with synthetic data. More...
unsigned int kjb::assign_to_vanishing_point (double outlier_threshold, const Line_segment *isegment, const std::vector< Vanishing_point > &ivpts)
 Assigns an edge segments to the vanishing point that minimizes the angle between the segment and the line between the midpoint of the segment and the vanishing point. If this angle is too big for all vanishing points, the segment is labeled as an outlier. This checks using different outlier thresholds and can be time consuming (ie 1-5 seconds). More...
double kjb::robustly_estimate_vanishing_points_Kovesi (std::vector< Vanishing_point > &vpts, double &focal_length, const Image &img, const Line_segment_set &kovesi, double start_threshold=0.05, double vpts_tolerance=VPD_MAX_PRINCIPAL_POINT_POSITION_TOLERANCE, double success_probability=VPD_RANSAC_ROBUST_SUCCESS_PROBABILITY)
bool kjb::detect_vanishing_points (std::vector< Vanishing_point > &vpts, double &focal_length, const std::string &img_path)

Macro Definition Documentation

#define VPD_MAX_LINE_SEGMENT_FITTING_ERROR   0.5 /* 0.5 */
#define VPD_MAX_PRINCIPAL_POINT_POSITION_TOLERANCE   18 /* vero: 30 //16 // 80 */

When we check the consistency of a triplet of vanishing point, we expect the position of the principal point computed for them to be in the image centre with the following tolerance