123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529 |
- /***********************************************************
- * File generated by the HALCON-Compiler hcomp version 20.11
- * Usage: Interface to C++
- *
- * Software by: MVTec Software GmbH, www.mvtec.com
- ***********************************************************/
- #ifndef HCPP_HPOSE
- #define HCPP_HPOSE
- namespace HalconCpp
- {
- // Represents a rigid 3D transformation with 7 parameters (3 for the rotation, 3 for the translation, 1 for the representation type).
- class LIntExport HPose : public HDataBase
- {
- public:
- // Create an uninitialized instance
- HPose():HDataBase() {}
- // Copy constructor
- HPose(const HPose& source) : HDataBase(source) {}
- // Constructor from HTuple
- explicit HPose(const HTuple& tuple) : HDataBase(tuple) {}
- // Deep copy of all data represented by this object instance
- HPose Clone() const;
- /*****************************************************************************
- * Operator-based class constructors
- *****************************************************************************/
- // create_pose: Create a 3D pose.
- explicit HPose(double TransX, double TransY, double TransZ, double RotX, double RotY, double RotZ, const HString& OrderOfTransform, const HString& OrderOfRotation, const HString& ViewOfTransform);
- // create_pose: Create a 3D pose.
- explicit HPose(double TransX, double TransY, double TransZ, double RotX, double RotY, double RotZ, const char* OrderOfTransform, const char* OrderOfRotation, const char* ViewOfTransform);
- #ifdef _WIN32
- // create_pose: Create a 3D pose.
- explicit HPose(double TransX, double TransY, double TransZ, double RotX, double RotY, double RotZ, const wchar_t* OrderOfTransform, const wchar_t* OrderOfRotation, const wchar_t* ViewOfTransform);
- #endif
- /*****************************************************************************
- * Operator overloads
- *****************************************************************************/
- // Convert to matrix
- operator HHomMat3D() const;
- /***************************************************************************
- * Operators *
- ***************************************************************************/
- // Compute the average of a set of poses.
- static HPose PoseAverage(const HPoseArray& Poses, const HTuple& Weights, const HString& Mode, const HTuple& SigmaT, const HTuple& SigmaR, HTuple* Quality);
- // Compute the average of a set of poses.
- static HPose PoseAverage(const HPoseArray& Poses, const HTuple& Weights, const HString& Mode, double SigmaT, double SigmaR, HTuple* Quality);
- // Compute the average of a set of poses.
- static HPose PoseAverage(const HPoseArray& Poses, const HTuple& Weights, const char* Mode, double SigmaT, double SigmaR, HTuple* Quality);
- #ifdef _WIN32
- // Compute the average of a set of poses.
- static HPose PoseAverage(const HPoseArray& Poses, const HTuple& Weights, const wchar_t* Mode, double SigmaT, double SigmaR, HTuple* Quality);
- #endif
- // Invert each pose in a tuple of 3D poses.
- static HPoseArray PoseInvert(const HPoseArray& Pose);
- // Invert each pose in a tuple of 3D poses.
- HPose PoseInvert() const;
- // Combine 3D poses given in two tuples.
- static HPoseArray PoseCompose(const HPoseArray& PoseLeft, const HPoseArray& PoseRight);
- // Combine 3D poses given in two tuples.
- HPose PoseCompose(const HPose& PoseRight) const;
- // Compute the distance values for a rectified stereo image pair using multi-scanline optimization.
- HImage BinocularDistanceMs(const HImage& ImageRect1, const HImage& ImageRect2, HImage* Score, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, Hlong MinDisparity, Hlong MaxDisparity, Hlong SurfaceSmoothing, Hlong EdgeSmoothing, const HTuple& GenParamName, const HTuple& GenParamValue) const;
- // Compute the distance values for a rectified stereo image pair using multi-scanline optimization.
- HImage BinocularDistanceMs(const HImage& ImageRect1, const HImage& ImageRect2, HImage* Score, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, Hlong MinDisparity, Hlong MaxDisparity, Hlong SurfaceSmoothing, Hlong EdgeSmoothing, const HString& GenParamName, const HString& GenParamValue) const;
- // Compute the distance values for a rectified stereo image pair using multi-scanline optimization.
- HImage BinocularDistanceMs(const HImage& ImageRect1, const HImage& ImageRect2, HImage* Score, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, Hlong MinDisparity, Hlong MaxDisparity, Hlong SurfaceSmoothing, Hlong EdgeSmoothing, const char* GenParamName, const char* GenParamValue) const;
- #ifdef _WIN32
- // Compute the distance values for a rectified stereo image pair using multi-scanline optimization.
- HImage BinocularDistanceMs(const HImage& ImageRect1, const HImage& ImageRect2, HImage* Score, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, Hlong MinDisparity, Hlong MaxDisparity, Hlong SurfaceSmoothing, Hlong EdgeSmoothing, const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
- #endif
- // Compute the distance values for a rectified stereo image pair using multigrid methods.
- HImage BinocularDistanceMg(const HImage& ImageRect1, const HImage& ImageRect2, HImage* Score, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, double GrayConstancy, double GradientConstancy, double Smoothness, double InitialGuess, const HString& CalculateScore, const HTuple& MGParamName, const HTuple& MGParamValue) const;
- // Compute the distance values for a rectified stereo image pair using multigrid methods.
- HImage BinocularDistanceMg(const HImage& ImageRect1, const HImage& ImageRect2, HImage* Score, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, double GrayConstancy, double GradientConstancy, double Smoothness, double InitialGuess, const HString& CalculateScore, const HString& MGParamName, const HString& MGParamValue) const;
- // Compute the distance values for a rectified stereo image pair using multigrid methods.
- HImage BinocularDistanceMg(const HImage& ImageRect1, const HImage& ImageRect2, HImage* Score, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, double GrayConstancy, double GradientConstancy, double Smoothness, double InitialGuess, const char* CalculateScore, const char* MGParamName, const char* MGParamValue) const;
- #ifdef _WIN32
- // Compute the distance values for a rectified stereo image pair using multigrid methods.
- HImage BinocularDistanceMg(const HImage& ImageRect1, const HImage& ImageRect2, HImage* Score, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, double GrayConstancy, double GradientConstancy, double Smoothness, double InitialGuess, const wchar_t* CalculateScore, const wchar_t* MGParamName, const wchar_t* MGParamValue) const;
- #endif
- // Compute the fundamental matrix from the relative orientation of two cameras.
- HHomMat2D RelPoseToFundamentalMatrix(const HTuple& CovRelPose, const HCamPar& CamPar1, const HCamPar& CamPar2, HTuple* CovFMat) const;
- // Compute the relative orientation between two cameras given image point correspondences and known camera parameters and reconstruct 3D space points.
- HTuple VectorToRelPose(const HTuple& Rows1, const HTuple& Cols1, const HTuple& Rows2, const HTuple& Cols2, const HTuple& CovRR1, const HTuple& CovRC1, const HTuple& CovCC1, const HTuple& CovRR2, const HTuple& CovRC2, const HTuple& CovCC2, const HCamPar& CamPar1, const HCamPar& CamPar2, const HString& Method, HTuple* Error, HTuple* X, HTuple* Y, HTuple* Z, HTuple* CovXYZ);
- // Compute the relative orientation between two cameras given image point correspondences and known camera parameters and reconstruct 3D space points.
- HTuple VectorToRelPose(const HTuple& Rows1, const HTuple& Cols1, const HTuple& Rows2, const HTuple& Cols2, const HTuple& CovRR1, const HTuple& CovRC1, const HTuple& CovCC1, const HTuple& CovRR2, const HTuple& CovRC2, const HTuple& CovCC2, const HCamPar& CamPar1, const HCamPar& CamPar2, const HString& Method, double* Error, HTuple* X, HTuple* Y, HTuple* Z, HTuple* CovXYZ);
- // Compute the relative orientation between two cameras given image point correspondences and known camera parameters and reconstruct 3D space points.
- HTuple VectorToRelPose(const HTuple& Rows1, const HTuple& Cols1, const HTuple& Rows2, const HTuple& Cols2, const HTuple& CovRR1, const HTuple& CovRC1, const HTuple& CovCC1, const HTuple& CovRR2, const HTuple& CovRC2, const HTuple& CovCC2, const HCamPar& CamPar1, const HCamPar& CamPar2, const char* Method, double* Error, HTuple* X, HTuple* Y, HTuple* Z, HTuple* CovXYZ);
- #ifdef _WIN32
- // Compute the relative orientation between two cameras given image point correspondences and known camera parameters and reconstruct 3D space points.
- HTuple VectorToRelPose(const HTuple& Rows1, const HTuple& Cols1, const HTuple& Rows2, const HTuple& Cols2, const HTuple& CovRR1, const HTuple& CovRC1, const HTuple& CovCC1, const HTuple& CovRR2, const HTuple& CovRC2, const HTuple& CovCC2, const HCamPar& CamPar1, const HCamPar& CamPar2, const wchar_t* Method, double* Error, HTuple* X, HTuple* Y, HTuple* Z, HTuple* CovXYZ);
- #endif
- // Compute the relative orientation between two cameras by automatically finding correspondences between image points.
- HTuple MatchRelPoseRansac(const HImage& Image1, const HImage& Image2, const HTuple& Rows1, const HTuple& Cols1, const HTuple& Rows2, const HTuple& Cols2, const HCamPar& CamPar1, const HCamPar& CamPar2, const HString& GrayMatchMethod, Hlong MaskSize, Hlong RowMove, Hlong ColMove, Hlong RowTolerance, Hlong ColTolerance, const HTuple& Rotation, const HTuple& MatchThreshold, const HString& EstimationMethod, const HTuple& DistanceThreshold, Hlong RandSeed, HTuple* Error, HTuple* Points1, HTuple* Points2);
- // Compute the relative orientation between two cameras by automatically finding correspondences between image points.
- HTuple MatchRelPoseRansac(const HImage& Image1, const HImage& Image2, const HTuple& Rows1, const HTuple& Cols1, const HTuple& Rows2, const HTuple& Cols2, const HCamPar& CamPar1, const HCamPar& CamPar2, const HString& GrayMatchMethod, Hlong MaskSize, Hlong RowMove, Hlong ColMove, Hlong RowTolerance, Hlong ColTolerance, double Rotation, Hlong MatchThreshold, const HString& EstimationMethod, double DistanceThreshold, Hlong RandSeed, double* Error, HTuple* Points1, HTuple* Points2);
- // Compute the relative orientation between two cameras by automatically finding correspondences between image points.
- HTuple MatchRelPoseRansac(const HImage& Image1, const HImage& Image2, const HTuple& Rows1, const HTuple& Cols1, const HTuple& Rows2, const HTuple& Cols2, const HCamPar& CamPar1, const HCamPar& CamPar2, const char* GrayMatchMethod, Hlong MaskSize, Hlong RowMove, Hlong ColMove, Hlong RowTolerance, Hlong ColTolerance, double Rotation, Hlong MatchThreshold, const char* EstimationMethod, double DistanceThreshold, Hlong RandSeed, double* Error, HTuple* Points1, HTuple* Points2);
- #ifdef _WIN32
- // Compute the relative orientation between two cameras by automatically finding correspondences between image points.
- HTuple MatchRelPoseRansac(const HImage& Image1, const HImage& Image2, const HTuple& Rows1, const HTuple& Cols1, const HTuple& Rows2, const HTuple& Cols2, const HCamPar& CamPar1, const HCamPar& CamPar2, const wchar_t* GrayMatchMethod, Hlong MaskSize, Hlong RowMove, Hlong ColMove, Hlong RowTolerance, Hlong ColTolerance, double Rotation, Hlong MatchThreshold, const wchar_t* EstimationMethod, double DistanceThreshold, Hlong RandSeed, double* Error, HTuple* Points1, HTuple* Points2);
- #endif
- // Compute the distance values for a rectified stereo image pair using correlation techniques.
- HImage BinocularDistance(const HImage& ImageRect1, const HImage& ImageRect2, HImage* Score, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, const HString& Method, Hlong MaskWidth, Hlong MaskHeight, const HTuple& TextureThresh, Hlong MinDisparity, Hlong MaxDisparity, Hlong NumLevels, const HTuple& ScoreThresh, const HTuple& Filter, const HTuple& SubDistance) const;
- // Compute the distance values for a rectified stereo image pair using correlation techniques.
- HImage BinocularDistance(const HImage& ImageRect1, const HImage& ImageRect2, HImage* Score, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, const HString& Method, Hlong MaskWidth, Hlong MaskHeight, double TextureThresh, Hlong MinDisparity, Hlong MaxDisparity, Hlong NumLevels, double ScoreThresh, const HString& Filter, const HString& SubDistance) const;
- // Compute the distance values for a rectified stereo image pair using correlation techniques.
- HImage BinocularDistance(const HImage& ImageRect1, const HImage& ImageRect2, HImage* Score, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, const char* Method, Hlong MaskWidth, Hlong MaskHeight, double TextureThresh, Hlong MinDisparity, Hlong MaxDisparity, Hlong NumLevels, double ScoreThresh, const char* Filter, const char* SubDistance) const;
- #ifdef _WIN32
- // Compute the distance values for a rectified stereo image pair using correlation techniques.
- HImage BinocularDistance(const HImage& ImageRect1, const HImage& ImageRect2, HImage* Score, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, const wchar_t* Method, Hlong MaskWidth, Hlong MaskHeight, double TextureThresh, Hlong MinDisparity, Hlong MaxDisparity, Hlong NumLevels, double ScoreThresh, const wchar_t* Filter, const wchar_t* SubDistance) const;
- #endif
- // Get a 3D point from the intersection of two lines of sight within a binocular camera system.
- void IntersectLinesOfSight(const HCamPar& CamParam1, const HCamPar& CamParam2, const HTuple& Row1, const HTuple& Col1, const HTuple& Row2, const HTuple& Col2, HTuple* X, HTuple* Y, HTuple* Z, HTuple* Dist) const;
- // Get a 3D point from the intersection of two lines of sight within a binocular camera system.
- void IntersectLinesOfSight(const HCamPar& CamParam1, const HCamPar& CamParam2, double Row1, double Col1, double Row2, double Col2, double* X, double* Y, double* Z, double* Dist) const;
- // Transform a disparity image into 3D points in a rectified stereo system.
- HImage DisparityImageToXyz(const HImage& Disparity, HImage* Y, HImage* Z, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2) const;
- // Transform an image point and its disparity into a 3D point in a rectified stereo system.
- void DisparityToPoint3d(const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, const HTuple& Row1, const HTuple& Col1, const HTuple& Disparity, HTuple* X, HTuple* Y, HTuple* Z) const;
- // Transform an image point and its disparity into a 3D point in a rectified stereo system.
- void DisparityToPoint3d(const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, double Row1, double Col1, double Disparity, double* X, double* Y, double* Z) const;
- // Transform a disparity value into a distance value in a rectified binocular stereo system.
- HTuple DisparityToDistance(const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, const HTuple& Disparity) const;
- // Transform a disparity value into a distance value in a rectified binocular stereo system.
- double DisparityToDistance(const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, double Disparity) const;
- // Transform a distance value into a disparity in a rectified stereo system.
- HTuple DistanceToDisparity(const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, const HTuple& Distance) const;
- // Transform a distance value into a disparity in a rectified stereo system.
- double DistanceToDisparity(const HCamPar& CamParamRect1, const HCamPar& CamParamRect2, double Distance) const;
- // Generate transformation maps that describe the mapping of the images of a binocular camera pair to a common rectified image plane.
- HImage GenBinocularRectificationMap(HImage* Map2, const HCamPar& CamParam1, const HCamPar& CamParam2, double SubSampling, const HString& Method, const HString& MapType, HCamPar* CamParamRect1, HCamPar* CamParamRect2, HPose* CamPoseRect1, HPose* CamPoseRect2, HPose* RelPoseRect) const;
- // Generate transformation maps that describe the mapping of the images of a binocular camera pair to a common rectified image plane.
- HImage GenBinocularRectificationMap(HImage* Map2, const HCamPar& CamParam1, const HCamPar& CamParam2, double SubSampling, const char* Method, const char* MapType, HCamPar* CamParamRect1, HCamPar* CamParamRect2, HPose* CamPoseRect1, HPose* CamPoseRect2, HPose* RelPoseRect) const;
- #ifdef _WIN32
- // Generate transformation maps that describe the mapping of the images of a binocular camera pair to a common rectified image plane.
- HImage GenBinocularRectificationMap(HImage* Map2, const HCamPar& CamParam1, const HCamPar& CamParam2, double SubSampling, const wchar_t* Method, const wchar_t* MapType, HCamPar* CamParamRect1, HCamPar* CamParamRect2, HPose* CamPoseRect1, HPose* CamPoseRect2, HPose* RelPoseRect) const;
- #endif
- // Determine all camera parameters of a binocular stereo system.
- static HCamPar BinocularCalibration(const HTuple& NX, const HTuple& NY, const HTuple& NZ, const HTuple& NRow1, const HTuple& NCol1, const HTuple& NRow2, const HTuple& NCol2, const HCamPar& StartCamParam1, const HCamPar& StartCamParam2, const HPoseArray& NStartPose1, const HPoseArray& NStartPose2, const HTuple& EstimateParams, HCamPar* CamParam2, HPoseArray* NFinalPose1, HPoseArray* NFinalPose2, HPose* RelPose, HTuple* Errors);
- // Determine all camera parameters of a binocular stereo system.
- HCamPar BinocularCalibration(const HTuple& NX, const HTuple& NY, const HTuple& NZ, const HTuple& NRow1, const HTuple& NCol1, const HTuple& NRow2, const HTuple& NCol2, const HCamPar& StartCamParam1, const HCamPar& StartCamParam2, const HPose& NStartPose2, const HTuple& EstimateParams, HCamPar* CamParam2, HPose* NFinalPose1, HPose* NFinalPose2, HPose* RelPose, double* Errors) const;
- // Find the best matches of a calibrated descriptor model in an image and return their 3D pose.
- static HTuple FindCalibDescriptorModel(const HImage& Image, const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, Hlong NumMatches, const HCamPar& CamParam, const HTuple& ScoreType, HPoseArray* Pose);
- // Find the best matches of a calibrated descriptor model in an image and return their 3D pose.
- double FindCalibDescriptorModel(const HImage& Image, const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const HString& ScoreType);
- // Find the best matches of a calibrated descriptor model in an image and return their 3D pose.
- double FindCalibDescriptorModel(const HImage& Image, const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const char* ScoreType);
- #ifdef _WIN32
- // Find the best matches of a calibrated descriptor model in an image and return their 3D pose.
- double FindCalibDescriptorModel(const HImage& Image, const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const wchar_t* ScoreType);
- #endif
- // Create a descriptor model for calibrated perspective matching.
- HDescriptorModel CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HString& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed) const;
- // Create a descriptor model for calibrated perspective matching.
- HDescriptorModel CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const char* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed) const;
- #ifdef _WIN32
- // Create a descriptor model for calibrated perspective matching.
- HDescriptorModel CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const wchar_t* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed) const;
- #endif
- // Prepare a deformable model for planar calibrated matching from XLD contours.
- HDeformableModel CreatePlanarCalibDeformableModelXld(const HXLDCont& Contours, const HCamPar& CamParam, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const;
- // Prepare a deformable model for planar calibrated matching from XLD contours.
- HDeformableModel CreatePlanarCalibDeformableModelXld(const HXLDCont& Contours, const HCamPar& CamParam, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const;
- // Prepare a deformable model for planar calibrated matching from XLD contours.
- HDeformableModel CreatePlanarCalibDeformableModelXld(const HXLDCont& Contours, const HCamPar& CamParam, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const;
- #ifdef _WIN32
- // Prepare a deformable model for planar calibrated matching from XLD contours.
- HDeformableModel CreatePlanarCalibDeformableModelXld(const HXLDCont& Contours, const HCamPar& CamParam, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const;
- #endif
- // Create a deformable model for calibrated perspective matching.
- HDeformableModel CreatePlanarCalibDeformableModel(const HImage& Template, const HCamPar& CamParam, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, const HTuple& Contrast, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const;
- // Create a deformable model for calibrated perspective matching.
- HDeformableModel CreatePlanarCalibDeformableModel(const HImage& Template, const HCamPar& CamParam, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const;
- // Create a deformable model for calibrated perspective matching.
- HDeformableModel CreatePlanarCalibDeformableModel(const HImage& Template, const HCamPar& CamParam, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const;
- #ifdef _WIN32
- // Create a deformable model for calibrated perspective matching.
- HDeformableModel CreatePlanarCalibDeformableModel(const HImage& Template, const HCamPar& CamParam, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const wchar_t* Optimization, const wchar_t* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const;
- #endif
- // Create a 3D camera pose from camera center and viewing direction.
- static HPoseArray CreateCamPoseLookAtPoint(const HTuple& CamPosX, const HTuple& CamPosY, const HTuple& CamPosZ, const HTuple& LookAtX, const HTuple& LookAtY, const HTuple& LookAtZ, const HTuple& RefPlaneNormal, const HTuple& CamRoll);
- // Create a 3D camera pose from camera center and viewing direction.
- void CreateCamPoseLookAtPoint(double CamPosX, double CamPosY, double CamPosZ, double LookAtX, double LookAtY, double LookAtZ, const HTuple& RefPlaneNormal, double CamRoll);
- // Transform a pose that refers to the coordinate system of a 3D object model to a pose that refers to the reference coordinate system of a 3D shape model and vice versa.
- HPose TransPoseShapeModel3d(const HShapeModel3D& ShapeModel3DID, const HString& Transformation) const;
- // Transform a pose that refers to the coordinate system of a 3D object model to a pose that refers to the reference coordinate system of a 3D shape model and vice versa.
- HPose TransPoseShapeModel3d(const HShapeModel3D& ShapeModel3DID, const char* Transformation) const;
- #ifdef _WIN32
- // Transform a pose that refers to the coordinate system of a 3D object model to a pose that refers to the reference coordinate system of a 3D shape model and vice versa.
- HPose TransPoseShapeModel3d(const HShapeModel3D& ShapeModel3DID, const wchar_t* Transformation) const;
- #endif
- // Project the edges of a 3D shape model into image coordinates.
- HXLDCont ProjectShapeModel3d(const HShapeModel3D& ShapeModel3DID, const HCamPar& CamParam, const HString& HiddenSurfaceRemoval, const HTuple& MinFaceAngle) const;
- // Project the edges of a 3D shape model into image coordinates.
- HXLDCont ProjectShapeModel3d(const HShapeModel3D& ShapeModel3DID, const HCamPar& CamParam, const HString& HiddenSurfaceRemoval, double MinFaceAngle) const;
- // Project the edges of a 3D shape model into image coordinates.
- HXLDCont ProjectShapeModel3d(const HShapeModel3D& ShapeModel3DID, const HCamPar& CamParam, const char* HiddenSurfaceRemoval, double MinFaceAngle) const;
- #ifdef _WIN32
- // Project the edges of a 3D shape model into image coordinates.
- HXLDCont ProjectShapeModel3d(const HShapeModel3D& ShapeModel3DID, const HCamPar& CamParam, const wchar_t* HiddenSurfaceRemoval, double MinFaceAngle) const;
- #endif
- // Remove points from a 3D object model by projecting it to a virtual view and removing all points outside of a given region.
- static HObjectModel3DArray ReduceObjectModel3dByView(const HRegion& Region, const HObjectModel3DArray& ObjectModel3D, const HCamPar& CamParam, const HPoseArray& Pose);
- // Remove points from a 3D object model by projecting it to a virtual view and removing all points outside of a given region.
- HObjectModel3D ReduceObjectModel3dByView(const HRegion& Region, const HObjectModel3D& ObjectModel3D, const HCamPar& CamParam) const;
- // Render 3D object models to get an image.
- static HImage RenderObjectModel3d(const HObjectModel3DArray& ObjectModel3D, const HCamPar& CamParam, const HPoseArray& Pose, const HTuple& GenParamName, const HTuple& GenParamValue);
- // Render 3D object models to get an image.
- HImage RenderObjectModel3d(const HObjectModel3D& ObjectModel3D, const HCamPar& CamParam, const HTuple& GenParamName, const HTuple& GenParamValue) const;
- // Display 3D object models.
- static void DispObjectModel3d(const HWindow& WindowHandle, const HObjectModel3DArray& ObjectModel3D, const HCamPar& CamParam, const HPoseArray& Pose, const HTuple& GenParamName, const HTuple& GenParamValue);
- // Display 3D object models.
- void DispObjectModel3d(const HWindow& WindowHandle, const HObjectModel3D& ObjectModel3D, const HCamPar& CamParam, const HTuple& GenParamName, const HTuple& GenParamValue) const;
- // Project a 3D object model into image coordinates.
- HXLDCont ProjectObjectModel3d(const HObjectModel3D& ObjectModel3D, const HCamPar& CamParam, const HTuple& GenParamName, const HTuple& GenParamValue) const;
- // Project a 3D object model into image coordinates.
- HXLDCont ProjectObjectModel3d(const HObjectModel3D& ObjectModel3D, const HCamPar& CamParam, const HString& GenParamName, const HString& GenParamValue) const;
- // Project a 3D object model into image coordinates.
- HXLDCont ProjectObjectModel3d(const HObjectModel3D& ObjectModel3D, const HCamPar& CamParam, const char* GenParamName, const char* GenParamValue) const;
- #ifdef _WIN32
- // Project a 3D object model into image coordinates.
- HXLDCont ProjectObjectModel3d(const HObjectModel3D& ObjectModel3D, const HCamPar& CamParam, const wchar_t* GenParamName, const wchar_t* GenParamValue) const;
- #endif
- // Compute the calibrated scene flow between two stereo image pairs.
- HObjectModel3DArray SceneFlowCalib(const HImage& ImageRect1T1, const HImage& ImageRect2T1, const HImage& ImageRect1T2, const HImage& ImageRect2T2, const HImage& Disparity, const HTuple& SmoothingFlow, const HTuple& SmoothingDisparity, const HTuple& GenParamName, const HTuple& GenParamValue, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2) const;
- // Compute the calibrated scene flow between two stereo image pairs.
- HObjectModel3D SceneFlowCalib(const HImage& ImageRect1T1, const HImage& ImageRect2T1, const HImage& ImageRect1T2, const HImage& ImageRect2T2, const HImage& Disparity, double SmoothingFlow, double SmoothingDisparity, const HString& GenParamName, const HString& GenParamValue, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2) const;
- // Compute the calibrated scene flow between two stereo image pairs.
- HObjectModel3D SceneFlowCalib(const HImage& ImageRect1T1, const HImage& ImageRect2T1, const HImage& ImageRect1T2, const HImage& ImageRect2T2, const HImage& Disparity, double SmoothingFlow, double SmoothingDisparity, const char* GenParamName, const char* GenParamValue, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2) const;
- #ifdef _WIN32
- // Compute the calibrated scene flow between two stereo image pairs.
- HObjectModel3D SceneFlowCalib(const HImage& ImageRect1T1, const HImage& ImageRect2T1, const HImage& ImageRect1T2, const HImage& ImageRect2T2, const HImage& Disparity, double SmoothingFlow, double SmoothingDisparity, const wchar_t* GenParamName, const wchar_t* GenParamValue, const HCamPar& CamParamRect1, const HCamPar& CamParamRect2) const;
- #endif
- // Compute an absolute pose out of point correspondences between world and image coordinates.
- HTuple VectorToPose(const HTuple& WorldX, const HTuple& WorldY, const HTuple& WorldZ, const HTuple& ImageRow, const HTuple& ImageColumn, const HCamPar& CameraParam, const HString& Method, const HTuple& QualityType);
- // Compute an absolute pose out of point correspondences between world and image coordinates.
- double VectorToPose(const HTuple& WorldX, const HTuple& WorldY, const HTuple& WorldZ, const HTuple& ImageRow, const HTuple& ImageColumn, const HCamPar& CameraParam, const HString& Method, const HString& QualityType);
- // Compute an absolute pose out of point correspondences between world and image coordinates.
- double VectorToPose(const HTuple& WorldX, const HTuple& WorldY, const HTuple& WorldZ, const HTuple& ImageRow, const HTuple& ImageColumn, const HCamPar& CameraParam, const char* Method, const char* QualityType);
- #ifdef _WIN32
- // Compute an absolute pose out of point correspondences between world and image coordinates.
- double VectorToPose(const HTuple& WorldX, const HTuple& WorldY, const HTuple& WorldZ, const HTuple& ImageRow, const HTuple& ImageColumn, const HCamPar& CameraParam, const wchar_t* Method, const wchar_t* QualityType);
- #endif
- // Generate a projection map that describes the mapping between the image plane and the plane z=0 of a world coordinate system.
- HImage GenImageToWorldPlaneMap(const HCamPar& CameraParam, Hlong WidthIn, Hlong HeightIn, Hlong WidthMapped, Hlong HeightMapped, const HTuple& Scale, const HString& MapType) const;
- // Generate a projection map that describes the mapping between the image plane and the plane z=0 of a world coordinate system.
- HImage GenImageToWorldPlaneMap(const HCamPar& CameraParam, Hlong WidthIn, Hlong HeightIn, Hlong WidthMapped, Hlong HeightMapped, const HString& Scale, const HString& MapType) const;
- // Generate a projection map that describes the mapping between the image plane and the plane z=0 of a world coordinate system.
- HImage GenImageToWorldPlaneMap(const HCamPar& CameraParam, Hlong WidthIn, Hlong HeightIn, Hlong WidthMapped, Hlong HeightMapped, const char* Scale, const char* MapType) const;
- #ifdef _WIN32
- // Generate a projection map that describes the mapping between the image plane and the plane z=0 of a world coordinate system.
- HImage GenImageToWorldPlaneMap(const HCamPar& CameraParam, Hlong WidthIn, Hlong HeightIn, Hlong WidthMapped, Hlong HeightMapped, const wchar_t* Scale, const wchar_t* MapType) const;
- #endif
- // Rectify an image by transforming it into the plane z=0 of a world coordinate system.
- HImage ImageToWorldPlane(const HImage& Image, const HCamPar& CameraParam, Hlong Width, Hlong Height, const HTuple& Scale, const HString& Interpolation) const;
- // Rectify an image by transforming it into the plane z=0 of a world coordinate system.
- HImage ImageToWorldPlane(const HImage& Image, const HCamPar& CameraParam, Hlong Width, Hlong Height, const HString& Scale, const HString& Interpolation) const;
- // Rectify an image by transforming it into the plane z=0 of a world coordinate system.
- HImage ImageToWorldPlane(const HImage& Image, const HCamPar& CameraParam, Hlong Width, Hlong Height, const char* Scale, const char* Interpolation) const;
- #ifdef _WIN32
- // Rectify an image by transforming it into the plane z=0 of a world coordinate system.
- HImage ImageToWorldPlane(const HImage& Image, const HCamPar& CameraParam, Hlong Width, Hlong Height, const wchar_t* Scale, const wchar_t* Interpolation) const;
- #endif
- // Transform an XLD contour into the plane z=0 of a world coordinate system.
- HXLDCont ContourToWorldPlaneXld(const HXLDCont& Contours, const HTuple& CameraParam, const HTuple& Scale) const;
- // Transform an XLD contour into the plane z=0 of a world coordinate system.
- HXLDCont ContourToWorldPlaneXld(const HXLDCont& Contours, const HTuple& CameraParam, const HString& Scale) const;
- // Transform an XLD contour into the plane z=0 of a world coordinate system.
- HXLDCont ContourToWorldPlaneXld(const HXLDCont& Contours, const HTuple& CameraParam, const char* Scale) const;
- #ifdef _WIN32
- // Transform an XLD contour into the plane z=0 of a world coordinate system.
- HXLDCont ContourToWorldPlaneXld(const HXLDCont& Contours, const HTuple& CameraParam, const wchar_t* Scale) const;
- #endif
- // Translate the origin of a 3D pose.
- HPose SetOriginPose(double DX, double DY, double DZ) const;
- // Perform a hand-eye calibration.
- static HPose HandEyeCalibration(const HTuple& X, const HTuple& Y, const HTuple& Z, const HTuple& Row, const HTuple& Col, const HTuple& NumPoints, const HPoseArray& RobotPoses, const HCamPar& CameraParam, const HString& Method, const HTuple& QualityType, HPose* CalibrationPose, HTuple* Quality);
- // Perform a hand-eye calibration.
- static HPose HandEyeCalibration(const HTuple& X, const HTuple& Y, const HTuple& Z, const HTuple& Row, const HTuple& Col, const HTuple& NumPoints, const HPoseArray& RobotPoses, const HCamPar& CameraParam, const HString& Method, const HString& QualityType, HPose* CalibrationPose, double* Quality);
- // Perform a hand-eye calibration.
- static HPose HandEyeCalibration(const HTuple& X, const HTuple& Y, const HTuple& Z, const HTuple& Row, const HTuple& Col, const HTuple& NumPoints, const HPoseArray& RobotPoses, const HCamPar& CameraParam, const char* Method, const char* QualityType, HPose* CalibrationPose, double* Quality);
- #ifdef _WIN32
- // Perform a hand-eye calibration.
- static HPose HandEyeCalibration(const HTuple& X, const HTuple& Y, const HTuple& Z, const HTuple& Row, const HTuple& Col, const HTuple& NumPoints, const HPoseArray& RobotPoses, const HCamPar& CameraParam, const wchar_t* Method, const wchar_t* QualityType, HPose* CalibrationPose, double* Quality);
- #endif
- // Get the representation type of a 3D pose.
- HString GetPoseType(HString* OrderOfRotation, HString* ViewOfTransform) const;
- // Change the representation type of a 3D pose.
- HPose ConvertPoseType(const HString& OrderOfTransform, const HString& OrderOfRotation, const HString& ViewOfTransform) const;
- // Change the representation type of a 3D pose.
- HPose ConvertPoseType(const char* OrderOfTransform, const char* OrderOfRotation, const char* ViewOfTransform) const;
- #ifdef _WIN32
- // Change the representation type of a 3D pose.
- HPose ConvertPoseType(const wchar_t* OrderOfTransform, const wchar_t* OrderOfRotation, const wchar_t* ViewOfTransform) const;
- #endif
- // Create a 3D pose.
- void CreatePose(double TransX, double TransY, double TransZ, double RotX, double RotY, double RotZ, const HString& OrderOfTransform, const HString& OrderOfRotation, const HString& ViewOfTransform);
- // Create a 3D pose.
- void CreatePose(double TransX, double TransY, double TransZ, double RotX, double RotY, double RotZ, const char* OrderOfTransform, const char* OrderOfRotation, const char* ViewOfTransform);
- #ifdef _WIN32
- // Create a 3D pose.
- void CreatePose(double TransX, double TransY, double TransZ, double RotX, double RotY, double RotZ, const wchar_t* OrderOfTransform, const wchar_t* OrderOfRotation, const wchar_t* ViewOfTransform);
- #endif
- // Convert internal camera parameters and a 3D pose into a 3x4 projection matrix.
- HHomMat3D CamParPoseToHomMat3d(const HCamPar& CameraParam) const;
- // Convert a 3D pose into a homogeneous transformation matrix.
- HHomMat3D PoseToHomMat3d() const;
- // Deserialize a serialized pose.
- void DeserializePose(const HSerializedItem& SerializedItemHandle);
- // Serialize a pose.
- HSerializedItem SerializePose() const;
- // Read a 3D pose from a text file.
- void ReadPose(const HString& PoseFile);
- // Read a 3D pose from a text file.
- void ReadPose(const char* PoseFile);
- #ifdef _WIN32
- // Read a 3D pose from a text file.
- void ReadPose(const wchar_t* PoseFile);
- #endif
- // Write a 3D pose to a text file.
- void WritePose(const HString& PoseFile) const;
- // Write a 3D pose to a text file.
- void WritePose(const char* PoseFile) const;
- #ifdef _WIN32
- // Write a 3D pose to a text file.
- void WritePose(const wchar_t* PoseFile) const;
- #endif
- // Simulate an image with calibration plate.
- HImage SimCaltab(const HString& CalPlateDescr, const HCamPar& CameraParam, Hlong GrayBackground, Hlong GrayPlate, Hlong GrayMarks, double ScaleFac) const;
- // Simulate an image with calibration plate.
- HImage SimCaltab(const char* CalPlateDescr, const HCamPar& CameraParam, Hlong GrayBackground, Hlong GrayPlate, Hlong GrayMarks, double ScaleFac) const;
- #ifdef _WIN32
- // Simulate an image with calibration plate.
- HImage SimCaltab(const wchar_t* CalPlateDescr, const HCamPar& CameraParam, Hlong GrayBackground, Hlong GrayPlate, Hlong GrayMarks, double ScaleFac) const;
- #endif
- // Determine all camera parameters by a simultaneous minimization process.
- static HCamPar CameraCalibration(const HTuple& NX, const HTuple& NY, const HTuple& NZ, const HTuple& NRow, const HTuple& NCol, const HCamPar& StartCamParam, const HPoseArray& NStartPose, const HTuple& EstimateParams, HPoseArray* NFinalPose, HTuple* Errors);
- // Determine all camera parameters by a simultaneous minimization process.
- HCamPar CameraCalibration(const HTuple& NX, const HTuple& NY, const HTuple& NZ, const HTuple& NRow, const HTuple& NCol, const HCamPar& StartCamParam, const HTuple& EstimateParams, HPose* NFinalPose, double* Errors) const;
- // Extract rectangularly arranged 2D calibration marks from the image and calculate initial values for the external camera parameters.
- HTuple FindMarksAndPose(const HImage& Image, const HRegion& CalPlateRegion, const HString& CalPlateDescr, const HCamPar& StartCamParam, Hlong StartThresh, Hlong DeltaThresh, Hlong MinThresh, double Alpha, double MinContLength, double MaxDiamMarks, HTuple* CCoord);
- // Extract rectangularly arranged 2D calibration marks from the image and calculate initial values for the external camera parameters.
- HTuple FindMarksAndPose(const HImage& Image, const HRegion& CalPlateRegion, const char* CalPlateDescr, const HCamPar& StartCamParam, Hlong StartThresh, Hlong DeltaThresh, Hlong MinThresh, double Alpha, double MinContLength, double MaxDiamMarks, HTuple* CCoord);
- #ifdef _WIN32
- // Extract rectangularly arranged 2D calibration marks from the image and calculate initial values for the external camera parameters.
- HTuple FindMarksAndPose(const HImage& Image, const HRegion& CalPlateRegion, const wchar_t* CalPlateDescr, const HCamPar& StartCamParam, Hlong StartThresh, Hlong DeltaThresh, Hlong MinThresh, double Alpha, double MinContLength, double MaxDiamMarks, HTuple* CCoord);
- #endif
- // Define type, parameters, and relative pose of a camera in a camera setup model.
- static void SetCameraSetupCamParam(const HCameraSetupModel& CameraSetupModelID, const HTuple& CameraIdx, const HTuple& CameraType, const HCamPar& CameraParam, const HTuple& CameraPose);
- // Define type, parameters, and relative pose of a camera in a camera setup model.
- static void SetCameraSetupCamParam(const HCameraSetupModel& CameraSetupModelID, const HTuple& CameraIdx, const HString& CameraType, const HCamPar& CameraParam, const HTuple& CameraPose);
- // Define type, parameters, and relative pose of a camera in a camera setup model.
- static void SetCameraSetupCamParam(const HCameraSetupModel& CameraSetupModelID, const HTuple& CameraIdx, const char* CameraType, const HCamPar& CameraParam, const HTuple& CameraPose);
- #ifdef _WIN32
- // Define type, parameters, and relative pose of a camera in a camera setup model.
- static void SetCameraSetupCamParam(const HCameraSetupModel& CameraSetupModelID, const HTuple& CameraIdx, const wchar_t* CameraType, const HCamPar& CameraParam, const HTuple& CameraPose);
- #endif
- };
- class LIntExport HPoseArray : public HDataArray
- {
- public:
- HPoseArray();
- HPoseArray(HPose* classes, Hlong length);
- /* Define a default constructor to prevent compilers that support
- * C++11 R-Value References v3.0 declaring an implicite move
- * assignment/constructor. */
- ~HPoseArray() {}
- protected:
- virtual void CreateArray(Hlong length);
- virtual int GetFixedSize() const;
- };
- }
- #endif
|