Multiple Image Stitching
In some cases when using area or line scan cameras you may need to stitch multiple images to shape a bigger image with higher resolution. This project provides source code the demonstrates how to do that with Basler pylon APIs and cameras.
Multiple Image Stitching
This project provides sample source code based on the Basler pylon APIs to demonstrate how multiple images acquired from line scan or area scan GigE or USB3.0 cameras can be stitched to a bigger one.
All industrial or embedded cameras/sensors have a limit for the maximum image width and image height (also referred to as ROI, or Region of Interest) that can be acquired and transferred to the host PC.
In case of line scan cameras, e.g. Basler runner or Basler racer GigE cameras, the limit for the ROI width is defined by the sensor's width. The ROI height is not limited by the sensor, but by the camera's internal memory and the principles of GigE to transfer complete frames. Because of that a limit on the ROI height of every individual frame must be defined.
The limit of the ROI height depends on a few camera settings, i.e. ROI width, pixel format (Mono/ Bayer/ YUV422/ RGB) and used bit depth (8bit, 12bit or 16bit per pixel). All of these settings have an effect on the amount of RAM used inside the camera to build up an image and prepare it for transfer.
FYI: most of Basler's cameras have about 56MB of internal image memory.
In some cases, however, the application may require to run image processing on higher resolution images, than the camera can acquire and transfer to the PC. In this case, you can simply stitch multiple frames together in the software to achieve the overall desired ROI height.
For example, consider the following use case:
We assume that a Basler racer GigE raL4096-24gm camera is used and an image with ROI= 4096 x 10000 in 8bit depth, i.e. Mono8, is required. The maximum allowed ROI for the camera is ROI= 4096 x 7089 though.
To realize that task, you can simply acquire e.g. two images with ROI= 4096 x 5000 each and stitch them together to a bigger one.
- This guide assumes that you're using the pylon Camera Software Suite version 5.0.5 or newer (www.baslerweb.com)
- This guide also assumes that you're using Basler's racer GigE or any other Basler are or line scan camera with GigE or USB3.0 interface.
Let's stitch it!
This project provides sample code based on Basler's pylon C++, pylonC.NET and pylon.NET APIs.
Download your sample project and give it a try now!
PS: do not forget this is a sample private project without any warranty.