The base class of the iconic parameter classes in HALCON/C++ is the class HObject which manages entries in the database, i.e., the copying or releasing of objects. The class HObject can contain all types of iconic objects. This has the advantage that important methods like DispObj() can be applied to all iconic objects in the same manner.
Three classes are derived from the root class HObject:
These classes are described in more detail below.
A region is a set of coordinates in the image plane. Such a region does not need to be connected and it may contain holes. A region can be larger than the actual image format. Regions are represented by the so-called runlength coding in HALCON. The class HRegion represents a region in HALCON/C++. Besides those operators that can be called via HRegion (see also section “Calling Operators via Classes”), HRegion provides the following member functions:
There is more to HALCON images than just a matrix of pixels: In HALCON, this matrix is called a channel, and images may consist of one or more such channels. For example, gray value images consist of a single channel, color images of three channels. Channels can not only contain the standard 8 bit pixels (pixel type byte) used to represent gray value images, HALCON allows images to contain various other data, e.g. 16 bit integers (type int2) or 32 bit floating point numbers (type real) to represent derivatives. Besides the pixel information, each HALCON image also stores its so-called domain in form of a HALCON region. The domain can be interpreted as a region of interest, i.e., HALCON operators (with some exceptions) restrict their processing to this region.
XLD is the abbreviation for eXtended Line Description. This is a data structure used for describing areas (e.g., arbitrarily sized regions or polygons) or any closed or open contour, i.e., also lines. In contrast to regions, which represent all areas at pixel precision, XLD objects provide subpixel precision. There are two basic XLD structures: contours and polygons.
HALCON/C++ provides both a base class HXLD and a set of specialized classes derived from HXLD, e.g., HXLDCont for contours or HXLDPoly for polygons.
In contrast to the classes described in the previous sections, the XLD classes provide only member functions corresponding to HALCON operators (see also section “Calling Operators via Classes”).