123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 |
- /***********************************************************
- * File generated by the HALCON-Compiler hcomp version 20.11
- * Usage: Interface to C++
- *
- * Software by: MVTec Software GmbH, www.mvtec.com
- ***********************************************************/
- #ifndef HCPP_HDESCRIPTORMODEL
- #define HCPP_HDESCRIPTORMODEL
- namespace HalconCpp
- {
- // Represents an instance of a descriptor model.
- class LIntExport HDescriptorModel : public HHandle
- {
- public:
- // Create an uninitialized instance
- HDescriptorModel():HHandle() {}
- // Copy constructor
- HDescriptorModel(const HDescriptorModel& source) : HHandle(source) {}
- // Copy constructor
- HDescriptorModel(const HHandle& handle);
- // Create HDescriptorModel from handle, taking ownership
- explicit HDescriptorModel(Hlong handle);
- bool operator==(const HHandle& obj) const
- {
- return HHandleBase::operator==(obj);
- }
- bool operator!=(const HHandle& obj) const
- {
- return HHandleBase::operator!=(obj);
- }
- protected:
- // Verify matching semantic type ('descriptor_model')!
- virtual void AssertType(Hphandle handle) const;
- public:
- // Deep copy of all data represented by this object instance
- HDescriptorModel Clone() const;
- /*****************************************************************************
- * Operator-based class constructors
- *****************************************************************************/
- // read_descriptor_model: Read a descriptor model from a file.
- explicit HDescriptorModel(const HString& FileName);
- // read_descriptor_model: Read a descriptor model from a file.
- explicit HDescriptorModel(const char* FileName);
- #ifdef _WIN32
- // read_descriptor_model: Read a descriptor model from a file.
- explicit HDescriptorModel(const wchar_t* FileName);
- #endif
- // create_calib_descriptor_model: Create a descriptor model for calibrated perspective matching.
- explicit HDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const HString& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
- // create_calib_descriptor_model: Create a descriptor model for calibrated perspective matching.
- explicit HDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const char* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
- #ifdef _WIN32
- // create_calib_descriptor_model: Create a descriptor model for calibrated perspective matching.
- explicit HDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const wchar_t* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
- #endif
- // create_uncalib_descriptor_model: Prepare a descriptor model for interest point matching.
- explicit HDescriptorModel(const HImage& Template, const HString& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
- // create_uncalib_descriptor_model: Prepare a descriptor model for interest point matching.
- explicit HDescriptorModel(const HImage& Template, const char* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
- #ifdef _WIN32
- // create_uncalib_descriptor_model: Prepare a descriptor model for interest point matching.
- explicit HDescriptorModel(const HImage& Template, const wchar_t* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
- #endif
- /***************************************************************************
- * Operators *
- ***************************************************************************/
- // Free the memory of a descriptor model.
- static void ClearDescriptorModel(const HDescriptorModelArray& ModelID);
- // Free the memory of a descriptor model.
- void ClearDescriptorModel() const;
- // Deserialize a descriptor model.
- void DeserializeDescriptorModel(const HSerializedItem& SerializedItemHandle);
- // Serialize a descriptor model.
- HSerializedItem SerializeDescriptorModel() const;
- // Read a descriptor model from a file.
- void ReadDescriptorModel(const HString& FileName);
- // Read a descriptor model from a file.
- void ReadDescriptorModel(const char* FileName);
- #ifdef _WIN32
- // Read a descriptor model from a file.
- void ReadDescriptorModel(const wchar_t* FileName);
- #endif
- // Write a descriptor model to a file.
- void WriteDescriptorModel(const HString& FileName) const;
- // Write a descriptor model to a file.
- void WriteDescriptorModel(const char* FileName) const;
- #ifdef _WIN32
- // Write a descriptor model to a file.
- void WriteDescriptorModel(const wchar_t* FileName) const;
- #endif
- // Find the best matches of a calibrated descriptor model in an image and return their 3D pose.
- HPoseArray FindCalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, Hlong NumMatches, const HCamPar& CamParam, const HTuple& ScoreType, HTuple* Score) const;
- // Find the best matches of a calibrated descriptor model in an image and return their 3D pose.
- HPose FindCalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const HString& ScoreType, double* Score) const;
- // Find the best matches of a calibrated descriptor model in an image and return their 3D pose.
- HPose FindCalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const char* ScoreType, double* Score) const;
- #ifdef _WIN32
- // Find the best matches of a calibrated descriptor model in an image and return their 3D pose.
- HPose FindCalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HCamPar& CamParam, const wchar_t* ScoreType, double* Score) const;
- #endif
- // Find the best matches of a descriptor model in an image.
- HHomMat2DArray FindUncalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, Hlong NumMatches, const HTuple& ScoreType, HTuple* Score) const;
- // Find the best matches of a descriptor model in an image.
- HHomMat2D FindUncalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HString& ScoreType, double* Score) const;
- // Find the best matches of a descriptor model in an image.
- HHomMat2D FindUncalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const char* ScoreType, double* Score) const;
- #ifdef _WIN32
- // Find the best matches of a descriptor model in an image.
- HHomMat2D FindUncalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const wchar_t* ScoreType, double* Score) const;
- #endif
- // Query the interest points of the descriptor model or the last processed search image.
- void GetDescriptorModelPoints(const HString& Set, const HTuple& Subset, HTuple* Row, HTuple* Column) const;
- // Query the interest points of the descriptor model or the last processed search image.
- void GetDescriptorModelPoints(const HString& Set, Hlong Subset, HTuple* Row, HTuple* Column) const;
- // Query the interest points of the descriptor model or the last processed search image.
- void GetDescriptorModelPoints(const char* Set, Hlong Subset, HTuple* Row, HTuple* Column) const;
- #ifdef _WIN32
- // Query the interest points of the descriptor model or the last processed search image.
- void GetDescriptorModelPoints(const wchar_t* Set, Hlong Subset, HTuple* Row, HTuple* Column) const;
- #endif
- // Return the parameters of a descriptor model.
- HString GetDescriptorModelParams(HTuple* DetectorParamName, HTuple* DetectorParamValue, HTuple* DescriptorParamName, HTuple* DescriptorParamValue) const;
- // Create a descriptor model for calibrated perspective matching.
- void CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const HString& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
- // Create a descriptor model for calibrated perspective matching.
- void CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const char* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
- #ifdef _WIN32
- // Create a descriptor model for calibrated perspective matching.
- void CreateCalibDescriptorModel(const HImage& Template, const HCamPar& CamParam, const HPose& ReferencePose, const wchar_t* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
- #endif
- // Prepare a descriptor model for interest point matching.
- void CreateUncalibDescriptorModel(const HImage& Template, const HString& DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
- // Prepare a descriptor model for interest point matching.
- void CreateUncalibDescriptorModel(const HImage& Template, const char* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
- #ifdef _WIN32
- // Prepare a descriptor model for interest point matching.
- void CreateUncalibDescriptorModel(const HImage& Template, const wchar_t* DetectorType, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, Hlong Seed);
- #endif
- // Query alphanumerical results that were accumulated during descriptor-based matching.
- HTuple GetDescriptorModelResults(const HTuple& ObjectID, const HString& ResultNames) const;
- // Query alphanumerical results that were accumulated during descriptor-based matching.
- HTuple GetDescriptorModelResults(Hlong ObjectID, const HString& ResultNames) const;
- // Query alphanumerical results that were accumulated during descriptor-based matching.
- HTuple GetDescriptorModelResults(Hlong ObjectID, const char* ResultNames) const;
- #ifdef _WIN32
- // Query alphanumerical results that were accumulated during descriptor-based matching.
- HTuple GetDescriptorModelResults(Hlong ObjectID, const wchar_t* ResultNames) const;
- #endif
- // Return the origin of a descriptor model.
- void GetDescriptorModelOrigin(HTuple* Row, HTuple* Column) const;
- // Return the origin of a descriptor model.
- void GetDescriptorModelOrigin(double* Row, double* Column) const;
- // Sets the origin of a descriptor model.
- void SetDescriptorModelOrigin(const HTuple& Row, const HTuple& Column) const;
- // Sets the origin of a descriptor model.
- void SetDescriptorModelOrigin(double Row, double Column) const;
- };
- // forward declarations and types for internal array implementation
- template<class T> class HSmartPtr;
- template<class T> class HHandleBaseArrayRef;
- typedef HHandleBaseArrayRef<HDescriptorModel> HDescriptorModelArrayRef;
- typedef HSmartPtr< HDescriptorModelArrayRef > HDescriptorModelArrayPtr;
- // Represents multiple tool instances
- class LIntExport HDescriptorModelArray : public HHandleBaseArray
- {
- public:
- // Create empty array
- HDescriptorModelArray();
- // Create array from native array of tool instances
- HDescriptorModelArray(HDescriptorModel* classes, Hlong length);
- // Copy constructor
- HDescriptorModelArray(const HDescriptorModelArray &tool_array);
- // Destructor
- virtual ~HDescriptorModelArray();
- // Assignment operator
- HDescriptorModelArray &operator=(const HDescriptorModelArray &tool_array);
- // Clears array and all tool instances
- virtual void Clear();
- // Get array of native tool instances
- const HDescriptorModel* Tools() const;
- // Get number of tools
- virtual Hlong Length() const;
- // Create tool array from tuple of handles
- virtual void SetFromTuple(const HTuple& handles);
- // Get tuple of handles for tool array
- virtual HTuple ConvertToTuple() const;
- protected:
- // Smart pointer to internal data container
- HDescriptorModelArrayPtr *mArrayPtr;
- };
- }
- #endif
|