Functions
tools.cpp File Reference

Definitions for generic tools not depending on libraries such as OpenCV, PCL and ROS. More...

#include "tools.hpp"
Include dependency graph for tools.cpp:

Go to the source code of this file.

Functions

void addUniqueToVector (vector< unsigned int > &dst, vector< unsigned int > &src)
double asymmetricGaussianValue (double score, double mean, double loVar, double hiVar)
double calcLinePerpDistance (double *line1, double *line2)
 Calculates perpendicular distance between two "parallel" lines.
void calcParameters (const vector< double > &v, double &mean, double &stdev)
 Calculate the mean and standard deviation of a vector of doubles.
bool comparator (const mypair &l, const mypair &r)
void convert_byte_to_binary_string (void *src, char *dst)
 Converts a raw byte as an 8-bit character array of 1s and 0s.
void convertUcharToBinary (unsigned char val, int *binaryArray)
int countElementsInFolder (const char *folderName, vector< string > &elementNames, int elementType)
 Counts and returns a list of all specified elements within a folder.
double distBetweenPts (cv::Point3d &P1, cv::Point3d &P2)
 Distance between two 3D points in double format.
double distBetweenPts (cv::Point &P1, cv::Point &P2)
 Calculates the distance between two "Point" points.
double distBetweenPts2f (cv::Point2f &P1, cv::Point2f &P2)
 Calculates the distance between two "Point2f" points.
long long int factorial (int num)
 Calculates Factorial of an integer.
double findEquivalentProbabilityScore (double *values, int quantity, double prob)
 Selects the score which is minimally better than a specified proportion of all scores.
void findLinearModel (double *x, double *y, int termsToConsider, double &m, double &c)
double findMinimumSeparation (vector< cv::Point2f > &pts)
 Finds the minimum separation between any two points in a set.
double getInterpolatedVal (const cv::Mat &img, cv::Point2f &coord)
void getNextCombo (vector< unsigned int > &currentIndices, int r, int n)
 Gets next possible combination for an exhaustive combinatorial search.
cv::Scalar getRandomColour ()
double lookupValue (double xi, double yi, double maxVal, const cv::Mat &lookupMat)
bool matricesAreEqual (cv::Mat &mat1, cv::Mat &mat2)
cv::Point2f meanPoint (cv::Point2f &P1, cv::Point2f &P2)
 Generates a point that's half way in between the two input points.
double perpDist (cv::Point2f &P1, cv::Point2f &P2, cv::Point2f &P3)
 Calculates the perpindicular distance between a line (P1 to P2) and a point (P3)
void randomSelection (vector< unsigned int > &src, vector< unsigned int > &dst, unsigned int max)
void readPoints (const char *filename, vector< cv::Point2f > &pts)
void redistortPoints (const vector< cv::Point2f > &src, vector< cv::Point2f > &dst, const cv::Mat &cameraMatrix, const cv::Mat &distCoeffs, const cv::Mat &newCamMat)
 Redistorts points using an established distortion model.
double timeElapsedMS (struct timeval &timer, bool reset)
 Calculates time elapsed since the last time the timer was reset.
void writePoints (const char *filename, const vector< cv::Point2f > &pts)

Detailed Description

Definitions for generic tools not depending on libraries such as OpenCV, PCL and ROS.

Definition in file tools.cpp.


Function Documentation

void addUniqueToVector ( vector< unsigned int > &  dst,
vector< unsigned int > &  src 
)

Definition at line 653 of file tools.cpp.

double asymmetricGaussianValue ( double  score,
double  mean,
double  loVar,
double  hiVar 
)

Definition at line 630 of file tools.cpp.

double calcLinePerpDistance ( double *  line1,
double *  line2 
)

Calculates perpendicular distance between two "parallel" lines.

Definition at line 675 of file tools.cpp.

void calcParameters ( const vector< double > &  v,
double &  mean,
double &  stdev 
)

Calculate the mean and standard deviation of a vector of doubles.

Definition at line 746 of file tools.cpp.

