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.5. READING AND WRITING CONTROL PARAMETERS 81ÀÔÖÀÔÖÁÆÌÔÖ½¸ÔÖ¾ÔÖ¿ÒÙÑ» ÐÐÓØ ÑÑÓÖÝ ÓÖ ×ØÖÒ× »ÀÐÐÓËØÖÒÅÑ´ÔÖÓÒи½¼¼¼µ» Ö ×ÓÖØ»ÒØ»ÐÓÒ ÚÐÙ Ò ÔÖÑØÖ ÒÙÑÖ ½ »ÀØËÈÖ´ÔÖÓÒи½¸ÄÇÆÈʸ²ÔÖ½¸½µ» ÒÓÛ ÔÖ½ºÔֺР»» Ö ×ØÖÒ Ò ÔÖÑØÖ ÒÙÑÖ ¾ »ÀØËÈÖ´ÔÖÓÒи¾¸ËÌÊÁÆÈʸ²ÔÖ¾¸½µ» ÒÓÛ ÔÖ¾ºÔÖº× ÌÜØ »» Ö ØÙÔÐ Ó ÐÓØ ÚÐÙ× Ò ÔÖÑØÖ ÒÙÑÖ ¿ »» Ö×ظ Ø Ø ÒÙÑÖ Ó ÚÐÙ× »ÀØÈÖÆÙÑ´ÔÖÓÒи¿¸²ÒÙѵ» ÒÓÛ ÒÙÑ ¿ »» ×ÓÒ¸ ÐÐÓØ ÑÑÓÖÝ ÓÖ Ø ÚÐÙ× Ò Ö ØÑ »ÀÈ´ÀÐÐÓÌÑÔ´ÔÖÓÒи´ÚÓµ²ÔÖ¿¸´×Þص´ÒÙÑ×ÞÓ´ÀÔÖµµµµÀØËÈÖ´ÔÖÓÒи¿¸ÄÇÌÈʸÔÖ¿¸ÒÙѵÓÖ ´¼ ÒÙÑ ··µ ß» ÔÖ¿℄ºÔÖº ¼º¸½º¸º »ºººFigure 5.29: Use ÀØÈÖÆÙÑ to get the number of control values before reading the controlparameter values of the operator call ÑÓ´¸³ÌÜس¸¼º¸½º¸º℄µ.parameter values of the input control parameter number ÔÖ ÒÙÑ (½ Ò). It is an alternativeto ÀØÈÖ (see page 78). However, ÀØÈÈÖ is much more efficient in terms of memoryoverhead, because it just returns pointers to the values instead of copying them. Thus, the callerneeds not to allocate any memory before calling ÀØÈÈÖ. On the other hand, the parametervalues may only be read and must not be modified. Note, that for every parameter value, itstype (ÄÇÆ ÈÊ, ÄÇÌ ÈÊ, ËÌÊÁÆ ÈÊ ) is also stored within the ÀÔÖ structure. This isnecessary, because the same control parameter may contain values of different control datatypes. The current number of parameter values is returned in ÒÙÑ.Figure 5.30 shows the usage of ÀØÈÈÖ based on the example which was also used forÀØÈÖ (compare figure 5.27 on page 80).5.5.5 ÀÈÙØÈÖÀÈÙØÈÖ (see Fig. 5.26) writes control data to the output control parameter number ÔÖ ÒÙÑof a <strong>HALCON</strong> operator. The ÒÙÑ values in the ÀÔÖ structure ÚÐ are copied by this routine.Note, that the types of the parameter values (ÄÇÆ ÈÊ, ÄÇÌ ÈÊ, ËÌÊÁÆ ÈÊ ) are storedwith each ÀÔÖ structure. This allows to use a different type for every data element, seeFig. 5.31.<strong>HALCON</strong> 6.0

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

Saved successfully!

Ooh no, something went wrong!