All Sky Camera

An all-sky camera helps to verify local weather conditions and enables the creation of nice timelapse videos. I still had a Basler Ace 640 sitting on the shelf and a small lens that provides a wide field of view. As the Pylon software is supported on Linux, the idea grew to build an all-sky camera using the Raspberry Pi and the Basler Ace. The Basler only has a pixel area of 640x480 pixels, tiny compared to current chips and therefore not suitable for high resolution timelapse videos. It is however sufficient for the application in mind, checking current weather conditions at the observatory. The advantage of the Basler Ace is that only a single cable is needed to both power the camera and transmit data. The components are easy to come by. An old tripod, some PVC piping and a small glass window of a photo frame glued to the PVC using silicone. The Basler was never made for long exposure photography and only supports exposures as long as 1 second. On top of that, the camera becomes really hot. It can easily get 50°C when constantly in use. This meant that some tinkering was needed as the hot camera produces lots of hot pixels.

The images are captured using a Raspberry Pi 3. I tried using my old Pi2 first, but the image processing needed was eating too much CPU. The Pi3 is about twice as fast as its predecessor and can easily handle the load. Using a C++ program, the Pylon SDK is called to acquire 10 images of 1 second. Next, OpenCV isused to stack the images. Since there are a lot of hot pixels, a dark frame needs to be subtracted. However the outside temperature is constantly fluctuating, so having a fixed dark frame will not work. To counter this problem, the frame is copied and a 3x3 median filter is applied that gets rid of hot pixels. This median frame is then sutracted from the original frame, leaving a dark map. Next the dark map is subtracted from the original frame, leaving a cleaned up frame. The cleaned frames are averaged and written to disc and the website.

Every hour a shell script will create a movie that is copied to this website. Movies run from 2PM to 2PM.


Below some completed movies of clear nights while the observatory is in use.