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.

1.4. AN EXAMPLE 11¯ one input control parameter (ÌÖ×ÓÐ) of type ÒØ with exactly one value and¯ no output control parameter.ÓÑÔ ¹Ù ¹ ¹ÔÐÓÒÙ×Ö ØÖ×ÓкFigure 1.5: Call of ÓÑÔ for <strong>HALCON</strong>/C.The operator definition within the -file now is used by ÓÑÔ to generate the appropriateinterface code. Fig. 1.5 shows the call of ÓÑÔ. Note, that within this manual ÐÓÒÙ×Ö isused as name of the <strong>HALCON</strong> package to be created. By calling ÓÑÔ with this options 9 thefiles ÀÐÓÒÙ×Öº (interface-code) and ÀÐÓÒÙ×Öº (prototype of the new <strong>HALCON</strong>operator) are created.In the next step one has to program the new <strong>HALCON</strong> operator. This is done by implementingthe supply and action procedure. This results in the typical structure of <strong>HALCON</strong> operators asillustrated in Fig. 1.6.» ØÓÒ ÔÖÓÙÖ »ÀÖÖÓÖ ÁÈÌÖ×ÓдÔÖÓÒиÖÓҸѸÛظØÖ×ÓиÖÓÒÓÙصߺººÐ» ×ÙÔÔÐÝ ÔÖÓÙÖ ¹ ÐÛÝ× ÛØ Ø× ÔÖÑØÖ »ÀÍ×ÖÜÔÓÖØ ÀÖÖÓÖ ÁÈÍ×ÖÌÖ×ÓдÀÔÖÓÒÐ ÔÖÓÒеßÀØÈÖ´ºº¸²ÌÖ×Óиººµ » Ø ÓÒØÖÓÐ »» ÔÖÑØÖ »ÀÐÐËÑ´ÔÖÓÒи²ÖÓÒ¸²Ñ¸½¸µ » ÛÓÖ ÓÒ ÐÐ »» ÒÔÙØ Ñ× »ßÀÈ´ÔÖÓÒиÁÈÌÖ×Óдºººµµ » ÐÐ ØÓÒ »» ÔÖÓÙÖ »ÀÆÛÊÓÒ´ÔÖÓÒиÖÓÒÓÙص » ×ØÓÖ ´Ö×ÙÐص »» ÖÓÒ »ÐÖØÙÖÒ´ÀÅËÌÊ͵ÐFigure 1.6: Sample source code of supply ÁÈÍ×ÖÌÖ×Óдµ and action ÁÈÌÖ×Óдµprocedure.Compiling the source code generates an object file (in the example ÔÙ×ÖØÖ×ÓкÓ)that should be integrated into the user extension library (ÐÓÒÙ×Ö). Moreover, the generatedinterface code must be converted to the corresponding language dependent interfacelibrary: In case of a C application 10 this is ÐÓÒÙ×Ö containing ÀÐÓÒÙ×ÖºÓ. The9 see section 7.1 for a complete description.10 ÀÚÐÓÔ uses the C version as well.<strong>HALCON</strong> 6.0

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

Saved successfully!

Ooh no, something went wrong!