![]() |
My Project
|
Main ALVAR namespace. More...
Namespaces | |
plugins | |
Dynamically loaded plugins namespace. | |
Classes | |
class | AlvarException |
ALVAR exception class. More... | |
class | Bitset |
Bitset is a basic class for handling bit sequences More... | |
class | BitsetExt |
An extended Bitset ( BitsetExt ) for handling e.g. Hamming encoding/decoding. More... | |
struct | ProjPoints |
Simple structure for collecting 2D and 3D points e.g. for camera calibration. More... | |
class | Camera |
Simple Camera class for calculating distortions, orientation or projections with pre-calibrated camera. More... | |
struct | Homography |
Simple Homography class for finding and projecting points between two planes. More... | |
class | Labeling |
Base class for labeling connected components from binary image. More... | |
class | LabelingCvSeq |
Labeling class that uses OpenCV routines to find connected components. More... | |
class | Container3d |
Generic container to store any information in 3D (features, photos, ...) More... | |
class | Container3dSortDist |
Functor class for Container3d Sort() to sort the search base using distance to specified origin. More... | |
class | Container3dSortSize |
Functor class for Container3d Sort() to sort the search base using content size. More... | |
class | Container3dLimitDist |
Functor class for Container3d Limit() to limit the search space with distance. More... | |
class | ExternalContainer |
Basic structure to be usable with EC methods. More... | |
class | DoHandleTest |
This is a default functor for testing which items in the container should be handled by each method. More... | |
class | DoEraseTest |
This is default functor for testing which items in the container should be erased. More... | |
class | TrackerFeaturesEC |
Version of TrackerFeatures using external container. More... | |
class | CameraEC |
Version of Camera using external container. More... | |
class | MarkerDetectorEC |
Version of MarkerDetector using external container. More... | |
class | MultiMarkerEC |
Version of MultiMarker using external container. More... | |
class | FileFormatUtils |
Utility functions for file reading / writing. More... | |
class | Filter |
Filter is pure virtual class describing the basic virtual interface for all filters More... | |
class | FilterAverage |
FilterAverage provides an average filter More... | |
class | FilterMedian |
FilterMedian provides an median filter More... | |
class | FilterRunningAverage |
FilterRunningAverage provides an weighted running average filter More... | |
class | FilterDoubleExponentialSmoothing |
FilterDoubleExponentialSmoothing provides an weighted running average filter More... | |
class | FilterArray |
Class for handling an array of filtered values. More... | |
class | IntIndex |
Class for calculating "evenly spaced" integer indices for data sequence. More... | |
class | IntegralImage |
IntegralImage is used for calculating rectangular image sums and averages rapidly More... | |
class | IntegralGradient |
IntegralGradient is used for calculating rectangular image gradients rapidly More... | |
class | KalmanSensorCore |
Core implementation for Kalman sensor. More... | |
class | KalmanCore |
Core implementation for Kalman. More... | |
class | KalmanSensor |
Kalman sensor implementation. More... | |
class | Kalman |
Kalman implementation. More... | |
class | KalmanSensorEkf |
Extended Kalman Filter (EKF) sensor implementation. More... | |
class | KalmanEkf |
Extended Kalman Filter (EKF) implementation. More... | |
class | KalmanVisualize |
Class for visualizing Kalman filter. More... | |
struct | Line |
Struct representing a line. The line is parametrized by its center and direction vector. More... | |
class | Marker |
Basic 2D Marker functionality. More... | |
class | MarkerArtoolkit |
MarkerArtoolkit for using matrix markers similar with the ones used in ARToolkit. More... | |
class | MarkerData |
MarkerData contains matrix of Hamming encoded data. More... | |
class | MarkerIterator |
Iterator type for traversing templated Marker vector without the template. More... | |
class | MarkerIteratorImpl |
Iterator implementation for traversing templated Marker vector without the template. More... | |
class | MarkerDetectorImpl |
Templateless version of MarkerDetector. Please use MarkerDetector instead. More... | |
class | MarkerDetector |
MarkerDetector for detecting markers of type M More... | |
class | MultiMarker |
Base class for using MultiMarker. More... | |
class | MultiMarkerBundle |
Multi marker that uses bundle adjustment to refine the 3D positions of the markers (point cloud). More... | |
class | MultiMarkerFiltered |
Multi marker that is constructed by first calculating the marker poses directly relative to base marker and then filtering the results using e.g. median filter. More... | |
class | MultiMarkerInitializer |
Initializes multi marker by estimating their relative positions from one or more images. More... | |
class | Optimization |
Non-linear optimization routines. There are three methods implemented that include Gauss-Newton, Levenberg-Marquardt and Tukey m-estimator. More... | |
class | Capture |
Capture interface that plugins must implement. More... | |
class | CaptureDevice |
CaptureDevice holder for camera information. More... | |
class | CaptureFactory |
CaptureFactory for creating Capture classes. More... | |
class | CapturePlugin |
CapturePlugin interface that plugins must implement. More... | |
class | DirectoryIterator |
DirectoryIterator for iterating over files and directories. More... | |
class | Lock |
Lock for simplifying mutex handling. More... | |
class | Mutex |
Mutex for synchronizing multiple threads. More... | |
class | Plugin |
Plugin for loading dynamic libraries. More... | |
class | Threads |
Threads vector for handling multiple threads. More... | |
class | Timer |
Timer for measuring execution time. More... | |
class | Uncopyable |
Uncopyable for preventing object copies. More... | |
class | Pose |
Pose representation derived from the Rotation class More... | |
class | RansacImpl |
Internal implementation of RANSAC. Please use Ransac or IndexRansac. More... | |
class | Ransac |
Implementation of a general RANdom SAmple Consensus algorithm. More... | |
class | IndexRansac |
Implementation of a general RANdom SAmple Consensus algorithm with implicit parameters. More... | |
class | Rotation |
Rotation structure and transformations between different parameterizations. More... | |
class | SimpleSfM |
Simple structure from motion implementation using CameraEC , MarkerDetectorEC and TrackerFeaturesEC. More... | |
class | Tracker |
Pure virtual base class for tracking optical flow. More... | |
class | TrackerFeatures |
TrackerFeatures tracks features using OpenCV's cvGoodFeaturesToTrack and cvCalcOpticalFlowPyrLK More... | |
class | TrackerOrientation |
Track orientation based only on features in the image plane. More... | |
class | TrackerPsa |
TrackerPsa implements a very simple PSA tracker More... | |
class | TrackerPsaRot |
TrackerPsaRot implements a slightly extended version of a TrackerPsa which can also detect sideways rotation More... | |
class | TrackerStat |
TrackerStat deduces the optical flow based on tracked features using Seppo Valli's statistical tracking. More... | |
class | TrackerStatRot |
TrackerStatRot implements a slightly extended version of TrackerStat which can also detect sideways rotation. More... | |
class | TrifocalTensor |
Trifocal tensor works for three images like a fundamental matrix works for two images. More... | |
class | UnscentedKalman |
Implementation of unscented kalman filter (UKF) for filtering non-linear processes. More... | |
class | UnscentedProcess |
Process model for an unscented kalman filter. More... | |
class | UnscentedObservation |
Observation model for an unscented kalman filter. More... | |
struct | Point |
Simple Point class meant to be inherited from OpenCV point-classes. For example: Point<cv::Point2d> p. More... | |
struct | Index |
Class for N-dimensional index to be used e.g. with STL maps. More... | |
class | Histogram |
Class for N-dimensional Histograms. More... | |
class | HistogramSubpixel |
N-dimensional Histograms calculating also the subpixel average for max bin. More... | |
class | Serialization |
Class for serializing class content to/from file or std::iostream. More... | |
Typedefs | |
typedef ALVAR_EXPORT Point< cv::Point > | PointInt |
The default integer point type. | |
typedef ALVAR_EXPORT Point< cv::Point2d > | PointDouble |
The default double point type. | |
Enumerations | |
enum | FILE_FORMAT { FILE_FORMAT_DEFAULT , FILE_FORMAT_OPENCV , FILE_FORMAT_TEXT , FILE_FORMAT_XML } |
Functions | |
template<class PointType > | |
void | DrawBB (cv::Mat &image, const std::vector< PointType > &points, const cv::Scalar &color, const std::string &label="") |
Draws the bounding box of a connected component (Blob). More... | |
template<class PointType > | |
void | DrawLines (cv::Mat &image, const std::vector< PointType > &points, const cv::Scalar &color, bool loop=true) |
Draws lines between consecutive points stored in vector (polyline). More... | |
void ALVAR_EXPORT | DrawLine (cv::Mat &image, const Line line, const cv::Scalar &color=CV_RGB(0, 255, 0)) |
Draws a line. More... | |
void ALVAR_EXPORT | DrawPoints (cv::Mat &image, const std::vector< cv::Point > &contour, const cv::Scalar &color=CV_RGB(255, 0, 0)) |
Draws points of the contour that is obtained by Labeling class. More... | |
void ALVAR_EXPORT | DrawCircles (cv::Mat &image, const std::vector< cv::Point > &contour, int radius, const cv::Scalar &color=CV_RGB(255, 0, 0)) |
Draws circles to the contour points that are obtained by Labeling class. More... | |
void ALVAR_EXPORT | DrawLines (cv::Mat &image, const std::vector< cv::Point > &contour, const cv::Scalar &color=CV_RGB(255, 0, 0)) |
Draws lines between consecutive contour points. More... | |
template<class PointType > | |
void | DrawPoints (cv::Mat &image, const std::vector< PointType > &points, const cv::Scalar &color, int radius=1) |
Draws circles to the array of points. More... | |
void ALVAR_EXPORT | DrawCVEllipse (cv::Mat &image, const cv::RotatedRect &ellipse, const cv::Scalar &color, bool fill=false, double par=0) |
Draws OpenCV ellipse. More... | |
void ALVAR_EXPORT | BuildHideTexture (cv::Mat &image, cv::Mat &hide_texture, Camera *cam, double gl_modelview[16], PointDouble topleft, PointDouble botright) |
This function is used to construct a texture image which is needed to hide a marker from the original video frame. See SampleMarkerHide.cpp for example implementation. More... | |
void ALVAR_EXPORT | DrawTexture (cv::Mat &image, cv::Mat &texture, Camera *cam, double gl_modelview[16], PointDouble topleft, PointDouble botright) |
Draws the texture generated by BuildHideTexture to given video frame. For better performance, use OpenGL instead. See SampleMarkerHide.cpp for example implementation. More... | |
template<typename T , typename F > | |
int | EraseItemsEC (std::map< int, T > &container, F do_erase_test) |
Erasing items from container using DoEraseTest type functor. | |
int | MarkerIdToContainerId (int marker_id, int corner_id, int first_id=0, int last_id=65535) |
Calculate the index used in external container map for specified marker_id. | |
int ALVAR_EXPORT | FitLines (std::vector< Line > &lines, const std::vector< int > &corners, const std::vector< PointInt > &edge) |
Fit lines to vector of points. More... | |
PointDouble ALVAR_EXPORT | Intersection (const Line &l1, const Line &l2) |
Calculates an intersection point of two lines. More... | |
void ALVAR_EXPORT | errorAtLine (int status, int error, const char *filename, unsigned int line, const char *format,...) |
Error reporting function inspired by error_at_line() on Linux. More... | |
void ALVAR_EXPORT | sleep (unsigned long milliseconds) |
Sleep for a specified amount of milliseconds. | |
template<class C > | |
int ALVAR_EXPORT | Sign (const C &v) |
Returns the sign of a number. | |
template<class C > | |
double ALVAR_EXPORT | Rad2Deg (const C &v) |
Converts an angle from radians to degrees. | |
template<class C > | |
double ALVAR_EXPORT | Deg2Rad (const C &v) |
Converts an angle from degrees to radians. | |
template<class PointType > | |
double | PointSquaredDistance (PointType p1, PointType p2) |
Returns the squared distance of two points. More... | |
int ALVAR_EXPORT | dot (const cv::Point &A, const cv::Point &B, const cv::Point &C) |
Computes dot product AB.BC. More... | |
int ALVAR_EXPORT | cross (const cv::Point &A, const cv::Point &B, const cv::Point &C) |
Computes the cross product AB x AC. More... | |
double ALVAR_EXPORT | distance (const cv::Point &A, const cv::Point &B) |
Compute the distance from A to B. More... | |
double ALVAR_EXPORT | linePointDist (const cv::Point &A, const cv::Point &B, const cv::Point &C, bool isSegment) |
Computes the distance from point C to line (segment) AB. More... | |
double ALVAR_EXPORT | angle (const cv::Point &A, const cv::Point &B, const cv::Point &C, const cv::Point &D, int isDirectionDependent) |
Computes the angle between lines AB and CD. More... | |
double ALVAR_EXPORT | polyLinePointDist (const std::vector< cv::Point > &points, const cv::Point &C, int *index, int isClosedPolygon) |
Calculates minimum distance from Point C to Polygon whose points are in list PointList. More... | |
void ALVAR_EXPORT | FitCVEllipse (const std::vector< PointDouble > &points, cv::RotatedRect &ellipse_box) |
Uses OpenCV routine to fit ellipse to a vector of points. More... | |
int ALVAR_EXPORT | exp_filt2 (std::vector< double > &v, std::vector< double > &ret, bool clamp) |
template<class C > | |
int ALVAR_EXPORT | diff (const std::vector< C > &v, std::vector< C > &ret) |
Calculates the difference between the consecutive vector elements. More... | |
int ALVAR_EXPORT | find_zero_crossings (const std::vector< double > &v, std::vector< int > &corners, int offs=20) |
Finds zero crossings of given vector elements (sequence). More... | |
void ALVAR_EXPORT | out_matrix (const cv::Mat &m, const char *name) |
Output OpenCV matrix for debug purposes. | |
double ALVAR_EXPORT | Limit (double val, double min_val, double max_val) |
Limits a number to between two values. More... | |
void | STRCPY (char *to, size_t size, const char *src) |
Variables | |
static const int | ALVAR_VERSION_MAJOR = 2 |
Major version number. | |
static const int | ALVAR_VERSION_MINOR = 2 |
Minor version number. | |
static const int | ALVAR_VERSION_PATCH = 1 |
Patch version number. | |
static const char * | ALVAR_VERSION_TAG = "" |
Tag version string. More... | |
static const char * | ALVAR_VERSION_REVISION = "" |
Revision version string. More... | |
static const char * | ALVAR_VERSION = "2.2.1" |
Entire version string. | |
static const char * | ALVAR_VERSION_NODOTS = "221" |
Entire version string without dots. | |
static const char * | ALVAR_DATE = "2021-06-21" |
Date the library was built. | |
static const char * | ALVAR_SYSTEM = "Linux 5.11.18-300.fc34.x86_64 x86_64" |
System the library was built on. | |
const double | PI = 3.14159265 |
Main ALVAR namespace.
enum FILE_FORMAT |
File format enumeration used when reading / writing configuration files.
Definition at line 39 of file FileFormat.h.
double ALVAR_EXPORT alvar::angle | ( | const cv::Point & | A, |
const cv::Point & | B, | ||
const cv::Point & | C, | ||
const cv::Point & | D, | ||
int | isDirectionDependent | ||
) |
Computes the angle between lines AB and CD.
isDirectionDependent | If isDirectionDependent = 1, angle depends on the order of the points. Otherwise returns smaller angle. |
A | start point of first line |
B | end point of first line |
C | start point of second line |
D | end point of second line |
void ALVAR_EXPORT alvar::BuildHideTexture | ( | cv::Mat & | image, |
cv::Mat & | hide_texture, | ||
Camera * | cam, | ||
double | gl_modelview[16], | ||
PointDouble | topleft, | ||
PointDouble | botright | ||
) |
This function is used to construct a texture image which is needed to hide a marker from the original video frame. See SampleMarkerHide.cpp for example implementation.
image | Pointer to the original video frame from where the hiding texture is calculated. |
hide_texture | Pointer to the destination image where the resulting texture is stored. |
cam | Camera object that is used for marker tracking. |
gl_modelview | Current model view matrix. |
topleft | Top left limit of the texture area in marker coordinate frame. |
botright | Bottom right limit of the texture area in marker coordinate frame. |
int ALVAR_EXPORT alvar::cross | ( | const cv::Point & | A, |
const cv::Point & | B, | ||
const cv::Point & | C | ||
) |
Computes the cross product AB x AC.
A,B | and C points defining lines (line segments) AB and AC |
|
inline |
double ALVAR_EXPORT alvar::distance | ( | const cv::Point & | A, |
const cv::Point & | B | ||
) |
Compute the distance from A to B.
A | and B points |
int ALVAR_EXPORT alvar::dot | ( | const cv::Point & | A, |
const cv::Point & | B, | ||
const cv::Point & | C | ||
) |
Computes dot product AB.BC.
A,B | and C points defining lines (line segments) AB and BC |
|
inline |
Draws the bounding box of a connected component (Blob).
image | Pointer to the destination image. |
points | Vector of points that determine the bounding box. |
color | Use CV_RGB(red,green,blue) to determine the color of the bounding box. |
label | A label to show in the center of the bounding box. |
void ALVAR_EXPORT alvar::DrawCircles | ( | cv::Mat & | image, |
const std::vector< cv::Point > & | contour, | ||
int | radius, | ||
const cv::Scalar & | color = CV_RGB(255, 0, 0) |
||
) |
Draws circles to the contour points that are obtained by Labeling class.
image | Pointer to the destination image. |
contour | Controur sequence. |
radius | Circle radius in pixels. |
color | Use CV_RGB(red,green,blue) to determine the color. |
void ALVAR_EXPORT alvar::DrawCVEllipse | ( | cv::Mat & | image, |
const cv::RotatedRect & | ellipse, | ||
const cv::Scalar & | color, | ||
bool | fill = false , |
||
double | par = 0 |
||
) |
Draws OpenCV ellipse.
image | Pointer to the destination image. |
ellipse | Ellipse struct in OpenCV format. |
color | Use CV_RGB(red,green,blue) to determine the color. |
fill | If false, only the outline is drawn. |
par | The ellipse width and height are grown by par pixels. |
void ALVAR_EXPORT alvar::DrawLine | ( | cv::Mat & | image, |
const Line | line, | ||
const cv::Scalar & | color = CV_RGB(0, 255, 0) |
||
) |
Draws a line.
image | Pointer to the destination image. |
line | Line struct to be drawn. |
color | Use CV_RGB(red,green,blue) to determine the color. |
void ALVAR_EXPORT alvar::DrawLines | ( | cv::Mat & | image, |
const std::vector< cv::Point > & | contour, | ||
const cv::Scalar & | color = CV_RGB(255, 0, 0) |
||
) |
Draws lines between consecutive contour points.
image | Pointer to the destination image. |
contour | Controur sequence. |
color | Use CV_RGB(red,green,blue) to determine the color. |
|
inline |
Draws lines between consecutive points stored in vector (polyline).
image | Pointer to the destination image. |
points | Vector of points that determine the polyline. |
color | Use CV_RGB(red,green,blue) to determine the color. |
loop | If true, the polyline is closed. |
void ALVAR_EXPORT alvar::DrawPoints | ( | cv::Mat & | image, |
const std::vector< cv::Point > & | contour, | ||
const cv::Scalar & | color = CV_RGB(255, 0, 0) |
||
) |
Draws points of the contour that is obtained by Labeling class.
image | Pointer to the destination image. |
contour | Controur sequence. |
color | Use CV_RGB(red,green,blue) to determine the color. |
|
inline |
void ALVAR_EXPORT alvar::DrawTexture | ( | cv::Mat & | image, |
cv::Mat & | texture, | ||
Camera * | cam, | ||
double | gl_modelview[16], | ||
PointDouble | topleft, | ||
PointDouble | botright | ||
) |
Draws the texture generated by BuildHideTexture to given video frame. For better performance, use OpenGL instead. See SampleMarkerHide.cpp for example implementation.
image | Pointer to the destination image where the texture is drawn. |
texure | Pointer to the texture image genereated by BuildHideTexture. |
cam | Camera object that is used for marker tracking. |
gl_modelview | Current model view matrix. |
topleft | Top left limit of the texture area in marker coordinate frame. |
botright | Bottom right limit of the texture area in marker coordinate frame. |
void ALVAR_EXPORT alvar::errorAtLine | ( | int | status, |
int | error, | ||
const char * | filename, | ||
unsigned int | line, | ||
const char * | format, | ||
... | |||
) |
Error reporting function inspired by error_at_line() on Linux.
It flushes stdout and prints the filename, line number and printf compatible error message to stderr. If error is specified, it also prints the corresponding error message from strerror(). If status is not zero, it exits the process.
int ALVAR_EXPORT alvar::find_zero_crossings | ( | const std::vector< double > & | v, |
std::vector< int > & | corners, | ||
int | offs = 20 |
||
) |
Finds zero crossings of given vector elements (sequence).
v | Sequence of numbers from where the zero crossings are found. |
corners | Resulting index list of zero crossings. |
offs |
void ALVAR_EXPORT alvar::FitCVEllipse | ( | const std::vector< PointDouble > & | points, |
cv::RotatedRect & | ellipse_box | ||
) |
Uses OpenCV routine to fit ellipse to a vector of points.
points | Vector of points on the ellipse edge. |
ellipse_box | OpenCV struct for the fitted ellipse. |
int ALVAR_EXPORT alvar::FitLines | ( | std::vector< Line > & | lines, |
const std::vector< int > & | corners, | ||
const std::vector< PointInt > & | edge | ||
) |
Fit lines to vector of points.
lines | Resulting set of lines. |
corners | Index list of line breaks. |
edge | Vector of points (pixels) where the line is fitted. |
grey | In the future, we may want to fit lines directly to grayscale image instead of thresholded edge. |
PointDouble ALVAR_EXPORT alvar::Intersection | ( | const Line & | l1, |
const Line & | l2 | ||
) |
Calculates an intersection point of two lines.
l1 | First line. |
l2 | Second line. |
double ALVAR_EXPORT alvar::Limit | ( | double | val, |
double | min_val, | ||
double | max_val | ||
) |
Limits a number to between two values.
val | Input value. |
min_val | Minimum value for the result. |
max_val | Maximum value for the result. |
double ALVAR_EXPORT alvar::linePointDist | ( | const cv::Point & | A, |
const cv::Point & | B, | ||
const cv::Point & | C, | ||
bool | isSegment | ||
) |
Computes the distance from point C to line (segment) AB.
isSegment | If isSegment is true, AB is a segment, not a line. |
C | point |
A | abd B points defining line (segment) AB |
double alvar::PointSquaredDistance | ( | PointType | p1, |
PointType | p2 | ||
) |
double ALVAR_EXPORT alvar::polyLinePointDist | ( | const std::vector< cv::Point > & | points, |
const cv::Point & | C, | ||
int * | index, | ||
int | isClosedPolygon | ||
) |
Calculates minimum distance from Point C to Polygon whose points are in list PointList.
Returns distance
index | index of point A in pointlist, where A is the starting point of the closest polygon segment |
isClosedPolygon | is true if polygon is closed (segment of the first and last point is also checked) |
|
static |