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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

78 CHAPTER 5. HANDLING ICONIC OBJECTS AND CONTROL PARAMETERS´ÖÈÖÓµ ÀÄÖÓÒØÓÙÖfor XLD contours and´ÖÈÖÓµ ÀÄÖÈÓÐÝÓÒfor XLD polygons allocated based on ÀÐÐÓ.Finally, ÀÖÄ not only creates a new data base object, but also appends this object to theoutput object parameter with number ÔÖ ÒÙÑ. Fig. 5.24 and 5.25 show two typical applicationsof ÀÖÄ.5.5 Reading and Writing Control ParametersThis section describes routines for reading and writing in-/output control parameters, seeFig. 5.26. Interchanging control data with the host language is done via the data type ÀÔÖ(see section 4.4).5.5.1 ÀØÈÖÀØÈÖ (see Fig. 5.26) reads the parameter values of the input control parameter numberÔÖ ÒÙÑ (½ Ò) and writes them to the array ÚÐ of ÀÔÖ structures, that must has beenallocated before with a suitable size (note, that ).Note, that for every input value, its type (ÄÇÆ ÈÊ, ÄÇÌ ÈÊ, ËÌÊÁÆ ÈÊ ) is also storedwithin the ÀÔÖ structure. Thus, it is possible to pass different control data types within onecontrol parameter of a <strong>HALCON</strong> operator. The current number of values is returned in ÒÙÑ.ÀØÈÖ allows to restrict the parameter access in two respects:¯ The expected type can be specified by ØÝÔ. This also includes type combinations suchas ÄÇÆÈÊ ÄÇÌÈÊ.¯ The expected number of values can be specified by the interval (ÑÒ,ÑÜ), whereas ÑÜshould not exceed the number of allocated ÀÔÖ elements within the array ÚÐ.If the specified number or types of values are violated, ÀØÈÖ exits the supply procedurewith an appropriate error message. Fig. 5.27 shows an application of ÀØÈÖ.Note, that in case of string parameters, memory has to be allocated for ÚÐ℄ºÔÖº×. TheeasiestwaytodothisistouseÀÐÐÓËØÖÒÅÑ specifying the expected number of charactersfor all input strings, see section 5.5.7.5.5.2 ÀØËÈÖÀØËÈÖ (see Fig. 5.26) is a simplified version of ÀØÈÖ. In contrast to the latter a fixednumber of parameter values is read, see Fig. 5.28. Therefore, the routine does not return theactual number 7 of values.7 This number is fixed. If more or less values are passed to the <strong>HALCON</strong> operator, ÀØËÈÖ exits the supply<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!