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.

1.4. AN EXAMPLE 9Note, that it is not necessary to modify Ä ÄÁÊÊ ÈÌÀ in order to use the package withinHDevelop.1.4 An ExampleThe following example illustrates the steps described in section 1.2. Assume, one wants toimplement a new operator named Ù×Ö ØÖ× to extract all pixels with a gray value largerthan a threshold value specified in an input parameter. The use of Ù×Ö ØÖ× within a Cprogram is illustrated in Fig. 1.2.ÑÒ´µßÀÓØÒØÁѸÊÓÒÌÖ×ÐÖÑ´²ÁѸÑÓÒݵÌÖ× ½¼¼Ù×ÖØÖ×´ÁѸ²ÊÓÒ¸ÌÖ×µFigure 1.2: Calling the operator Ù×Ö ØÖ× in C. A more detailed example is provided in±ÀÄÇÆÊÇÇ̱ÒÜÑÔÐ×Ò ÒØÖÒÐÓÒÙ×ÖÒ×ÓÙÖÒØ×ØØÖ×Óк.To use Ù×Ö ØÖ× in this way within C-programs 8 ,¯ The new operator must be implemented.¯ The corresponding <strong>HALCON</strong> interface-code must be generated.¯ The corresponding package must be created especially containg the operator and interfacelibraries.¯ The application must be linked.Ù×ÖØÖ× ¹ ÁÈÍ×ÖÌÖ×ÓÐÁÑÊÓÒÌÖ×Óа℄Figure 1.3: Defining a new operator Ù×Ö ØÖ×.First of all one has to create a definition file (file extension º), as illustrated in Fig. 1.3 andFig. 1.4. Fig. 1.3 shows only the absolute minimum of information that a definition file mustcontain in order to call a new operator within C-programs. When using C++ or ÀÚÐÓÔ,an extended version is necessary as described in section 2.2. The minimal form of such anextended definition is illustrated in Fig. 1.4. The -file specifies:¯ the name of the operator (Ù×Ö ØÖ×),8 To use it within C++ basically the same steps are necessary, see section 7.<strong>HALCON</strong> 6.0

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

Saved successfully!

Ooh no, something went wrong!