scriptorron / indi_pylibcamera

INDI libcamera driver made in Python
MIT License
11 stars 5 forks source link

grab jpeg #43

Open gmke opened 1 year ago

gmke commented 1 year ago

would it be possible to get a jpeg image instead of the raw format? I have a PiHQ camera and during daylight I would save some processing getting the nice jpegs the camera makes.

CS, Markus

scriptorron commented 1 year ago

I would need to find out how the INDI protocol handles JPG images. Implementation will need some time. Sorry.

scriptorron commented 11 months ago

Hi Markus,

I searched internet and tried to understand the source code of other indi drivers (webcam and DSLR) to find out how this is done for other cameras. Unfortunately it seems that the INDI protocol supports raw (Bayer pattern) and RGB images only. The other drivers I have seen capture JPG but than they convert JPG to RGB for transmission.

The indi_pylibcamera driver already has the option to transmit RGB pictures: in tab "Image settings" is a driver control "Frame type" which can be set to "Processed". This will give better RGB images than configuring the image processor to make a JPG (and loosing data) and converting the JPG back to RGB.

For astro-photography the raw Bayer pattern format is still better than the RGB: it has higher dynamic range and does not suffer from rounding errors.

Please correct me, but I believe what you really need is RGB capture with automatic exposure control and white balance. The present driver implementation has both disabled to allow stacking of images. But this is not practical when you just want to do single shots under good light conditions. In next driver version I will add controls to allow enabling of automatic exposure control and white balance.

Regards, Ronald

scriptorron commented 11 months ago

I just released v2.1.0 which has now the low level camera controls available. To get pictures with automatic exposure control and AWB please do:

Regards, Ronald