Tuesday 30 January 2018

Raspberry Pi cameras for Lunar imaging

The raspberry Pi Zero camera module can be mounted in the Pi case. The lens is unscrewed and a Mogg adapter attached to the Pi case. This means that the Pi Zero is both computer and camera.



The Pi-computer-camera running Rasbian Linux was placed at the Newtonian focus of an f/5, 130mm Newtonian and a neutral density filter was attached to the adapter.



Python software was written to display and capture bmp images



Two overlapping sets of 50 bmp images were captured and then stacked, with flatfield correction in lxnstack. They were processed and combined into a 2 pane mosaic of the terminator.


In a separate experiment, a Raspberry Pi 3 running Ubuntu MATE Linux was used with a remounted camera module which was attached to the 130mm Newtonian and a neutral density filter was attached to the adapter.

Using the Python capture software, sets of 150 bmp images were captured of different regions of the Moon. The sets were aligned and stacked with flatfield correction using lxnstack.



Both Pi cameras suffer from Pixel vignetting and they have inbuilt chief ray angle correction. With the lenses intended for these cameras, the chief rays pass at right angles to the pixel in the middle of the sensor, but at more oblique angles and produce lower levels of illumination further away from the middle of the sensor. Moreover, there are chrominance as well as luminance effects at different places on the sensor. The inbuilt chief ray correction in the camera compensates for the expected pixel vignetting.  However, if the small lens is removed from the camera and  the sensor is placed at the focus of a telescope, there is no need for the inbuilt chief ray correction. But, the correction is still made.
The result of this inbuilt correction is that the centre of the image is dimmed slightly and the outer regions of the image are increased in brightness.
This problem is corrected by flatfield correction. Classical vignetting is corrected by flatfield correction. The auto-corrected pixel vignetting produces an effect opposite to classical vignetting as the two following images show.
Classical vignetting
The centre of a classically vignetted image is brighter than the edges of the image and this is what a flat field image would look like.

Flat field from an auto corrected pixel vignetted sensor of a Raspberry Pi camera
The centre of this flat field image is darker than the outer regions. This is opposite to classical vignetting.

Nevertheless, unsurprisingly, the flatfield can correct the telescopic images captured from the Pi cameras as shown by the following animation:
Alternating flatfield corrected and uncorrected images using the same data captured from the Raspberry Pi camera. Unsaturated images were captured in order to avoid the chrominance effects of the chief ray correction, making the camera effectively monochrome.



The problem of auto corrected pixel vignetting seems to be a problem of other webcams with very small, but high resolution sensors. Future experiments will involve using only luminance data and flatfields from these devices to see if they can be useful imagers.

Saturday 6 January 2018

Histograms, AstroDMx Capture for Linux and The Orion Nebula

A ZWO ASI120MC camera was placed at the Newtonian focus of an f/5, Skywatcher Explorer 130 P-DS OTA Newtonian mounted on a Celestron AVX, EQ, GOTO mount. 100 x 15s exposures of the Orion nebula were captured with AstroDMx Capture Linux running on a Fedora laptop. 25 matching dark frames were also captured.

The imaging setup


The images were registered, stacked and dark frame corrected in lxnstack, a native Linux application. The final image was processed in the Gimp 2.9.
Nicola has now implemented histograms in the software, some of which can be seen in the live preview screenshots below.
Screenshot showing a linear, averaged RGB histogram


Screenshot showing a logarithmic, averaged RGB histogram


The histograms can also show computed luminance, R, G and B channels as well as the RGB channels together.
Final image of M42/43


Box-mounted Raspberry Pi camera module, a Skymax 127 and Tycho

A Waveshare 5Mp Raspberry Pi camera module with a OV5647 CMOS sensor was mounted in a project box and a connector was used to connect the short ribbon cable from the camera, to a 1m ribbon cable from the Raspberry Pi 3 running Ubunto MATE Linux.

Box-mounter PiCamera


The camera was placed at the prime focus of a Skymax 127 Maksutov mounted on an EQ mount.

Using Python 3 software that I have written to capture .bmp images, I captured 100 .bmp images at 1024 x 768 resolution, of the Tycho region of the Moon. The images were registered and stacked in the Linux application lxnstack. The resulting image was wavelet processed in Registax 6 running in Wine via Exagear, and post processed in the Gimp, all on the Raspberry Pi. The wavelet processing was the only part of the process that ran slowly.

The Tycho region