Closed seb5g closed 8 months ago
Hello, could you have a look to this minimal modification please?
Hello! Sorry for the delay!
Thanks for bringing this up! The new version of pylablib (which was, conincedentally, published several days after your original pull request) added support for the sensor info in the Thorlabs scientific cameras via ThorlabsTLCamera.get_sensor_info
method. It also now has support for color frames readout and de-bayering (it uses custom methods which seem to work identically to the one provided by Thorlabs), although you can still, of course, get the raw frames (you can enable it up by calling cam.set_color_format("raw")
) and use an algorithm of your choice. Let me know if this solves your problem.
I see, thanks. I'll have a look and I'm sure it solves the issue!
This PR allows to query and add the sensor type to the device info query. This is mandatory because otherwise there is no possibility to check if the camera is monochrome or bayer type color.
In case of bayer color, the newest frame is actually a raw bayer image and a demosaicification is needed to get back the RGB (or even monochrome) image output. I'm using for this the cvtColor function from OpenCV.
The change here is minimal as only in the returned device info. Could you please accept this PR, I really need this info!
Thanks