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.

92 CHAPTER 6. SPECIAL ROUTINES FOR TYPICAL SUPPLY PROCEDURES6.1.3 ÀÐÐÐØÖÀÐÐÐØÖ (see Fig. 6.1) further extends the loop macros introduced so far: For every inputimage object a new output image object is created (and added to the first output object parameter)with¯ the same number of channels (components),¯ the same pixel types (of the corresponding channels),¯ the same image size and¯ the same area of definition (region).Thus, ÀÐÐÐØÖ is a combination/modification of ÀÐÐÇ (see section 5.3.1), ÀØÊÄ(see section 5.2.2), ÀÐÐÓÑÔ (see section 5.3.2), ÀÓÔÝÇ (see section 5.4.2), andÀÈÙØÁÑ (see section 5.4.6). It has been designed for filter operators that typically create amodified result image for every input image. The region remains unmodified. Typical examplesfor this functionality are the <strong>HALCON</strong> operators ×ÓÐ ÑÔ, ÑÒ Ñ, Ø, ×Ð ÑÜ orÐÛ× ÝØ.Fig. 6.5 shows a typical application of ÀÐÐÐØÖ – a hypothetical operator ×Ð ÒÛ thatmultiplies all gray values of the input objects within the first input object parameter with aconstant. The corresponding -file(short version) might look like×ÐÒÛ ¹ ÁÈËÐÆÛÁÑÁÑËÐÅÙÐØ°℄The operator has one input object parameter (ÁÑ) that contains one or more input imageobjects (each consisting of one or more gray value channels and one region as area of definition).With every pass of the loop an image object is accessed and its components are transfered toÖÓÒ and Ñ Ò, see also ÀÐÐËÑ in section 6.1.2. These components are passed tothe action procedure ÁÈËÐÆÛ. In this example only the first channel of each input object isused.ÀÐÐÐØÖ also creates output objects (in the <strong>HALCON</strong> data base) to return the modified data.Furthermore, these objects are added to the list of objects for the first output object parameter(here ÁÑËÐ). Their underlying image matrices are accessable via Ñ ÓÙØ. Thoseare also passed to the action procedure ÁÈËÐÆÛ within the loop. ÁÈËÐÆÛ calculates thenew gray values for all pixels within the area of definition of the input image and writes theminto the provided image components Ñ ÓÙØ 4 . The regions of the image objects remainunmodified so that all pixels of output objects lying outside the region are undefined.Note, that ÀÐÐÐØÖ creates all necessary image matrices, combines them with the inputregions to new image objects, and returns those in the first output object parameter. So theprogrammer of the supply procedure needs not to bother about the handling of image objectsetc. To access the input control parameter, ÀØËÈÖ (see section 78) is used in the example.The structure Ñ Ò may contain different pixel types. There are several ways to handle thiswithin an operator:4 Note, that Ñ ÓÙØ contains a pointer to a pixel matrix with the same size and pixel type as Ñ Ò.<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!