$search
Definitions for generic geometric calibration. More...
#include "calibration.hpp"
Go to the source code of this file.
Functions | |
void | addToBinMap (Mat &binMap, cv::vector< Point2f > &cornerSet, Size imSize) |
Add a cornerset to the tally matrix. | |
void | addToDistributionMap (Mat &distributionMap, vector< Point2f > &corners) |
Measures the coverage of a cameras field of view by analysing the distribution tally. | |
void | addToRadialDistribution (double *radialDistribution, cv::vector< Point2f > &cornerSet, Size imSize) |
Adds a pointset to a radial distribution array. | |
bool | checkAcutance () |
Checks validity of image for calibration. | |
void | clusterFilter (vector< mserPatch > &patches, vector< vector< Point > > &msers, int totalPatches) |
Filters out MSERs that cannot possibly be part of the geometric pattern. | |
bool | correctPatchCentres (const Mat &image, Size patternSize, vector< Point2f > &patchCentres, int mode) |
Uses contrast enhancement etc to improve positional estimates of patch centres. | |
void | debugDisplayPatches (const Mat &image, vector< vector< Point > > &msers) |
Visually display patches on image. | |
void | debugDisplayPattern (const Mat &image, Size patternSize, Mat &corners, bool mode) |
Visually pattern on image. | |
void | determineFindablePatches (Size patternSize, int mode, int *XVec, int *YVec) |
Determines how many patches can be found in each row and extreme columns. | |
void | determinePatchDistribution (Size patternSize, int mode, int &rows, int &cols, int &quant) |
Determines the distribution of patches based on pattern dimensions and pattern type. | |
void | enclosureFilter (vector< mserPatch > &patches, vector< vector< Point > > &msers) |
Filters out MSERs that are enclosed by or enclose true patches. | |
void | findAllPatches (const Mat &image, Size patternSize, vector< vector< Point > > &msers) |
Find all patches (MSERS - using default settings) in an image. | |
void | findAllPatches2 (const Mat &image, Size patternSize, vector< vector< Point > > &msers, int delta, float max_var, float min_diversity, double area_threshold) |
int | findBestCorners (const Mat &image, vector< Point2f > &src, vector< Point2f > &dst, Size patternSize, int detector, int searchDist) |
Returns the subpixel location of the corner given a decent estimate. | |
void | findCornerPatches (Size imageSize, Size patternSize, int mode, int *XVec, int *YVec, vector< Point2f > &patchCentres, vector< Point2f > &remainingPatches) |
Finds (or simulates) the four corners patches in a pattern. | |
void | findEdgePatches (Size patternSize, int mode, int *XVec, int *YVec, vector< Point2f > &patchCentres, vector< Point2f > &remainingPatches) |
Finds (or simulates) the edge patches in a pattern. | |
void | findInteriorPatches (Size patternSize, int mode, int *XVec, int *YVec, vector< Point2f > &patchCentres, vector< Point2f > &remainingPatches) |
Finds (or simulates) the interior patches in a pattern. | |
bool | findMaskCorners_1 (const Mat &image, Size patternSize, vector< Point2f > &corners, int detector) |
MSER-clustering mask corner locater. | |
bool | findMaskCorners_2 (const Mat &image, Size patternSize, vector< Point2f > &corners, int detector, int mserDelta, float max_var, float min_diversity, double area_threshold) |
bool | findPatchCorners (const Mat &image, Size patternSize, Mat &homography, vector< Point2f > &corners, vector< Point2f > &patchCentres2f, int mode, int detector) |
Estimates the co-ordinates of the corners of the patches. | |
bool | findPatternCentres (const Mat &image, Size patternSize, vector< Point2f > ¢res, int mode) |
Finds just the MSER centres from an image. | |
bool | findPatternCorners (const Mat &image, Size patternSize, vector< Point2f > &corners, int mode, int detector) |
Core pattern-finding function. | |
bool | findPatternCorners2 (const Mat &image, Size patternSize, vector< Point2f > &corners, int mode, int detector, int mserDelta, float max_var, float min_div, double area_threshold) |
void | generateRandomIndexArray (int *randomArray, int maxElements, int maxVal) |
Generates a random set of indices from a valid range. | |
void | groupPointsInQuads (Size patternSize, vector< Point2f > &corners) |
Converts points ordering from row-by-row to quad-clustered. | |
void | initialRefinementOfCorners (const Mat &imGrey, vector< Point2f > &src, Size patternSize) |
Initial attempt to correct locations of all corners based on estimates from MSER centroids. | |
void | interpolateCornerLocations2 (const Mat &image, int mode, Size patternSize, vector< Point2f > &vCentres, vector< Point2f > &vCorners) |
Estimate the locations of patch corners based on patch centroids. | |
double | obtainSetScore (Mat &distributionMap, Mat &binMap, Mat &gaussianMat, cv::vector< Point2f > &cornerSet, double *radialDistribution) |
Calculate the score for a pointset in terms of its contribution to calibration. | |
bool | patternInFrame (Size imSize, vector< Point2f > &patternPoints, int minBorder) |
Checks that the entire pattern is inside the frame by at least a specified margin. | |
void | prepForDisplay (const Mat &distributionMap, Mat &distributionDisplay) |
Blurs and enhances a distribution map to make it more displayable. | |
void | randomCulling (vector< string > &inputList, int maxSearch, vector< vector< vector< Point2f > > > &patterns) |
void | randomCulling (vector< std::string > &inputList, int maxSearch, vector< vector< Point2f > > &patterns) |
Culls some patterns from a vector, and from the corresponding names list. | |
void | randomCulling (vector< std::string > &inputList, int maxSearch) |
Randomly cuts down a list of input files. | |
void | reduceCluster (vector< mserPatch > &patches, vector< vector< Point > > &msers, int totalPatches) |
Filters out most deviant patches to retain only the correct number for the pattern. | |
void | refineCornerPositions (const Mat &image, Size patternSize, vector< Point2f > &vCorners) |
Refines positions of corners through iterative local homography mappings. | |
bool | refinePatches (const Mat &image, Size patternSize, vector< vector< Point > > &msers, vector< Point2f > &patchCentres, int mode) |
Applies various area, colour and positional filters to reduce no. of patches to desired amount. | |
void | reorderPatches (Size patternSize, int mode, int *XVec, int *YVec, vector< Point2f > &patchCentres) |
Re-orders patches into row by row, left to right. | |
void | shapeFilter (vector< mserPatch > &patches, vector< vector< Point > > &msers) |
Filters out MSERs that do not have a realistic shape. | |
void | sortCorners (Size imageSize, Size patternSize, vector< Point2f > &corners) |
Sorts the corners into a standard order to prepare for calibration. | |
void | sortPatches (Size imageSize, Size patternSize, vector< Point2f > &patchCentres, int mode) |
Sorts the patches into a standard order to prepare for homography. | |
void | transferMserElement (vector< vector< Point > > &dst, vector< vector< Point > > &src, int index) |
Move a vector of points from one vector of vectors to another. | |
void | transferPatchElement (vector< mserPatch > &dst, vector< mserPatch > &src, int index) |
Move an MSER-patch from one vector to another, resizing and shifting the old vector. | |
void | varianceFilter (vector< mserPatch > &patches, vector< vector< Point > > &msers) |
Filters out MSERs that have a large amount of internal pixel intensity variance. | |
bool | verifyCorners (Size imSize, Size patternSize, vector< Point2f > &patternPoints, double minDist, double maxDist) |
Verifies that the final patches do actually represent a grid pattern. | |
bool | verifyPatches (Size imSize, Size patternSize, vector< Point2f > &patchCentres, int mode, double minDist, double maxDist) |
Verifies that the final patches do actually represent a grid pattern. | |
bool | verifyPattern (Size imSize, Size patternSize, vector< Point2f > &patternPoints, double minDist, double maxDist) |
Generic grid verification function. |
Definitions for generic geometric calibration.
Definition in file calibration.cpp.
void addToBinMap | ( | Mat & | binMap, | |
cv::vector< Point2f > & | cornerSet, | |||
Size | imSize | |||
) |
Add a cornerset to the tally matrix.
Definition at line 1954 of file calibration.cpp.
void addToDistributionMap | ( | Mat & | distributionMap, | |
vector< Point2f > & | corners | |||
) |
Measures the coverage of a cameras field of view by analysing the distribution tally.
Definition at line 2015 of file calibration.cpp.
void addToRadialDistribution | ( | double * | radialDistribution, | |
cv::vector< Point2f > & | cornerSet, | |||
Size | imSize | |||
) |
Adds a pointset to a radial distribution array.
Definition at line 1986 of file calibration.cpp.
bool checkAcutance | ( | ) |
Checks validity of image for calibration.
Definition at line 155 of file calibration.cpp.
void clusterFilter | ( | vector< mserPatch > & | patches, | |
vector< vector< Point > > & | msers, | |||
int | totalPatches | |||
) |
Filters out MSERs that cannot possibly be part of the geometric pattern.
Definition at line 4180 of file calibration.cpp.
bool correctPatchCentres | ( | const Mat & | image, | |
Size | patternSize, | |||
vector< Point2f > & | patchCentres, | |||
int | mode | |||
) |
Uses contrast enhancement etc to improve positional estimates of patch centres.
Definition at line 3322 of file calibration.cpp.
void debugDisplayPatches | ( | const Mat & | image, | |
vector< vector< Point > > & | msers | |||
) |
Visually display patches on image.
Definition at line 434 of file calibration.cpp.
void debugDisplayPattern | ( | const Mat & | image, | |
Size | patternSize, | |||
Mat & | corners, | |||
bool | mode | |||
) |
Visually pattern on image.
Definition at line 1410 of file calibration.cpp.
void determineFindablePatches | ( | Size | patternSize, | |
int | mode, | |||
int * | XVec, | |||
int * | YVec | |||
) |
Determines how many patches can be found in each row and extreme columns.
Definition at line 458 of file calibration.cpp.
void determinePatchDistribution | ( | Size | patternSize, | |
int | mode, | |||
int & | rows, | |||
int & | cols, | |||
int & | quant | |||
) |
Determines the distribution of patches based on pattern dimensions and pattern type.
Definition at line 162 of file calibration.cpp.
Filters out MSERs that are enclosed by or enclose true patches.
Definition at line 3962 of file calibration.cpp.
void findAllPatches | ( | const Mat & | image, | |
Size | patternSize, | |||
vector< vector< Point > > & | msers | |||
) |
Find all patches (MSERS - using default settings) in an image.
Definition at line 179 of file calibration.cpp.
void findAllPatches2 | ( | const Mat & | image, | |
Size | patternSize, | |||
vector< vector< Point > > & | msers, | |||
int | delta, | |||
float | max_var, | |||
float | min_diversity, | |||
double | area_threshold | |||
) |
Definition at line 280 of file calibration.cpp.
int findBestCorners | ( | const Mat & | image, | |
vector< Point2f > & | src, | |||
vector< Point2f > & | dst, | |||
Size | patternSize, | |||
int | detector, | |||
int | searchDist | |||
) |
Returns the subpixel location of the corner given a decent estimate.
Definition at line 2882 of file calibration.cpp.
void findCornerPatches | ( | Size | imageSize, | |
Size | patternSize, | |||
int | mode, | |||
int * | XVec, | |||
int * | YVec, | |||
vector< Point2f > & | patchCentres, | |||
vector< Point2f > & | remainingPatches | |||
) |
Finds (or simulates) the four corners patches in a pattern.
Definition at line 538 of file calibration.cpp.
void findEdgePatches | ( | Size | patternSize, | |
int | mode, | |||
int * | XVec, | |||
int * | YVec, | |||
vector< Point2f > & | patchCentres, | |||
vector< Point2f > & | remainingPatches | |||
) |
Finds (or simulates) the edge patches in a pattern.
Definition at line 801 of file calibration.cpp.
void findInteriorPatches | ( | Size | patternSize, | |
int | mode, | |||
int * | XVec, | |||
int * | YVec, | |||
vector< Point2f > & | patchCentres, | |||
vector< Point2f > & | remainingPatches | |||
) |
Finds (or simulates) the interior patches in a pattern.
Definition at line 1015 of file calibration.cpp.
bool findMaskCorners_1 | ( | const Mat & | image, | |
Size | patternSize, | |||
vector< Point2f > & | corners, | |||
int | detector | |||
) |
MSER-clustering mask corner locater.
Definition at line 129 of file calibration.cpp.
bool findMaskCorners_2 | ( | const Mat & | image, | |
Size | patternSize, | |||
vector< Point2f > & | corners, | |||
int | detector, | |||
int | mserDelta, | |||
float | max_var, | |||
float | min_diversity, | |||
double | area_threshold | |||
) |
Definition at line 142 of file calibration.cpp.
bool findPatchCorners | ( | const Mat & | image, | |
Size | patternSize, | |||
Mat & | homography, | |||
vector< Point2f > & | corners, | |||
vector< Point2f > & | patchCentres2f, | |||
int | mode, | |||
int | detector | |||
) |
Estimates the co-ordinates of the corners of the patches.
Definition at line 2215 of file calibration.cpp.
bool findPatternCentres | ( | const Mat & | image, | |
Size | patternSize, | |||
vector< Point2f > & | centres, | |||
int | mode | |||
) |
Finds just the MSER centres from an image.
Definition at line 3585 of file calibration.cpp.
bool findPatternCorners | ( | const Mat & | image, | |
Size | patternSize, | |||
vector< Point2f > & | corners, | |||
int | mode, | |||
int | detector | |||
) |
Core pattern-finding function.
Definition at line 1445 of file calibration.cpp.
bool findPatternCorners2 | ( | const Mat & | image, | |
Size | patternSize, | |||
vector< Point2f > & | corners, | |||
int | mode, | |||
int | detector, | |||
int | mserDelta, | |||
float | max_var, | |||
float | min_div, | |||
double | area_threshold | |||
) |
Definition at line 1599 of file calibration.cpp.
void generateRandomIndexArray | ( | int * | randomArray, | |
int | maxElements, | |||
int | maxVal | |||
) |
Generates a random set of indices from a valid range.
Definition at line 7 of file calibration.cpp.
void groupPointsInQuads | ( | Size | patternSize, | |
vector< Point2f > & | corners | |||
) |
Converts points ordering from row-by-row to quad-clustered.
Definition at line 2855 of file calibration.cpp.
void initialRefinementOfCorners | ( | const Mat & | imGrey, | |
vector< Point2f > & | src, | |||
Size | patternSize | |||
) |
Initial attempt to correct locations of all corners based on estimates from MSER centroids.
Definition at line 3171 of file calibration.cpp.
void interpolateCornerLocations2 | ( | const Mat & | image, | |
int | mode, | |||
Size | patternSize, | |||
vector< Point2f > & | vCentres, | |||
vector< Point2f > & | vCorners | |||
) |
Estimate the locations of patch corners based on patch centroids.
Definition at line 1753 of file calibration.cpp.
double obtainSetScore | ( | Mat & | distributionMap, | |
Mat & | binMap, | |||
Mat & | gaussianMat, | |||
cv::vector< Point2f > & | cornerSet, | |||
double * | radialDistribution | |||
) |
Calculate the score for a pointset in terms of its contribution to calibration.
Definition at line 2023 of file calibration.cpp.
bool patternInFrame | ( | Size | imSize, | |
vector< Point2f > & | patternPoints, | |||
int | minBorder | |||
) |
Checks that the entire pattern is inside the frame by at least a specified margin.
Definition at line 3873 of file calibration.cpp.
void prepForDisplay | ( | const Mat & | distributionMap, | |
Mat & | distributionDisplay | |||
) |
Blurs and enhances a distribution map to make it more displayable.
Definition at line 1968 of file calibration.cpp.
void randomCulling | ( | vector< string > & | inputList, | |
int | maxSearch, | |||
vector< vector< vector< Point2f > > > & | patterns | |||
) |
Definition at line 409 of file calibration.cpp.
void randomCulling | ( | vector< std::string > & | inputList, | |
int | maxSearch, | |||
vector< vector< Point2f > > & | patterns | |||
) |
Culls some patterns from a vector, and from the corresponding names list.
Definition at line 394 of file calibration.cpp.
void randomCulling | ( | vector< std::string > & | inputList, | |
int | maxSearch | |||
) |
Randomly cuts down a list of input files.
Definition at line 380 of file calibration.cpp.
void reduceCluster | ( | vector< mserPatch > & | patches, | |
vector< vector< Point > > & | msers, | |||
int | totalPatches | |||
) |
Filters out most deviant patches to retain only the correct number for the pattern.
Definition at line 4095 of file calibration.cpp.
void refineCornerPositions | ( | const Mat & | image, | |
Size | patternSize, | |||
vector< Point2f > & | vCorners | |||
) |
Refines positions of corners through iterative local homography mappings.
Definition at line 2307 of file calibration.cpp.
bool refinePatches | ( | const Mat & | image, | |
Size | patternSize, | |||
vector< vector< Point > > & | msers, | |||
vector< Point2f > & | patchCentres, | |||
int | mode | |||
) |
Applies various area, colour and positional filters to reduce no. of patches to desired amount.
Definition at line 4429 of file calibration.cpp.
void reorderPatches | ( | Size | patternSize, | |
int | mode, | |||
int * | XVec, | |||
int * | YVec, | |||
vector< Point2f > & | patchCentres | |||
) |
Re-orders patches into row by row, left to right.
Definition at line 1322 of file calibration.cpp.
Filters out MSERs that do not have a realistic shape.
Definition at line 3893 of file calibration.cpp.
void sortCorners | ( | Size | imageSize, | |
Size | patternSize, | |||
vector< Point2f > & | corners | |||
) |
Sorts the corners into a standard order to prepare for calibration.
Definition at line 3280 of file calibration.cpp.
void sortPatches | ( | Size | imageSize, | |
Size | patternSize, | |||
vector< Point2f > & | patchCentres, | |||
int | mode | |||
) |
Sorts the patches into a standard order to prepare for homography.
Definition at line 1232 of file calibration.cpp.
void transferMserElement | ( | vector< vector< Point > > & | dst, | |
vector< vector< Point > > & | src, | |||
int | index | |||
) |
Move a vector of points from one vector of vectors to another.
Definition at line 4417 of file calibration.cpp.
Move an MSER-patch from one vector to another, resizing and shifting the old vector.
Definition at line 4405 of file calibration.cpp.
Filters out MSERs that have a large amount of internal pixel intensity variance.
Definition at line 3934 of file calibration.cpp.
bool verifyCorners | ( | Size | imSize, | |
Size | patternSize, | |||
vector< Point2f > & | patternPoints, | |||
double | minDist, | |||
double | maxDist | |||
) |
Verifies that the final patches do actually represent a grid pattern.
Definition at line 2295 of file calibration.cpp.
bool verifyPatches | ( | Size | imSize, | |
Size | patternSize, | |||
vector< Point2f > & | patchCentres, | |||
int | mode, | |||
double | minDist, | |||
double | maxDist | |||
) |
Verifies that the final patches do actually represent a grid pattern.
Definition at line 3831 of file calibration.cpp.
bool verifyPattern | ( | Size | imSize, | |
Size | patternSize, | |||
vector< Point2f > & | patternPoints, | |||
double | minDist, | |||
double | maxDist | |||
) |
Generic grid verification function.
Definition at line 3667 of file calibration.cpp.