To use operators in HALCON and HALCON XL, the following types have been introduced. With a compiler define (see chapter “Creating a New HALCON Package”), they are mapped to the suitable basic types for the corresponding image size.
#if !defined(HC_LARGE_IMAGES) typedef int32_t HIMGDIM; /* Image dimension, e.g., width and height */ typedef int16_t HIMGCOOR; /* Image coordinates, e.g, row and column */ typedef int32_t HLINCOOR; /* Linearized image coordinates */ typedef int32_t HIMGCNT; /* Number of pixels, e.g., area or buffer size */ typedef int32_t HITEMCNT; /* Number of elements (contours or runlengths) */ typedef float HSUBCOOR; /* Sub-pixel precise coordinates */ typedef float HSUBATTR; /* Sub-pixel precise attributes of contours */ #else typedef int32_t HIMGDIM; typedef int32_t HIMGCOOR; typedef INT4_8 HLINCOOR; typedef INT4_8 HIMGCNT; typedef INT4_8 HITEMCNT; typedef double HSUBCOOR; typedef double HSUBATTR; #endif
Examples for their use can be found in chapter “HALCON Data Types”.