indigo-astronomy / indigo

INDIGO is a system of standards and frameworks for multiplatform and distributed astronomy software development designed to scale with your needs.
http://www.indigo-astronomy.org
Other
153 stars 70 forks source link

INDIGO driver for RaspberryPi HQ camera #391

Open astrorafael opened 3 years ago

astrorafael commented 3 years ago

It is now really feasible to perform low cost astrophotograpy using the new Raspberry Pi HQ camera- You can see astonishing examples and various setups.

For scientific purposes, the Bayer RAW mode should be supported. Other modes such as YUV unfortunately perform gamma scaling which spoils linearity (done in the RPi VCore firmware). Raspistill supports this raw bayer mode writting an EXIF header like an ordinary JPEG image but substituting the JPEG encoded pixel data with the Bayer pixel data. Beyond astrophotograpy, the possibilities of such low cost setup are wide:remote sky pollution monitoring, fireball monitoring, transits & occultation monitoring, etc.

However, this CMOS camera + raspistill cannot be integrated and managed properly as an astronomical device, just like other devices in the generic INDI model. It would be very nice if this new CMOS camera could have its own INDIGO driver, probably based on the raspistill C source code, but simplified and suited to astrophotography.

An interesting tutorial on how these CMOS imagers work can be found in the picamera Python library

polakovic commented 3 years ago

I'll check raspistill to learn how to use the camera. I always wanted to make a driver for it, this is what I needed :)

Thank you! Peter

astrorafael commented 3 years ago

Excelent news! For scientific purposes, it is convenient to disable automatic gains and automatic white balance modes, as discussed in this note.

polakovic commented 3 years ago

Definitely, we always capture raw image without any "automatic" correction whenever possible.

johnwebbcole commented 3 years ago

Any updates on the RPi HQ driver?

polakovic commented 3 years ago

Not yet, but it is a good time to look at it..

MerowingerX commented 2 years ago

Since debian bullseye, the camera subsystem is now libcamera. I tried to understand, how libcamera works and tried to build the classes of libcamera-apps on indigosky. Unforunally it cannot compile an easy indogo_driver based upon ccd_simulator, the c++includes on indigosky are not found, and redefining the include pathes opens other problems, It seems that using the class structure by libcamera-apps does not match the architecture of indigo, is this correct?

rumengb commented 2 years ago

indigosky is not meant to be a build system. It is supposed to be a lightweight system, optimized to run INDIGO. So you need to install the whole build system on your own. First try to build indigo without any modifications according to the README and then install the additional dependencies needed by libcamera. however if you install libcamera development package it should install its dependencies too. And only then you should try to build your driver.

On Sun, Feb 6, 2022 at 3:57 PM callahan69 @.***> wrote:

Since debian bullseye, the camera subsystem is now libcamera. I tried to understand, how libcamera works and tried to build the classes of libcamera-apps on indigosky. Unforunally it cannot compile an easy indogo_driver based upon ccd_simulator, the c++includes on indigosky are not found, and redefining the include pathes opens other problems, It seems that using the class structure by libcamera-apps does not match the architecture of indigo, is this correct?

— Reply to this email directly, view it on GitHub https://github.com/indigo-astronomy/indigo/issues/391#issuecomment-1030837640, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5EZBOPC4JWE24F5VBVEPLUZZ44ZANCNFSM4U7P7BFA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

MerowingerX commented 2 years ago

yes, I have done this all, indigo is compiling and libcamera is installed. drivers frame is now compiling,

rumengb commented 2 years ago

Sorry I do not understand. Is it OK now?

MerowingerX commented 2 years ago

In principle yes, but there are some questions about the architecture, and the setup of driver development. Is there a documentation about the buildprocess? If I need to link a library (libcamera), how is this to be added to the makefile.inc? Or is linking of external libraries not allowed?

rumengb commented 2 years ago

First you should add your driver to linux_drivers libcmera is Linux specific driver. You should name it indigo_ccd_libcamera or something like that indigoccd is mandatory prefix. Since libcamera is standard library you can simply use it you can look at https://github.com/indigo-astronomy/indigo/blob/master/indigo_linux_drivers/ccd_gphoto2/Makefile.inc It shows how to install dependency that you provide (in this case libraw) and system library libgphoto2. Example how to make a driver can be found everywhere bit the simulator is not the best example. it overly complex with many devices being exported. For that matter I would suggest you to look at: https://github.com/indigo-astronomy/indigo/blob/master/indigo_docs/DRIVER_DEVELOPMENT_BASICS.md it is also important to be familiar with the driver concepts: https://github.com/indigo-astronomy/indigo/blob/master/indigo_docs/INDIGO_SERVER_AND_DRIVERS_GUIDE.md and some simpler camera driver like: indigo_ccd_mi or indigo_ccd_dsi (do not pay attention to the firmware loader)

sajmons commented 1 year ago

Is there any progress on this? Being able to use HQ Camera from ASCOM would be really great.

polakovic commented 1 year ago

Sorry, nothing new yet.