Just a short starting point for developing applications with OpenCV and Basler Pylon.

Project State

Public Project


Software Licence: Apache 2.0
Hardware Licence: Project has no hardware

Project Tags



Does this project pique your interest?

Login or register to join or follow this project.


Just a short starting point for developing applications with OpenCV and Basler Pylon.

Initial basic sample is in C++.

This can be done in a few ways, but the core is two steps:

1. Convert the incoming image to a format that OpenCV likes

2. Create an OpenCV image from the converted image.

An example is:

// The Pylon Image Format Converter will convert whatever format the grabbed buffer is in to a desired format.
CImageFormatConverter formatConverter;

// We configure the converter to use BGR8 because this is liked by OpenCV
formatConverter.OutputPixelFormat= PixelType_BGR8packed;

// We create a "Pylon Image" container to hold the converted image
CPylonImage pylonImage;

// Create an OpenCV image
Mat openCvImage;

// Convert the grabbed buffer
formatConverter.Convert(pylonImage, ptrGrabResult);

// Create an OpenCV image from the pylon image
openCvImage= cv::Mat(ptrGrabResult->GetHeight(), ptrGrabResult->GetWidth(), CV_8UC3, (uint8_t *) pylonImage.GetBuffer());

GitHub Repository


pushed 27ba038d76d5399fff15542ed4034d37e6f3ca74
License change to Apache 2.0
2017-08-30 20:44:24 UTC
pushed 272b4e52edc011360a4d2e638e37ed0accceefb5
updated makefile for pylon5
2017-08-28 16:45:19 UTC
pushed ad6fa36245ce04875f9d3fcae1ee94ff7c273854
test commit
2015-10-08 20:06:38 UTC
pushed b24df460232f06db6bc68315e4456cfc94c2ca53
initial commit
2015-10-07 16:35:31 UTC
Matthew Breit
pushed 50269fe9e04682d2fb01391c4e763613ddc526dc
Initial commit
2015-10-06 18:28:13 UTC


Ready to join the project?

You'd like to participate ... Show more