关于Halcon C++常用的两种数据结构Hobject和HTuple

HALCON里面有很多数据类型,但是通过的导出向导工具导出后,就剩下两种数据类型:Hobject  HTuple。一个是图像  一个是数据。


头文件有定义这两个C++类:


C:\Program Files\MVTec\HALCON-18.11-Progress\include\halconcpp\HObject.h


C:\Program Files\MVTec\HALCON-18.11-Progress\include\halconcpp\HTuple.h


HObject

// Represents an instance of an iconic object(-array). Base class for images, regions and XLDs
class LIntExport HObject : public HObjectBase
{
 
public:
 
  // Create an uninitialized instance
  HObject():HObjectBase() {}
 
  // Copy constructor
  HObject(const HObject& source) : HObjectBase(source) {}
 
  // Create HObject from object id. For copy=false takes
  // over management of input key. Type of key must match!
  explicit HObject(Hkey key, bool copy=true);
 
  // Access of object tuple element
  const HObject operator [] (Hlong index) const;
 
  // Deep copy of all data represented by this object instance
  HObject Clone() const;
 
 
 
 
  /***************************************************************************
   * Operators                                                               *
   ***************************************************************************/
 
  // Calculate the difference of two object tuples.
  HObject ObjDiff(const HObject& ObjectsSub) const;
 
  // Convert an "integer number" into an iconic object.
  void IntegerToObj(const HTuple& SurrogateTuple);
 
  // Convert an "integer number" into an iconic object.
  void IntegerToObj(void* SurrogateTuple);
 
  // Convert an iconic object into an "integer number."
  HTuple ObjToInteger(Hlong Index, Hlong Number) const;
 
  // Copy an iconic object in the HALCON database.
  HObject CopyObj(Hlong Index, Hlong NumObj) const;
 
  // Concatenate two iconic object tuples.
  HObject ConcatObj(const HObject& Objects2) const;
 
  // Select objects from an object tuple.
  HObject SelectObj(const HTuple& Index) const;
 
  // Select objects from an object tuple.
  HObject SelectObj(Hlong Index) const;
 
  // Compare iconic objects regarding equality.
  Hlong CompareObj(const HObject& Objects2, const HTuple& Epsilon) const;
 
  // Compare iconic objects regarding equality.
  Hlong CompareObj(const HObject& Objects2, double Epsilon) const;
 
  // Compare image objects regarding equality.
  Hlong TestEqualObj(const HObject& Objects2) const;
 
  // Number of objects in a tuple.
  Hlong CountObj() const;
 
  // Informations about the components of an image object.
  HTuple GetChannelInfo(const HString& Request, const HTuple& Channel) const;
 
  // Informations about the components of an image object.
  HString GetChannelInfo(const HString& Request, Hlong Channel) const;
 
  // Informations about the components of an image object.
  HString GetChannelInfo(const char* Request, Hlong Channel) const;
 
#ifdef _WIN32
  // Informations about the components of an image object.
  HString GetChannelInfo(const wchar_t* Request, Hlong Channel) const;
#endif
 
  // Name of the class of an image object.
  HTuple GetObjClass() const;
 
  // Create an empty object tuple.
  void GenEmptyObj();
 
  // Displays image objects (image, region, XLD).
  void DispObj(const HWindow& WindowHandle) const;
 
  // Read an iconic object.
  void ReadObject(const HString& FileName);
 
  // Read an iconic object.
  void ReadObject(const char* FileName);
 
#ifdef _WIN32
  // Read an iconic object.
  void ReadObject(const wchar_t* FileName);
#endif
 
  // Write an iconic object.
  void WriteObject(const HString& FileName) const;
 
  // Write an iconic object.
  void WriteObject(const char* FileName) const;
 
#ifdef _WIN32
  // Write an iconic object.
  void WriteObject(const wchar_t* FileName) const;
#endif
 
  // Deserialize a serialized iconic object.
  void DeserializeObject(const HSerializedItem& SerializedItemHandle);
 
  // Serialize an iconic object.
  HSerializedItem SerializeObject() const;
 
  // Insert objects into an iconic object tuple.
  HObject InsertObj(const HObject& ObjectsInsert, Hlong Index) const;
 
  // Remove objects from an iconic object tuple.
  HObject RemoveObj(const HTuple& Index) const;
 
  // Remove objects from an iconic object tuple.
  HObject RemoveObj(Hlong Index) const;
 
  // Replaces one or more elements of an iconic object tuple.
  HObject ReplaceObj(const HObject& ObjectsReplace, const HTuple& Index) const;
 
  // Replaces one or more elements of an iconic object tuple.
  HObject ReplaceObj(const HObject& ObjectsReplace, Hlong Index) const;
 
private:
 
  // Verify matching semantic type ('object')!
  void AssertObjectClass();
 
};

上一篇:du 使用详解 linux查看目录大小 linux统计目录大小并排序 查看目录下所有一级子目录文件夹大小 du -h --max-depth=1 |grep [


下一篇:Ian Goodfellow回忆GAN诞生故事:几杯啤酒喝出“20年来最酷的深度学习想法”