bool comparator ( const mypair l,
const mypair r 
)

Definition at line 7 of file tools.cpp.

void convert_byte_to_binary_string ( void *  src,
char *  dst 
)

Converts a raw byte as an 8-bit character array of 1s and 0s.

Definition at line 804 of file tools.cpp.

void convertUcharToBinary ( unsigned char  val,
int *  binaryArray 
)

Definition at line 334 of file tools.cpp.

int countElementsInFolder ( const char *  folderName,
vector< string > &  elementNames,
int  elementType 
)

Counts and returns a list of all specified elements within a folder.

Definition at line 345 of file tools.cpp.

double distBetweenPts ( cv::Point3d &  P1,
cv::Point3d &  P2 
)

Distance between two 3D points in double format.

Definition at line 48 of file tools.cpp.

double distBetweenPts ( cv::Point P1,
cv::Point P2 
)

Calculates the distance between two "Point" points.

Definition at line 52 of file tools.cpp.

double distBetweenPts2f ( cv::Point2f &  P1,
cv::Point2f &  P2 
)

Calculates the distance between two "Point2f" points.

Definition at line 37 of file tools.cpp.

long long int factorial ( int  num)

Calculates Factorial of an integer.

Definition at line 689 of file tools.cpp.

double findEquivalentProbabilityScore ( double *  values,
int  quantity,
double  prob 
)

Selects the score which is minimally better than a specified proportion of all scores.

Definition at line 766 of file tools.cpp.

void findLinearModel ( double *  x,
double *  y,
int  termsToConsider,
double &  m,
double &  c 
)

Definition at line 87 of file tools.cpp.

double findMinimumSeparation ( vector< cv::Point2f > &  pts)

Finds the minimum separation between any two points in a set.

Definition at line 62 of file tools.cpp.

double getInterpolatedVal ( const cv::Mat &  img,
cv::Point2f &  coord 
)

Definition at line 202 of file tools.cpp.

void getNextCombo ( vector< unsigned int > &  currentIndices,
int  r,
int  n 
)

Gets next possible combination for an exhaustive combinatorial search.

Definition at line 701 of file tools.cpp.

cv::Scalar getRandomColour ( )

Definition at line 683 of file tools.cpp.

double lookupValue ( double  xi,
double  yi,
double  maxVal,
const cv::Mat &  lookupMat 
)

Definition at line 179 of file tools.cpp.

bool matricesAreEqual ( cv::Mat &  mat1,
cv::Mat &  mat2 
)

Definition at line 514 of file tools.cpp.

cv::Point2f meanPoint ( cv::Point2f &  P1,
cv::Point2f &  P2 
)

Generates a point that's half way in between the two input points.

Definition at line 82 of file tools.cpp.

double perpDist ( cv::Point2f &  P1,
cv::Point2f &  P2,
cv::Point2f &  P3 
)

Calculates the perpindicular distance between a line (P1 to P2) and a point (P3)

Definition at line 11 of file tools.cpp.

void randomSelection ( vector< unsigned int > &  src,
vector< unsigned int > &  dst,
unsigned int  max 
)

Definition at line 615 of file tools.cpp.

void readPoints ( const char *  filename,
vector< cv::Point2f > &  pts 
)

Definition at line 140 of file tools.cpp.

void redistortPoints ( const vector< cv::Point2f > &  src,
vector< cv::Point2f > &  dst,
const cv::Mat &  cameraMatrix,
const cv::Mat &  distCoeffs,
const cv::Mat &  newCamMat 
)

Redistorts points using an established distortion model.

*

*

Definition at line 391 of file tools.cpp.

double timeElapsedMS ( struct timeval &  timer,
bool  reset 
)

Calculates time elapsed since the last time the timer was reset.

Definition at line 492 of file tools.cpp.

void writePoints ( const char *  filename,
const vector< cv::Point2f > &  pts 
)

Definition at line 127 of file tools.cpp.



thermalvis
Author(s): Stephen Vidas
autogenerated on Sun Jan 5 2014 11:38:45