 |
|
Programming with HALCON
HALCON offers the languages interfaces HALCON/C++, HALCON/.NET
(native), HALCON/COM, and HALCON/C. Using these interfaces you can
access all of HALCON's powerful operators from programming languages
like C, C++, C#, Visual Basic, or Delphi.
HALCON's open architecture allows you to access defined data
structures and thus to integrate it with further software components
such as a user interface or process control. HALCON's inbuilt
high-performance memory management lets you concentrate on your
application development.
|
|
|
|
|
-
HALCON/.NET: In HALCON/.NET all
HALCON operators and data structures are available as high-level
classes, greatly simplifying the development of your application.
HALCON/.NET can be used in .NET languages like C#, Visual Basic .NET,
and C++. It can be used on Windows and with Mono also on
Linux/UNIX.
private void timerCycle_Tick(object sender, System.EventArgs e)
{
HTuple results;
// Create instance of reader without special parameters
HBarCode reader = new HBarCode(new HTuple(), new HTuple());
// Acquire next image
HImage image = acquisition.GrabImage();
// Find and decode bar codes of type EAN 13
HRegion regions = reader.FindBarCode(image, "EAN-13", out results);
if (results.Length > 0)
{
// Display image and bar code regions in graphics window
window.DispImage(image);
window.DispRegion(regions);
// Display decoded result of first found bar code in a text box
textBoxCode.Text = results[0];
}
else
{
textBoxCode.Text = "Not found!";
}
// Cleanup (could also be done using the garbage collector)
regions.Dispose();
image.Dispose();
reader.Dispose();
}
|
|
With only a few lines of
C# code you can build the entire application,
e.g., to decode bar codes.
|
- HALCON/C++: With HALCON/C++
you can access the whole functionality of HALCON based on a
sophisticated C++ class hierarchy. This enables you to develop
programs that are very compact and easy to maintain. HALCON/C++ is
available not only for Windows but also runs on Linux/UNIX.
- HDevelop: If you develop
your solution with the interactive rapid prototyping environment
HDevelop the integration
is very easy, since HDevelop can
export your application as C++, C, C#, or Visual Basic source code.
- HDevEngine: HDevEngine - the
"HDevelop Engine" - is a library that acts as an interpreter and
lets you directly load and execute HDevelop programs and procedures
from within your C++, C#, or Visual Basic application.
- Parallel Programming: HALCON
not only supports multithreading and parallel programming,
but also provides automatic parallelization to exploit
the power of multi-processor or multi-core hardware.
Read more about
Parallel HALCON.
|