123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320 |
- /***********************************************************
- * File generated by the HALCON-Compiler hcomp version 20.11
- * Usage: Interface to C++
- *
- * Software by: MVTec Software GmbH, www.mvtec.com
- ***********************************************************/
- #ifndef HCPP_HMEASURE
- #define HCPP_HMEASURE
- namespace HalconCpp
- {
- // Represents an instance of a tool to measure distances.
- class LIntExport HMeasure : public HHandle
- {
- public:
- // Create an uninitialized instance
- HMeasure():HHandle() {}
- // Copy constructor
- HMeasure(const HMeasure& source) : HHandle(source) {}
- // Copy constructor
- HMeasure(const HHandle& handle);
- // Create HMeasure from handle, taking ownership
- explicit HMeasure(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 ('measure')!
- virtual void AssertType(Hphandle handle) const;
- public:
- // Deep copy of all data represented by this object instance
- HMeasure Clone() const;
- /*****************************************************************************
- * Operator-based class constructors
- *****************************************************************************/
- // gen_measure_arc: Prepare the extraction of straight edges perpendicular to an annular arc.
- explicit HMeasure(const HTuple& CenterRow, const HTuple& CenterCol, const HTuple& Radius, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AnnulusRadius, Hlong Width, Hlong Height, const HString& Interpolation);
- // gen_measure_arc: Prepare the extraction of straight edges perpendicular to an annular arc.
- explicit HMeasure(double CenterRow, double CenterCol, double Radius, double AngleStart, double AngleExtent, double AnnulusRadius, Hlong Width, Hlong Height, const HString& Interpolation);
- // gen_measure_arc: Prepare the extraction of straight edges perpendicular to an annular arc.
- explicit HMeasure(double CenterRow, double CenterCol, double Radius, double AngleStart, double AngleExtent, double AnnulusRadius, Hlong Width, Hlong Height, const char* Interpolation);
- #ifdef _WIN32
- // gen_measure_arc: Prepare the extraction of straight edges perpendicular to an annular arc.
- explicit HMeasure(double CenterRow, double CenterCol, double Radius, double AngleStart, double AngleExtent, double AnnulusRadius, Hlong Width, Hlong Height, const wchar_t* Interpolation);
- #endif
- // gen_measure_rectangle2: Prepare the extraction of straight edges perpendicular to a rectangle.
- explicit HMeasure(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2, Hlong Width, Hlong Height, const HString& Interpolation);
- // gen_measure_rectangle2: Prepare the extraction of straight edges perpendicular to a rectangle.
- explicit HMeasure(double Row, double Column, double Phi, double Length1, double Length2, Hlong Width, Hlong Height, const HString& Interpolation);
- // gen_measure_rectangle2: Prepare the extraction of straight edges perpendicular to a rectangle.
- explicit HMeasure(double Row, double Column, double Phi, double Length1, double Length2, Hlong Width, Hlong Height, const char* Interpolation);
- #ifdef _WIN32
- // gen_measure_rectangle2: Prepare the extraction of straight edges perpendicular to a rectangle.
- explicit HMeasure(double Row, double Column, double Phi, double Length1, double Length2, Hlong Width, Hlong Height, const wchar_t* Interpolation);
- #endif
- /***************************************************************************
- * Operators *
- ***************************************************************************/
- // Serialize a measure object.
- HSerializedItem SerializeMeasure() const;
- // Deserialize a serialized measure object.
- void DeserializeMeasure(const HSerializedItem& SerializedItemHandle);
- // Write a measure object to a file.
- void WriteMeasure(const HString& FileName) const;
- // Write a measure object to a file.
- void WriteMeasure(const char* FileName) const;
- #ifdef _WIN32
- // Write a measure object to a file.
- void WriteMeasure(const wchar_t* FileName) const;
- #endif
- // Read a measure object from a file.
- void ReadMeasure(const HString& FileName);
- // Read a measure object from a file.
- void ReadMeasure(const char* FileName);
- #ifdef _WIN32
- // Read a measure object from a file.
- void ReadMeasure(const wchar_t* FileName);
- #endif
- // Extracting points with a particular gray value along a rectangle or an annular arc.
- void MeasureThresh(const HImage& Image, double Sigma, double Threshold, const HString& Select, HTuple* RowThresh, HTuple* ColumnThresh, HTuple* Distance) const;
- // Extracting points with a particular gray value along a rectangle or an annular arc.
- void MeasureThresh(const HImage& Image, double Sigma, double Threshold, const char* Select, HTuple* RowThresh, HTuple* ColumnThresh, HTuple* Distance) const;
- #ifdef _WIN32
- // Extracting points with a particular gray value along a rectangle or an annular arc.
- void MeasureThresh(const HImage& Image, double Sigma, double Threshold, const wchar_t* Select, HTuple* RowThresh, HTuple* ColumnThresh, HTuple* Distance) const;
- #endif
- // Delete a measure object.
- void CloseMeasure() const;
- // Extract a gray value profile perpendicular to a rectangle or annular arc.
- HTuple MeasureProjection(const HImage& Image) const;
- // Reset a fuzzy function.
- void ResetFuzzyMeasure(const HString& SetType) const;
- // Reset a fuzzy function.
- void ResetFuzzyMeasure(const char* SetType) const;
- #ifdef _WIN32
- // Reset a fuzzy function.
- void ResetFuzzyMeasure(const wchar_t* SetType) const;
- #endif
- // Specify a normalized fuzzy function for edge pairs.
- void SetFuzzyMeasureNormPair(const HTuple& PairSize, const HString& SetType, const HFunction1D& Function) const;
- // Specify a normalized fuzzy function for edge pairs.
- void SetFuzzyMeasureNormPair(double PairSize, const HString& SetType, const HFunction1D& Function) const;
- // Specify a normalized fuzzy function for edge pairs.
- void SetFuzzyMeasureNormPair(double PairSize, const char* SetType, const HFunction1D& Function) const;
- #ifdef _WIN32
- // Specify a normalized fuzzy function for edge pairs.
- void SetFuzzyMeasureNormPair(double PairSize, const wchar_t* SetType, const HFunction1D& Function) const;
- #endif
- // Specify a fuzzy function.
- void SetFuzzyMeasure(const HString& SetType, const HFunction1D& Function) const;
- // Specify a fuzzy function.
- void SetFuzzyMeasure(const char* SetType, const HFunction1D& Function) const;
- #ifdef _WIN32
- // Specify a fuzzy function.
- void SetFuzzyMeasure(const wchar_t* SetType, const HFunction1D& Function) const;
- #endif
- // Extract straight edge pairs perpendicular to a rectangle or an annular arc.
- void FuzzyMeasurePairing(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const HString& Transition, const HString& Pairing, Hlong NumPairs, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowPairCenter, HTuple* ColumnPairCenter, HTuple* FuzzyScore, HTuple* IntraDistance) const;
- // Extract straight edge pairs perpendicular to a rectangle or an annular arc.
- void FuzzyMeasurePairing(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const char* Transition, const char* Pairing, Hlong NumPairs, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowPairCenter, HTuple* ColumnPairCenter, HTuple* FuzzyScore, HTuple* IntraDistance) const;
- #ifdef _WIN32
- // Extract straight edge pairs perpendicular to a rectangle or an annular arc.
- void FuzzyMeasurePairing(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const wchar_t* Transition, const wchar_t* Pairing, Hlong NumPairs, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowPairCenter, HTuple* ColumnPairCenter, HTuple* FuzzyScore, HTuple* IntraDistance) const;
- #endif
- // Extract straight edge pairs perpendicular to a rectangle or an annular arc.
- void FuzzyMeasurePairs(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const HString& Transition, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowEdgeCenter, HTuple* ColumnEdgeCenter, HTuple* FuzzyScore, HTuple* IntraDistance, HTuple* InterDistance) const;
- // Extract straight edge pairs perpendicular to a rectangle or an annular arc.
- void FuzzyMeasurePairs(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const char* Transition, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowEdgeCenter, HTuple* ColumnEdgeCenter, HTuple* FuzzyScore, HTuple* IntraDistance, HTuple* InterDistance) const;
- #ifdef _WIN32
- // Extract straight edge pairs perpendicular to a rectangle or an annular arc.
- void FuzzyMeasurePairs(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const wchar_t* Transition, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowEdgeCenter, HTuple* ColumnEdgeCenter, HTuple* FuzzyScore, HTuple* IntraDistance, HTuple* InterDistance) const;
- #endif
- // Extract straight edges perpendicular to a rectangle or an annular arc.
- void FuzzyMeasurePos(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const HString& Transition, HTuple* RowEdge, HTuple* ColumnEdge, HTuple* Amplitude, HTuple* FuzzyScore, HTuple* Distance) const;
- // Extract straight edges perpendicular to a rectangle or an annular arc.
- void FuzzyMeasurePos(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const char* Transition, HTuple* RowEdge, HTuple* ColumnEdge, HTuple* Amplitude, HTuple* FuzzyScore, HTuple* Distance) const;
- #ifdef _WIN32
- // Extract straight edges perpendicular to a rectangle or an annular arc.
- void FuzzyMeasurePos(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const wchar_t* Transition, HTuple* RowEdge, HTuple* ColumnEdge, HTuple* Amplitude, HTuple* FuzzyScore, HTuple* Distance) const;
- #endif
- // Extract straight edge pairs perpendicular to a rectangle or annular arc.
- void MeasurePairs(const HImage& Image, double Sigma, double Threshold, const HString& Transition, const HString& Select, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* IntraDistance, HTuple* InterDistance) const;
- // Extract straight edge pairs perpendicular to a rectangle or annular arc.
- void MeasurePairs(const HImage& Image, double Sigma, double Threshold, const char* Transition, const char* Select, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* IntraDistance, HTuple* InterDistance) const;
- #ifdef _WIN32
- // Extract straight edge pairs perpendicular to a rectangle or annular arc.
- void MeasurePairs(const HImage& Image, double Sigma, double Threshold, const wchar_t* Transition, const wchar_t* Select, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* IntraDistance, HTuple* InterDistance) const;
- #endif
- // Extract straight edges perpendicular to a rectangle or annular arc.
- void MeasurePos(const HImage& Image, double Sigma, double Threshold, const HString& Transition, const HString& Select, HTuple* RowEdge, HTuple* ColumnEdge, HTuple* Amplitude, HTuple* Distance) const;
- // Extract straight edges perpendicular to a rectangle or annular arc.
- void MeasurePos(const HImage& Image, double Sigma, double Threshold, const char* Transition, const char* Select, HTuple* RowEdge, HTuple* ColumnEdge, HTuple* Amplitude, HTuple* Distance) const;
- #ifdef _WIN32
- // Extract straight edges perpendicular to a rectangle or annular arc.
- void MeasurePos(const HImage& Image, double Sigma, double Threshold, const wchar_t* Transition, const wchar_t* Select, HTuple* RowEdge, HTuple* ColumnEdge, HTuple* Amplitude, HTuple* Distance) const;
- #endif
- // Translate a measure object.
- void TranslateMeasure(const HTuple& Row, const HTuple& Column) const;
- // Translate a measure object.
- void TranslateMeasure(double Row, double Column) const;
- // Prepare the extraction of straight edges perpendicular to an annular arc.
- void GenMeasureArc(const HTuple& CenterRow, const HTuple& CenterCol, const HTuple& Radius, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AnnulusRadius, Hlong Width, Hlong Height, const HString& Interpolation);
- // Prepare the extraction of straight edges perpendicular to an annular arc.
- void GenMeasureArc(double CenterRow, double CenterCol, double Radius, double AngleStart, double AngleExtent, double AnnulusRadius, Hlong Width, Hlong Height, const HString& Interpolation);
- // Prepare the extraction of straight edges perpendicular to an annular arc.
- void GenMeasureArc(double CenterRow, double CenterCol, double Radius, double AngleStart, double AngleExtent, double AnnulusRadius, Hlong Width, Hlong Height, const char* Interpolation);
- #ifdef _WIN32
- // Prepare the extraction of straight edges perpendicular to an annular arc.
- void GenMeasureArc(double CenterRow, double CenterCol, double Radius, double AngleStart, double AngleExtent, double AnnulusRadius, Hlong Width, Hlong Height, const wchar_t* Interpolation);
- #endif
- // Prepare the extraction of straight edges perpendicular to a rectangle.
- void GenMeasureRectangle2(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2, Hlong Width, Hlong Height, const HString& Interpolation);
- // Prepare the extraction of straight edges perpendicular to a rectangle.
- void GenMeasureRectangle2(double Row, double Column, double Phi, double Length1, double Length2, Hlong Width, Hlong Height, const HString& Interpolation);
- // Prepare the extraction of straight edges perpendicular to a rectangle.
- void GenMeasureRectangle2(double Row, double Column, double Phi, double Length1, double Length2, Hlong Width, Hlong Height, const char* Interpolation);
- #ifdef _WIN32
- // Prepare the extraction of straight edges perpendicular to a rectangle.
- void GenMeasureRectangle2(double Row, double Column, double Phi, double Length1, double Length2, Hlong Width, Hlong Height, const wchar_t* Interpolation);
- #endif
- };
- // forward declarations and types for internal array implementation
- template<class T> class HSmartPtr;
- template<class T> class HHandleBaseArrayRef;
- typedef HHandleBaseArrayRef<HMeasure> HMeasureArrayRef;
- typedef HSmartPtr< HMeasureArrayRef > HMeasureArrayPtr;
- // Represents multiple tool instances
- class LIntExport HMeasureArray : public HHandleBaseArray
- {
- public:
- // Create empty array
- HMeasureArray();
- // Create array from native array of tool instances
- HMeasureArray(HMeasure* classes, Hlong length);
- // Copy constructor
- HMeasureArray(const HMeasureArray &tool_array);
- // Destructor
- virtual ~HMeasureArray();
- // Assignment operator
- HMeasureArray &operator=(const HMeasureArray &tool_array);
- // Clears array and all tool instances
- virtual void Clear();
- // Get array of native tool instances
- const HMeasure* 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
- HMeasureArrayPtr *mArrayPtr;
- };
- }
- #endif
|