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.

88 CHAPTER 6. SPECIAL ROUTINES FOR TYPICAL SUPPLY PROCEDURESMacro Application Image Data ProvidedÀÐÐÊÀÐÐËÑÀÐÐÐØÖÀÐÐÐØÖ¾region features,region transformation,binary morphologygray value features,segmentationfilter,image transformationsfilter,segmentation,arithmetics with two input imagesregion data (ÀÖÐÖÓÒ) of inputimage objectregion and image data (ÀÖÐÖÓÒand ÀÑ) of input image objectregion and image data (ÀÖÐÖÓÒand ÀÑ) of input image object,image data structure (ÀÑ) forimage output objectintersection of the regions of bothinput image objects (ÀÖÐÖÓÒ),the image data of both objects, anda image data structure (ÀÑ) forthe image output objectThe macros return all regions as pointers to the original region data within the <strong>HALCON</strong>data base. So the programmer is only allowed to read them. The only exception is againÀÐÐÐØÖ¾ that computes the intersection of the region data of both input images and storesit in a new region.6.1.1 ÀÐÐÊÀÐÐÊ (see Fig. 6.1) implements a loop over all objects of the first input image object parameter.For every object within this parameter it returns the region of the object in ÖÓÒ 2 .All gray value channels are ignored.ÀÐÐÊ is a combination of ÀÐÐÇ (see section 5.3.1) and ÀØÊÄ (see section 5.2.2). Itis typically used within feature extraction operators: A list of input regions have to be examinedconcerning special features. Some <strong>HALCON</strong> operators of this kind are e.g., ÖÙÐÖØÝ,Ö ÒØÖ or ÓÒØÐÒØ. Moreover, it is possible to return new region(s) by using the interfacemacro ÀÆÛÊÓÒ (see page 95) as it is done e.g., by ×ÐØ ×Ô or ×Ô ØÖÒ×.Fig. 6.2 illustrates the application of ÀÐÐÊ showing a complete supply procedure for a hypotheticaloperator ÒØÖ that computes the center of gravity of all input regions. The operatorhas one input object parameter that exclusively contains regions and two output control parametersfor returning the results as tuples of floating-point numbers (the coordinates of the centersof gravity of all regions). The corresponding -file (short version) might look likeÒØÖ ¹ ÁÈÒØÖÊÓÒ×ÊÓÛ×°¸ÓÐÙÑÒ×°℄ÒØÖ may be called with one or more regions as input. ÀÐÐÊ implements a loop over allof them, sets the loop index to the current index of the region (½ Ò), and passes a pointerto the region to the action procedure that performs the center of gravity. In our case the actionprocedure is the internal <strong>HALCON</strong> procedure ÀÊÄÖ. The result values are written into twoarrays of the type ÀÔÖ and returned by ÀÈÙØÈÖ (see section 5.5.5).2 Remember: <strong>HALCON</strong> image objects consist of one region specifying the area of definition and an arbitrarynumber of gray value channels containing the pixel data<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!