10.07.2015 Views

HALCON Extension Package Programmer's Manual

HALCON Extension Package Programmer's Manual

HALCON Extension Package Programmer's Manual

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2 CHAPTER 1. INTRODUCTIONto denote the subdirectory ÐÓÒÙ×Ö containing an example package within the <strong>HALCON</strong>base directory referenced by the environment variable ÀÄÇÆÊÇÇÌ. The same expression inUNIX convention would look like°ÀÄÇÆÊÇÇÌ»ÜÑÔÐ×»ÜØÒ×ÓÒ Ô»ÐÓÒÙ×Ö1.1 <strong>HALCON</strong> OperatorsThis section describes the external interface of <strong>HALCON</strong> operators, i.e., how to use them in aprogramming language, and their internal structure.1.1.1 Using <strong>HALCON</strong> Operators in C and C++There are two different modes of calling operators from <strong>HALCON</strong>/C 2 : One way is to call operatorsfor simple applications with only one value per control parameter (simple mode). This isthe easiest way and sufficient for many applications. When using complex procedures that needmore than one value per parameter, data is transfered within tuples (ÀØÙÔÐ). Iconic objects arealways represented as tuples (ÀÓØ) so that one image object can contain several images,regions, or XLDs.There exists a special interface for C++ supporting a flexible management of several types.Especially, the handling of multi-value control parameters is transparent to the user. Moreover,this interface enfolds an appropiate class hierarchy for handling different image analysis data.However, the defined class hierarchy has a fixed mapping between the <strong>HALCON</strong> operators andthe provided classes. This mapping follows predefined rules and is therefore partly generic.A user-defined <strong>HALCON</strong> operator cannot be linked to an arbitrary position inside the classhierarchy. Thus, these operators are integrated in C++ as C functions using the generic datatype ÀÓØ in order to pass arguments to and from the operator. This kind of integration isalso used if you export your ÀÚÐÓÔ program as C++ code.For further information please take a look at the corresponding manuals.1.1.2 Internal Structure of <strong>HALCON</strong> Operators<strong>HALCON</strong> operators (like the new operators in ÐÓÒÙ×Ö) typically consist of two procedures:One procedure – the supply procedure – receives the input data, tests its consistency,passes it to the processing action procedure and returns the output data after the processing.If the input data contains any composed objects, e.g., image tuples, the supply procedure hasto extract the single parts. An object key can represent an unlimited number of iconic objectsand every image object may consist of several components (one region and an unlimited numberof gray value channels; see also Fig. 5.2 on page 61). Generally, a user may assume thata <strong>HALCON</strong> operator is able to handle single iconic objects as well as composed objects (i.e.ÑÙÐØÚÐÙ ÓÔØÓÒÐ is set; see page 29) and that it can work on multi-channel images(i.e. ÑÙÐØÒÒÐ ÓÔØÓÒÐ is set; see page 34). So, the author of a new <strong>HALCON</strong> operatorshould implement appropriate mechanisms for extracting the needed data from composed2 The <strong>HALCON</strong> version that allows the usage of <strong>HALCON</strong> operators within C programs.<strong>HALCON</strong> <strong>Extension</strong> <strong>Package</strong> Interface / 2000-11-16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!