https://github.com/zivid/zivid-halcon-samples
HALCON code samples for Zivid
https://github.com/zivid/zivid-halcon-samples
halcon samples zivid
Last synced: 2 months ago
JSON representation
HALCON code samples for Zivid
- Host: GitHub
- URL: https://github.com/zivid/zivid-halcon-samples
- Owner: zivid
- License: bsd-3-clause
- Created: 2019-03-29T09:16:17.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-12-23T10:56:10.000Z (3 months ago)
- Last Synced: 2025-12-24T07:45:46.678Z (3 months ago)
- Topics: halcon, samples, zivid
- Language: Python
- Homepage: https://zivid.com
- Size: 120 MB
- Stars: 17
- Watchers: 7
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HDevelop samples
This repository contains halcon code samples for Zivid SDK v2.17.2. For
tested compatibility with earlier SDK versions, please check out
[accompanying
releases](https://github.com/zivid/zivid-halcon-samples/tree/master/../../releases).

---
*Contents:*
[**Samples**](#Samples-list) |
[**Installation**](#Installation) |
[**Support**](#Support) |
[**License**](#License)
---
## Samples list
There are two main categories of samples: **Camera** and
**Applications**. The samples in the **Camera** category focus only on
how to use the camera. The samples in the **Applications** category use
the output generated by the camera, such as the 3D point cloud, a 2D
image or other data from the camera. These samples shows how the data
from the camera can be used.
- **Camera**
- **Basic**
- [Capture](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Camera/Basic/Capture.hdev) - Capture a 3D color point cloud from the camera and use it
to generate a HALCON ObjectModel3D which is then visualized.
- [CaptureHDRCompleteSettings](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Camera/Basic/CaptureHDRCompleteSettings.hdev) - Capture an HDR image from the Zivid camera with fully
configured settings for each frame.
- [CaptureSavePLY](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Camera/Basic/CaptureSavePLY.hdev) - Capture a 3D color point cloud from the camera and save it
to a PLY file format.
- [CaptureWithSettingsFromYML](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Camera/Basic/CaptureWithSettingsFromYML.hdev) - Capture a 2D color image, a 3D point cloud without colour
and 2D color image + 3D color point cloud from the camera
and use them to generate HALCON ObjectModel3D which is then
visualized.
- [ConnectToSerialNumberCamera](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Camera/Basic/ConnectToSerialNumberCamera.hdev) - Connect to a specific Zivid 3D camera based on its serial
number.
- **InfoUtilOther**
- [QuerySettingsAndParameters](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Camera/InfoUtilOther/QuerySettingsAndParameters.hdev) - Query information about the image acquisition interface
and selected specific parameters of Zivid camera.
- [Warmup](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Camera/InfoUtilOther/Warmup.hdev) - A basic warm-up method for a Zivid camera with specified
time and capture cycle.
- **Applications**
- **Basic**
- **FileFormats**
- [ReadPLY](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Applications/Basic/FileFormats/ReadPLY.hdev) - Import and display a Zivid point cloud from a PLY
file.
- **Advanced**
- **ObjectMatching**
- [SurfaceMatchingCreateModel](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Applications/Advanced/ObjectMatching/SurfaceMatchingCreateModel.hdev) - Create a model for HALCON surface-based 3D matching
algorithm from a Zivid point cloud captured by a camera.
- [SurfaceMatchingCreateModelFromFile](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Applications/Advanced/ObjectMatching/SurfaceMatchingCreateModelFromFile.hdev) - Create a model for HALCON surface-based 3D matching
algorithm from a Zivid point cloud loaded from a ZDF
file.
- [SurfaceMatchingFindModel](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Applications/Advanced/ObjectMatching/SurfaceMatchingFindModel.hdev) - Utilize surface-based 3D matching on data taken with a
Zivid camera.
- [SurfaceMatchingFindModelFromFile](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Applications/Advanced/ObjectMatching/SurfaceMatchingFindModelFromFile.hdev) - Utilize surface-based 3D matching on data taken with a
Zivid camera.
- **Procedures**
- [get\_first\_available\_zivid\_device](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Procedures/get_first_available_zivid_device.hdvp) - Get the first Zivid device from the input tuple of devices.
- [get\_settings\_for\_zivid\_camera\_model](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Procedures/get_settings_for_zivid_camera_model.hdvp) - Get settings depending on the camera model.
- [get\_zivid\_camera\_width](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Procedures/get_zivid_camera_width.hdvp) - Get width for given camera and sampling pixel setting.
- [get\_zivid\_preset\_file](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Procedures/get_zivid_preset_file.hdvp) - Get preset file for given camera.
- [get\_zivid\_sample\_data\_dir](https://github.com/zivid/zivid-halcon-samples/tree/master/source/Procedures/get_zivid_sample_data_dir.hdvp) - Get the path of ZIVID DATA depending on your operating system.
## Installation
Zivid offers two ways of interfacing with HALCON:
1. Through the Zivid SDK, utilizing the C++/C\# libraries available for
HALCON. We provide samples for both
[C++](https://support.zivid.com/latest//api-reference/samples/cpp.html)
and
[C\#](https://support.zivid.com/latest//api-reference/samples/csharp.html).
(**Recommended**)
2. Directly through a GenICam GenTL producer that comes with the [Zivid
Software](https://support.zivid.com/latest//getting-started/software-installation.html).
Zivid and HALCON are compatible with Windows 10 and 11, and Ubuntu
20.04, 22.04, 24.04.
-----
Note:
> Support for Ubuntu 18.04 is removed since SDK 2.10.
-----
To set up and use Zivid in one of these operating systems, please follow
their respective instructions on the following pages:
- [Install Zivid + HALCON for
Windows](https://support.zivid.com/latest/api-reference/samples/halcon/install-zivid-halcon-for-windows.html)
- [Install Zivid + HALCON for
LINUX](https://support.zivid.com/latest/api-reference/samples/halcon/install-zivid-halcon-for-linux.html)
- [Create a HALCON "Hello World"
Program](https://support.zivid.com/latest/api-reference/samples/halcon/create-a-halcon-hello-world.html)
- [How to Run a HALCON
Sample](https://support.zivid.com/latest/api-reference/samples/halcon/how-to-run-a-halcon-sample.html)
- [Debug in
HALCON](https://support.zivid.com/latest/api-reference/samples/halcon/halcon-debug.html)
- [HALCON Sample
Videos](https://support.zivid.com/latest/api-reference/samples/halcon/halcon-sample-videos.html)
The following HALCON versions have been tested and confirmed to work
with Zivid cameras:
- 19.05 Progress, 20.05 Progress, 21.11 Progress, 24.05 Progress,
24.11 Progress-Steady, 25.05 Progress
We recommend using one of the HALCON versions we have tested.
## Support
For more information about the Zivid cameras, please visit our
[Knowledge Base](https://support.zivid.com/latest). If you run into any
issues please check out
[Troubleshooting](https://support.zivid.com/latest/support/troubleshooting.html).
## License
Zivid Samples are distributed under the [BSD
license](https://github.com/zivid/zivid-halcon-samples/tree/master/LICENSE).