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.

3.3. STRUCTURING PROGRAMS 453.2.3 DebuggingThe <strong>HALCON</strong> memory management provides debugging mechanisms. Every time a memoryblock is deallocated a couple of consistency checks is performed automatically. Moreover, theconsistency of memory blocks can be checked for debugging reasons at any time using specific<strong>Extension</strong> <strong>Package</strong> Interface routines, see Fig. 3.5.NamesÀÌ×ØÅѸ ÀÌ×ØÈØÖ¸ ÀÌ×ØÐÐÌÑÔ¸ ÀÌ×ØÌÑÔSynopsisÒÐÙ ÀÐÓÒºÀÖÖÓÖ ÀÌ×ØÅÑ´ÚÓµÀÖÖÓÖ ÀÌ×ØÈØÖ´ ÚÓ ÔÓÒØÖµÀÖÖÓÖ ÀÌ×ØÐÐÌÑÔ´ ÀÔÖÓÒÐÔÖÓÒеÀÖÖÓÖ ÀÌ×ØÌÑÔ´ ÀÔÖÓÒÐ ÔÖÓÒиÚÓÔÓÒØÖµFigure 3.5: <strong>HALCON</strong> memory management: Check of consistency.ÀÌ×ØÅÑ checks all the memory allocated with ÀÐÐÓ or ÀÐÐÓÄÓÐ, whereas ÀÌ×ØÈØÖchecks only the specified memory block. Similar to that ÀÌ×ØÐÐÌÑÔ checks all the memoryallocated via ÀÐÐÓÌÑÔ and ÀÌ×ØÌÑÔ checks the specified block. With any failure of theconsistency check, the routines return an error number (À ÊÊ ÁÅ – inconsistent memory).Furthermore, if the global variable ÀÓÄÓÛÖÖÓÖ is set to ÌÊÍ, they display a description of theerror either on ×ØÖÖ (UNIX) or within an alert box (Windows NT/ 2000). This variable canbe set in an application with the operator ×Ø ×Ý×ØÑ´Ó ÐÓÛ ÖÖÓÖ¸ØÖÙ»Ð×µor used directly inside the newly written operator.3.3 Structuring Programs<strong>HALCON</strong> operators are typically implemented by at least two routines: one procedure (supplyprocedure) receives/unpacks all input data and checks it’s consistency. Afterwards it calls theaction procedure that performs the image processing. In some cases it might be convenient toimplement several action procedures dependent on special parameter values or pixel types ofimage data. Generally, these steps are performed within a loop over all input objects that mayinclude further loops over different parameter values and over all image channels. The resultsare collected and finally returned to the <strong>HALCON</strong> interface to the application.<strong>HALCON</strong> 6.0

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

Saved successfully!

Ooh no, something went wrong!