Thursday 14 January 2021

Bench-testing cameras in AstroDMx Capture; testing new functions in the software; and a sneak preview of current research with the HQ Raspberry Pi Pi-Camera

A cold and starry night is not the time to be testing new functions, new cameras or new SDKs in AstroDMx Capture. The starry night is reserved for doing serious field testing of the software to try to obtain worthwhile astronomical images. Bench-testing is where the first line of testing takes place.

There are two modes in which the capture software needs to be bench-tested on whatever cameras are required, and on all available cameras when major changes to the software have been made. These modes are mainly:

  • 8-bit fast exposures such as would be used for imaging planets, the Moon or the Sun (through suitable solar filters).
  • 16-bit long exposures such as would be used for imaging deep-sky objects.

These tests need to be done at any time of day and have to be realistic.

For 8-bit fast exposures we use a clamp-stand on which are mounted the cameras currently involved in the testing, with lenses mounted on the cameras. (with cameras that cannot take a lens, they are mounted on a small scope and structures across the valley are imaged)

A well-lit aquarium gives a good subject for fast imaging.


For some 8-bit testing the camera is mounted on a trinocular research-grade microscope.


However, if the light source is turned very low and white neutral density filters are placed on the light source, it is possible to set the illumination levels arbitrarily low.


Then, a lights-out canopy completes the darkening procedure


Using this set of equipment it is possible to simulate any imaging situation and to perform meaningful tests of cameras, SDKs and AstroDMx Capture.


A sneak preview of current AstroDMx Capture research with the Raspberry Pi HQ Pi-Camera.

These bench-testing systems are currently being used by Nicola to test the feasibility of controlling the Raspberry Pi High Quality camera and capturing data via AstroDMx Capture for the Raspberry Pi. This post is a preview of some current research.

I did some preliminary tests with python programs to determine whether the Raspberry PI HQ camera might be suitable for astronomical imaging, and these tests can be seen HERE

In general it appeared that acceptable astronomical images could be obtained from the camera, and this made it worthwhile looking further into the possibilities.

Every camera that has been implemented in AstroDMx Capture to date, including DSLRs has been connected to the computer via USB2.0 or USB3.0. 

The Raspberry Pi Pi-Camera is quite different. In a sense, the camera is not an independent device from the computer. The camera module streams data continually to the Raspberry Pi GPU part of the SOC. So, in a sense, we can regard the GPU as performing some of the key functions of the camera. The data have to be sent to the GPU from the camera module, via a special Ribbon cable that connects to a port on the Pi circuit board. These are the things that make the Pi-Camera different from a USB camera.

The first point that was noticed is that the V4L kernel driver for the Pi-Camera is not a fully developed and stable implementation and Nicola rejected it as the first line of approach to controlling the camera.

There are a number of libraries available to control the Raspberry Pi cameras but the documentation is incomplete and the libraries contain very complex routines, few if any are of any relevance to astronomical imaging.

These libraries themselves depend on lower level abstraction layers that form library dependencies for the higher level libraries.

The whole API system is like a Russian doll with lower and lower level APIs that can possibly be used to do the sort of things that an astronomical imaging program needs to do.

Nicola is working with a low level API to try to understand its capabilities and, if possible to use it as an SDK for AstroDMx Capture for the Raspberry Pi.

She first was able to stream video from the HQ PiCamera as this screenshot shows

The reason that the stream is monochrome is simply that for initial tests the Y, luminance component of a YUV stream was used.

The next stage was to incorporate the calls to the API into AstroDMx Capture for the Raspberry Pi, to work with a full colour YUV stream, and to begin the implementation of the camera controls in the AstroDMx Capture GUI.

First in monochrome


Then in colour


Although there is a lot of work to be done on the HQ Pi-Camera part of the AstroDMx Capture project, it looks at this moment in time as though the camera will be controllable by AstroDMx Capture for the Raspberry Pi, and we look forward to testing it on astronomical objects and to discovering the limits of the camera

AstroDMx Capture for Windows, macOS or Linux (Including Raspberry Pi) can be downloaded freely here: