EgoVideoStabilizer  1.0.0
line_and_point_operations.cpp File Reference

Functions to handle line and point functions. More...

Include dependency graph for line_and_point_operations.cpp:

Functions

bool lineSegmentIntersection (const cv::Point2f &a1, const cv::Point2f &b1, const cv::Point2f &a2, const cv::Point2f &b2)
 Function that verify if two line segments have intersection point. More...
 
bool lineSegmentIntersection (const cv::Point2f &a1, const cv::Point2f &b1, const cv::Point2f &a2, const cv::Point2f &b2, cv::Point2f &intersection)
 Function that calculate the homography matrix that leave the frame_i to the intermediate plan between the plans of frame_master_pre and frame_master_pre with relation of the distance between them. More...
 
void computeAnglesAndMags (const std::vector< cv::Point2f > &points_src, const std::vector< cv::Point2f > &points_dst, std::vector< float > &angles, std::vector< float > &mags)
 Function that compute the angle and magnitude of the optical flow from the points_src to points_dst. More...
 

Detailed Description

Functions to handle line and point functions.

Functions to find lines and segment line intersection. Compute angle and magnitude of vectors.

Function Documentation

void computeAnglesAndMags ( const std::vector< cv::Point2f > &  points_src,
const std::vector< cv::Point2f > &  points_dst,
std::vector< float > &  angles,
std::vector< float > &  mags 
)

Function that compute the angle and magnitude of the optical flow from the points_src to points_dst.

Parameters
points_src- vector of source points.
points_dst- vector of destination points.
angles- object to save the angle of the vectors.
mags- object to save the magnitude of the vectors.
Returns
void
Author
Washington Luis de Souza Ramos
Date
10/04/2016
bool lineSegmentIntersection ( const cv::Point2f &  a1,
const cv::Point2f &  b1,
const cv::Point2f &  a2,
const cv::Point2f &  b2 
)

Function that verify if two line segments have intersection point.

See also
https://github.com/Itseez/opencv/blob/master/modules/imgproc/src/min_enclosing_triangle.cpp
Parameters
a1- first point of the first line segment.
b1- second point of the first line segment.
a2- first point of the second line segment.
b2- second point of the second line segment.
Returns
bool true - if there is a intersection point.
bool false - if there is not a intersection point.
Author
Michel Melo da Silva
Date
04/04/2016
bool lineSegmentIntersection ( const cv::Point2f &  a1,
const cv::Point2f &  b1,
const cv::Point2f &  a2,
const cv::Point2f &  b2,
cv::Point2f &  intersection 
)

Function that calculate the homography matrix that leave the frame_i to the intermediate plan between the plans of frame_master_pre and frame_master_pre with relation of the distance between them.

See also
https://github.com/Itseez/opencv/blob/master/modules/imgproc/src/min_enclosing_triangle.cpp
Parameters
a1- first point of the first line segment.
b1- second point of the first line segment.
a2- first point of the second line segment.
b2- second point of the second line segment.
intersection- intersection point between the line segments.
Returns
bool true - if there is a intersection point.
bool false - if there is not a intersection point.
Author
Michel Melo da Silva
Date
04/04/2016