Basic Image AlgorithmS Library
2.8.0
|
#include <Utils/GenGroundTruth.hh>
Static Public Member Functions | |
static void | CreateIdealMatches (std::vector< BIAS::PMatrix > &pvec, unsigned num, unsigned width, unsigned height, std::vector< std::vector< BIAS::HomgPoint2D > > &matches, std::vector< BIAS::HomgPoint3D > &points, double minx=-50.0, double maxx=50.0, double miny=-50.0, double maxy=50.0, double minz=-50.0, double maxz=50.0) |
Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras. More... | |
static void | CreateMatches (std::vector< BIAS::PMatrix > &pvec, unsigned num, unsigned width, unsigned height, double spatial_noise, std::vector< std::vector< BIAS::HomgPoint2D > > &i_matches, std::vector< std::vector< BIAS::HomgPoint2D > > &n_matches, std::vector< BIAS::HomgPoint3D > &points, double minx=-50.0, double maxx=50.0, double miny=-50.0, double maxy=50.0, double minz=-50.0, double maxz=50.0) |
Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras Adds spatial noise with sigma spatial_noise to position of 2D points in every camera. More... | |
static void | CreateMatches (std::vector< BIAS::PMatrix > &pvec, std::vector< BIAS::PMatrix > &n_pvec, unsigned num, unsigned width, unsigned height, double spatial_noise, double r_noise, double c_noise, std::vector< std::vector< BIAS::HomgPoint2D > > &i_matches, std::vector< std::vector< BIAS::HomgPoint2D > > &n_matches, std::vector< BIAS::HomgPoint3D > &points, double minx=-50.0, double maxx=50.0, double miny=-50.0, double maxy=50.0, double minz=-50.0, double maxz=50.0, bool print=false) |
Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras. More... | |
static void | CreateMatchesOutlier (std::vector< BIAS::PMatrix > &pvec, std::vector< BIAS::PMatrix > &n_pvec, unsigned num, unsigned width, unsigned height, double spatial_noise, double r_noise, double c_noise, double outlier_fraction, std::vector< std::vector< BIAS::HomgPoint2D > > &i_matches, std::vector< std::vector< BIAS::HomgPoint2D > > &n_matches, std::vector< BIAS::HomgPoint3D > &points, double minx=-50.0, double maxx=50.0, double miny=-50.0, double maxy=50.0, double minz=-50.0, double maxz=50.0, bool print=false) |
Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras. More... | |
static void | DeNormalizeMatches (std::vector< BIAS::HomgPoint2D > &match1, std::vector< BIAS::HomgPoint2D > &match2, BIAS::KMatrix K) |
de-normalizes the matches by multiplying with K More... | |
static void | DrawMatches (BIAS::Image< unsigned char > &im, std::vector< BIAS::HomgPoint2D > &match1, std::vector< BIAS::HomgPoint2D > &match2, unsigned char lcolor, unsigned char mcolor) |
draws the matches in image im with background 0, match in color mcolor and line defined by match in color lcolcor woelk 05 2003 More... | |
static void | GenerateRandomCube (std::vector< BIAS::HomgPoint3D > &Points, int n=200, double aX=-50.0, double aY=-50.0, double aZ=-50.0, double alphaX=1.0, double alphaY=0.0, double alphaZ=0.0, double betaX=0.0, double betaY=1.0, double betaZ=0.0, double gammaX=0.0, double gammaY=0.0, double gammaZ=1.0, double alphamax=100.0, double betamax=100.0, double gammamax=100.0) |
Generates 'n' points which are all located in a cube specified by space point coords aX, aY, aZ and the coords of three spanning vectors alphaX, alphaY, alphaZ and betaX, betaY, betaZ and gammaX, gammaY, gammaZ, which are normalized internally. More... | |
static void | GenerateRandomPlane (std::vector< BIAS::HomgPoint3D > &Points, int n=200, double aX=-50.0, double aY=-50.0, double aZ=0.0, double alphaX=1.0, double alphaY=0.0, double alphaZ=0.0, double betaX=0.0, double betaY=1.0, double betaZ=0.0, double alphamax=100.0, double betamax=100.0) |
Generates 'n' points which are all located on a plane specified by space point coords aX, aY, aZ and the coords of two spanning vectors alphaX, alphaY, alphaZ and betaX, betaY, betaZ, which are normalized internally. More... | |
static void | NormalizeMatches (std::vector< BIAS::HomgPoint2D > &match1, std::vector< BIAS::HomgPoint2D > &match2, BIAS::KMatrix K) |
normalizes the matches by multiplying with K^-1 More... | |
static int | ReadCorrespondences (const char *Filename, std::vector< BIAS::HomgPoint2D > &Points1, std::vector< BIAS::HomgPoint2D > &Points2) |
static int | ReadWorldPoints (const char *Filename, std::vector< BIAS::HomgPoint3D > &Points) |
Read 3D world coordinates from a file in binary format. More... | |
static int | WriteCorrespondences (const char *Filename, std::vector< BIAS::HomgPoint2D > &Points1, std::vector< BIAS::HomgPoint2D > &Points2) |
Store 2D picture correspondences in a file in binary format, so that you can keep the full accuracy of a double. More... | |
static int | WriteWorldPoints (const char *Filename, std::vector< BIAS::HomgPoint3D > &Points) |
Store 3D world coordinates in a file in binary format, so that you can keep the full accuracy of a double. More... | |
Definition at line 41 of file GenGroundTruth.hh.
|
static |
Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras.
Definition at line 95 of file GenGroundTruth.cpp.
References BIAS::Random::GetUniformDistributed(), and BIAS::HomgPoint2D::Homogenize().
|
static |
Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras Adds spatial noise with sigma spatial_noise to position of 2D points in every camera.
The ideal matches are returned in i_matches, the noisy matches are returned in n_matches.
Definition at line 140 of file GenGroundTruth.cpp.
References BIAS::Random::GetNormalDistributed(), BIAS::Random::GetUniformDistributed(), and BIAS::HomgPoint3D::Homogenize().
|
static |
Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras.
Adds spatial noise with a sigma of spatial_noise to position of 2D points in every camera. The ideal matches are returned in i_matches, the noisy matches are returned in n_matches. An additional normal ditributed position error with sigma of c_noise and a normal distributed rotational error with sigma of r_noise are assumed for the camera matrices. The noisy camera matrices are returned in n_pvec.
Definition at line 195 of file GenGroundTruth.cpp.
References BIAS::PMatrix::Compose(), BIAS::Random::GetNormalDistributed(), BIAS::RMatrixBase::GetRotationAnglesXYZ(), BIAS::Random::GetUniformDistributed(), BIAS::HomgPoint3D::Homogenize(), BIAS::HomgPoint2D::Homogenize(), and BIAS::RMatrixBase::SetXYZ().
|
static |
Generates ideal matches in cameras from pvec by randomly creating a 3D point in the cube between min[x,y,z] and max[x,y,z] and than looking if it projects into all cameras.
Adds spatial noise with a sigma of spatial_noise to position of 2D points in every camera. The ideal matches are returned in i_matches, the noisy matches are returned in n_matches. An additional normal ditributed position error with sigma of c_noise and a normal distributed rotational error with sigma of r_noise are assumed for the camera matrices. The noisy camera matrices are returned in n_pvec. outlier_fraction of the matches are outlier. They are generated by adding a random offset to each x and y of each point after image 0. The offset is generated between 2*spatial_noise and 10*spatial_noise.
Definition at line 311 of file GenGroundTruth.cpp.
References BIAS::Random::GetUniformDistributed().
|
static |
de-normalizes the matches by multiplying with K
Definition at line 51 of file GenGroundTruth.cpp.
|
static |
draws the matches in image im with background 0, match in color mcolor and line defined by match in color lcolcor woelk 05 2003
Definition at line 61 of file GenGroundTruth.cpp.
References BIAS::ImageBase::GetHeight(), BIAS::HomgLine2D::GetIntersectionsWithImage(), BIAS::ImageBase::GetWidth(), and BIAS::HomgLine2D::Set().
|
static |
Generates 'n' points which are all located in a cube specified by space point coords aX, aY, aZ and the coords of three spanning vectors alphaX, alphaY, alphaZ and betaX, betaY, betaZ and gammaX, gammaY, gammaZ, which are normalized internally.
'alphamax', 'betamax' and 'gammamax' define width, height and depth of the cube. This method does not clear the result vector 'Points'! By default it generates 200 points on a rectangular 100x100x100 cube centered at 0 0 0.
Definition at line 388 of file GenGroundTruth.cpp.
References BIAS::Random::GetUniformDistributed(), and BIAS::Vector3< T >::Normalize().
|
static |
Generates 'n' points which are all located on a plane specified by space point coords aX, aY, aZ and the coords of two spanning vectors alphaX, alphaY, alphaZ and betaX, betaY, betaZ, which are normalized internally.
'alphamax' and 'betamax' define width and height of the plane. This method does not clear the result vector 'Points'! By default it generates 200 points on a rectangular 100x100 plane in the x-y-plane. This method implicitly calls GenerateRandomCube with the third dimension set to zero.
Definition at line 373 of file GenGroundTruth.cpp.
|
static |
normalizes the matches by multiplying with K^-1
Definition at line 40 of file GenGroundTruth.cpp.
References BIAS::KMatrix::Invert().
|
static |
Definition at line 420 of file GenGroundTruth.cpp.
References BIAS::HomgPoint2D.
|
static |
Read 3D world coordinates from a file in binary format.
tested
Definition at line 480 of file GenGroundTruth.cpp.
References BIAS::HomgPoint3D.
|
static |
Store 2D picture correspondences in a file in binary format, so that you can keep the full accuracy of a double.
tested
Definition at line 454 of file GenGroundTruth.cpp.
|
static |
Store 3D world coordinates in a file in binary format, so that you can keep the full accuracy of a double.
tested
Definition at line 507 of file GenGroundTruth.cpp.