IDS peak IPL  v1.5.0
Mainpage

Introduction

IDS peak IPL (Image Processing Library) is an object-oriented C++ library that provides special functionality for processing image data. The IDS peak IPL can be used, for example, to convert raw bayer images from the camera that were captured via the IDS peak API into color (debayering).

Static or Dynamic Loading

By default, this library is linked into the user program, therefore is loaded statically at program start. Instead, it can also be loaded dynamically, when the first library function is called. To use this feature, enable the CMake option PEAK_IPL_DYNAMIC_LOADING or set the #define PEAK_IPL_DYNAMIC_LOADING before including any of the libraries files.

C# / .NET

For Windows, there is also a .NET version of the library.

To use it in a C# project, add a reference to the ids_peak_ipl_dotnet.dll to the project.

Before starting your application, make sure that the DLL-Loader can find all required libraries. This means that ids_peak_ipl_dotnet.dll, ids_peak_ipl_dotnet_interface.dll and ids_peak_ipl.dll are located next to your application binary or that the directory where they are located is added to the DLL-Loader's search directories. To add their directory to the DLL-Loader's search directories, you could simply append their directory to the environment variable 'Path':

PowerShell:

1. $env:Path="$env:Path;<Installation-Directory-Of-ids_peak_ipl.dll>"
2. $env:Path="$env:Path;<Installation-Directory-Of-ids_peak_ipl_dotnet.dll>"
3. Start your application

CMD:

1. set Path=%Path%;<Installation-Directory-Of-ids_peak_ipl.dll>
2. set Path=%Path%;<Installation-Directory-Of-ids_peak_ipl_dotnet.dll>
3. Start your application

The IDS peak IPL .NET works much like the IDS peak IPL C++. The same principles, class and method names apply.

Python

To use IDS peak IPL in Python, there is a separate Python wheel for each supported Python version and CPU architecture. A Python wheel is a package file (with .whl file ending) which can be installed via 'pip', Python's package manager. Just call 'pip install <Path-To-Python-Wheel>' to install your chosen Python wheel.

To finally use IDS peak IPL in your Python script, just add 'import ids_peak_ipl.ids_peak_ipl' or 'import ids_peak_ipl.ids_peak_ipl as some_alias' at the top of your Python script. The latter should be preferred.

The Python API works much like the C++ API. Nearly the same principles, class and method names apply. There are only a few differences between the C++ API and the Python API. The most important ones are listed here:

C++Python
Enums
const auto pixelFormatName = PixelFormatName::Mono8;
std::cout << ToString(pixelFormatName) << '\n';
Enums
pixel_format_name = some_alias.PixelFormatName_Mono8
print(some_alias.PixelFormatNameEnumEntryToString(pixel_format_name))
Image Creation
const auto width = size_t{ 1 };
const auto height = size_t{ 1 };
auto imageFromSize = Image{ PixelFormatName::Mono8, width, height };
// buffer is an instance of IDS peak API's class Buffer
auto imageFromSizeAndBuffer = Image{ buffer.PixelFormat(), buffer.BasePtr(),
buffer.Size(), buffer.Width(), buffer.Height() };
Image Creation
width = 1
height = 1
image_from_size = some_alias.Image.CreateFromSize(some_alias.PixelFormatName_Mono8, width, height)
# buffer is an instance of IDS peak API's class Buffer
image_from_size_and_buffer = some_alias.Image.CreateFromSizeAndBuffer(buffer.PixelFormat(),
buffer.BasePtr(),
buffer.Size(),
buffer.Width(),
buffer.Height())
numpy_array = numpy.array([[10, 20, 30]], dtype=numpy.uint8)
image_from_size_and_python_buffer = some_alias.Image.CreateFromSizeAndPythonBuffer(img.PixelFormatName_RGB8,
numpy_array, width, height)
byte_array = bytearray([255, 10, 128])
image_from_size_and_python_buffer = some_alias.Image.CreateFromSizeAndPythonBuffer(img.PixelFormatName_RGB8,
byte_array, width, height)