Are we alone? Impossible. Whenever I point my telescope to the Virgo-Cluster this is the first thing which comes to my mind. Tonight I tuned in the Interstellar soundtrack on youtube 🙂 When the first frame came in I was getting a strange feeling which was somewhere between happiness, admiration, worriedness, abjection and fear and a cold shiver ran down my back.
Continue reading →Night sky image processing – Part 2: Image binarization using the Otsu thresholding algorithm

This article is about image binarization using the Otsu method. A simple C++ implementation of the Otsu thresholding algorithm based on the CImg library is shown. In Part 1 of my “Night sky image processing” series I have taken a look on anisotropic diffusion in order to reduce the image noise.
Introduction to Thresholding
The next topic I want to have a look at is thresholding. In this step the algorithm decides which pixels belong to the background and which pixels belong to a star. However, before the algorithm can decide which pixels belong to a particular star (also called clustering – see part 3) it first has to generally decide which pixels belongs to any star and which pixels belong to the background. This process is called thresholding i.e. converting a grey-scale image into a binary image. There are many different thresholding algorithms out there. All have there advantages and drawbacks. I found ImageJ very helpful to test different thresholding algorithms.
Why Otsu Thresholding for astro images
After trying different ones I found that Otsu’s method does a quite good job. After further reading I found out that this method is especially useful for images with bi-modal histograms. To my knowledge night shy images usually do not have bi-modal histograms. However, so far Otsu’s method still gave very good results with my star images. Furthermore it is relatively efficient and simple to implement. For those reasons I decided to go this way.
Introduction to Otsu Thresholding
Otsu’s algorithm tries to find the threshold so that the variance of all pixel values in the foreground and the variance of all pixel values in the background becomes minimal. The variance is a measure of the spread. The smaller the variance of for example the foreground pixel values, the closer the gray levels of the pixels and the more likely it is that they belong together. At least that’s how I understand Otsu’s method.
The following formula calculates a kind of “mean” variance $\sigma^2_{within}(th)$ of the foreground variance $\sigma^2_{fg}(th)$ and the background variance $\sigma^2_{bg}(th)$. In fact it is no mean but a weighted sum of both. The weights are the number of pixels in the respective group:
$$\sigma^2_{within}(th)=\sigma^2_{fg}(th) \sum\limits_{i=0}^{th-1} {num(i)} + \sigma^2_{bg}(th) \sum\limits_{i=th}^{N-1} {num(i)}$$
Continue reading →Night sky image processing – Part 1: Noise reduction using anisotropic diffusion with C++

For some time now I am looking into the field of night sky image processing. It is a huge topic and there are already a lot of different approaches and solutions to many of the existing problems. I have collected many star images over the time. To me it is very interesting to try different algorithms with my own data. This article starts with a problem every night sky photographer and astronomer is aware of: noise. I did some research and came across “anisotropic diffusion”.
What is anisotropic diffusion?
In short, anisotropic diffusion is a non-linear and space-variant transformation i.e. the transformation depends on the image content. The effect is that the resulting images preserve linear structures while at the same time smoothing is made along these structures. Additional information on anisotropic diffusion is available for example on wikipedia and here. Furthermore I found this youtube explanation quite helpful.
Continue reading →Imaging galaxies M81 and M82 from Böblingen / Germany
Messier 81 (M81) is a spiral galaxy about 12 million Lj. away from earth. Messier 82 (M82) – also known as Cigar Galaxy – is a starburst galaxy which is interestingly also about 12 million ly. away from us. Both objects are located in constellation Ursa Major.
For this picture 11 light frames (600s exposure time each) were averaged. This is twice as much as the typical frame count I usually have. Therefore, there is almost no visible noise in the the final picture.
The full size image can be found here.
Clear skies!
![]() | Date | 2015/02/18 |
![]() | Location | Böblingen / Germany |
![]() | Object | Bode's Galaxy (M81) & Cigar Galaxy (M82) |
![]() | Camera | Atik383L+ |
![]() | Guiding | yes, QHY5-II Mono via OAG |
![]() | Telescope | 8" GSO Newtonian |
![]() | Barlow lens | none |
![]() | Mount | EQ6Syntrek |
![]() | Cooling | -15°C |
![]() | Luminance | 11x, 600s, bin: 1x1 |
![]() | Red | 9x, 150s, bin: 2x2 |
![]() | Green | 9x, 150s, bin: 2x2 |
![]() | Blue | 9x, 150s, bin: 2x2 |
![]() | Dark | 10x |
![]() | Flat | 10x |
![]() | Total exposure | ~2h57min. |
Imaging the Whirlpool Galaxy (M51)
Today, after a long long cycling tour the weather forecast made me smile 🙂 There was a good chance that most of the clouds will go away between 23:00 and 2:00. Since the moon is going to rise at 2:11am there is a short but sufficient window to do some CCD imaging. Since I only have free view to the south from home, the position of M51 is a quite good compromise. The seeing with my f/5 GSO Newton (F=1000mm) is around 2.7″ – so this is more or less average.
![]() | Date | 2015/05/10 |
![]() | Location | Böblingen / Germany |
![]() | Object | Whirlpool Galaxy (M51) |
![]() | Camera | Atik383L+ |
![]() | Guiding | yes, QHY5-II Mono via OAG |
![]() | Telescope | 8 |
![]() | Barlow lens | none |
![]() | Mount | EQ6Syntrek |
![]() | Cooling | -15°C |
![]() | Luminance | 6x, 600s, bin: 1x1 |
![]() | Red | 5x, 150s, bin: 2x2 |
![]() | Green | 5x, 150s, bin: 2x2 |
![]() | Blue | 5x, 150s, bin: 2x2 |
![]() | Dark | 5x |
![]() | Flat | 10x |
![]() | Total exposure | ~1h40min. |
Clear skies!
Last updated: June 17, 2022 at 14:20 pm















































