CPylonImage to Mat
I am currently developing a machine vision application using a Basler camera. I am trying to capture an image using the Pylon SDK and then convert it to Mat format for further analysis.
This process works well when the pixel format is Bayer 8-bit or Bayer 12-bit, using respectively CV_8UC1 and CV_16UC1 as the Mat pixel type. However, I’m currently not able to convert Bayer 12-bit packed images to Mat.
I would be very grateful if someone could explain me how to do that.
There has been someone tackling this I think. Take a look here.