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.

5.4. CREATING OBJECTS AND WRITING OUTPUT OBJECT PARAMETERS 75Using ÀÇ the previously stored image data is assigned as default gray value component 1(ÁÅ ÁÆ) of the new image object.5.4.6 ÀÈÙØÁÑÀÈÙØÁÑ (see Fig. 5.19) combines ÀÈÙØÁÑ and ÀÇ. It stores the gray value channel(image matrix) Ñ in the <strong>HALCON</strong> data base and returns the corresponding data basekey in Ñ Ý. The parameter ÓÔÝ (ÄË or ÌÊÍ) is used as in ÀÈÙØÁÑ and specifies,whether the pixel data is copied 5 or only a pointer to the data is passed to the data base.Moreover, the gray value channel is inserted into the image object Ó Ý as component ÓÑÔ(½ Ò). Fig. 5.22 shows a typical application of this routine.ÀÝ ÓݸÀÑ ÑÀÖÐÖÓÒ ÖÓÒººº» Ñ ÔÖÓ×× ÖÝ ÚÐÙ Ø »» ÖÓÒ ÖÓÒ Ø »ÀÖÇ´ÔÖÓÒиÔÖÒÙѸ²ÓݵÀÈÙØÁÑ´ÔÖÓÒиÓݸÁÅÁƸ²Ñ¸Ä˸²µÀÈÙØÊÄ´ÔÖÓÒиÓݸÖÓÒ¸²µFigure 5.22: Creating a new image object using ÀÈÙØÁÑ and ÀÈÙØÊÄ.5.4.7 ÀÖÁÑÀÖÁÑ (see Fig. 5.19) is used for creating output images especially in the context of filter 6operations. As you know, <strong>HALCON</strong> image objects can share the underlying image matrices(gray value channels). Thus, input image objects of a filter operation might only differ in theirarea of definition (that is in their region component), but not in their gray values. Such objectshave different data base keys and different regions, but contain references to the same gray valuechannels. Obviously, it is very desirable to propagate this relation to the resulting output imageobjects as well.ÀÖÁÑ allocates memory for the image matrix within the ÀÑ structure Ñ ÓÙØ(similar to ÀÆÛÁÑ in section 3.2.2). The parameters ØÝÔ (Ì ÁÅ, ÄÇÆ ÁÅ,ÄÇÌ ÁÅ etc.; see Fig. 4.2 on page 50), ÛØ and Ø allow to specify the pixeltype and the size of the new matrix. Note, that new matrices are by default initialized with 0.However, this can be suppressed from outside or inside of the operator, see the discussion ofÀÆÛÁÑ in section 3.2.2 for details.Furthermore, ÀÖÁÑ creates a new data base object encapsulating this image data and returnsthe corresponding data base key in Ñ Ý ÓÙØ (similar to ÀÈÙØÁÑ in section 5.4.4).Finally, ÀÖÁÑ establishes a link between the original input image data (referenced by thedata base key Ñ Ý Ò) and this new object to avoid the allocation of multiple output5 This is necessary, if the pixel data was stored in temporary memory or if it will be modified later on.6 This is due to the fact, that filter only modify the gray values but not the regions of image objects.<strong>HALCON</strong> 6.0

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

Saved successfully!

Ooh no, something went wrong!