Processing photos for inclusion in Stellarium
Chapter 1 Adding Extra Deep Sky Photos tor Stellarium
by Barry Gerdes, 01-03-2014
This document describes how to add photos to Stellaruium.
1.0.1 Preparing a photo for inclusion to the textures.json file.
Fig. 1 Screen shot of nebula images displayed in Stellarium
The first step is to take a photo of the object you wish to display in Stellarium as a screen backdrop. Then when you have the picture you will need align it so that north is directly up and not inverted side to side or up and down as can happen with photos taken with a diagonal mirror in the path. Next you will need to crop the picture, setting the main feature at the centre and making the cropped size a factor of 2n eg. 64, 128, 256, 512 or 1024 pixels square. When cropping make sure you leave at least five prominent background stars
The next step is to process your photo to make the background black,black. This will ensure that your background will meld with the Stellarium background and not be noticed. Suitable programs to do all this are TheGimp (free in keeping with the Stellarium spirit) or Photoshop if you can afford it.
When you have your prepared image you will need to plate solve it using at least 5 known GSC stars that can be identified. That is why the cropping with plenty of stars was necessary. When the plate is solved you will need to find the J2000 coordinates of the corners and convert them to decimal values to form the world coordinates in the textures.json file.
Fig.2 A program to convert Equatorial coordinates into decimal form and write a textures.json insert
The program in the picture can accept the corner coordinates of a texture in your plate solving program into decimal values and write an insert for the textures.json file. It is available as a freebee from http://www.madpc.co.uk/~peterv/astroplover/equipnbits/Stellariumtextures.zip
1.0.2 Plate Solving
Suitable programs that can accept your picture and calculate its corner coordinates are hard to find. I have only found one that suits our purpose and it is another expensive planetarium program, TheSkyX Pro. However the older versions TheSky5 and 6 Pro will also do the job if suitably configured.
These programs have a link feature that can match your photo to the selected area of the screen and superimpose it on the display with a box around your photo provided it can match at least 5 stars from the GSC that is included with the program. When this is fitted you can read the corner coordinates of your texture in the Status bar by selecting them with a mouse. TheSkyX can read these coordinates in J2000 values but the earlier programs only read the coordinates of the current program date. To read the J2000 cordinates it is necessary to re start the program with the date set to 1-1-2000
To add the picture to TheSky() you need first make a mono 8 bit jpg version of the photo and place it on the clipboard. Run TheSky and centre on the object centre. Look in the Tools menu for the image link and select setup. Tick show image frame to put a frame around the image.
Paste the clipboard image on the display and use the zoom and position controls to get it as close to the size and position as possible by visually matching stars. Go to the menu again and click on link wizard. If you have been successful the window will show the number of stars matched and the option to accept or continue. Accept and you will now see all the matched stars have overlaid the picture. You can now read off the corner coordinates from the status bar starting at the bottom (south) left and continuing counter clockwise to the top (north) left.
1.0.3 Processing into a Textures.json Insert
Place your image in the *.png format in the nebula/default folder. Ensure that the name matches the textures.json entry.
Once you have the corner coordinates of your photo you can add them to the decimal converter program and it will write an insert “nebula.json” as a text file that you can paste directly into the textures.json file that is in the nebula/default folder
Save the textures.json file with the new insert and run Stellarium. Select the object in the Object selection window and slew to it. Your image should be there and with a bit of luck it will nicely overlay the stars in the Stellarium program. However this only rarely happens so a little bit of tweaking of the json worldcoords will be needed to get a perfect match. Select the telescope (equatorial mode). This will show the area with north up. Select each corner in sequence and make small changes to the coordinates. Re start Stellarium each time and check if you have moved the right direction. Continue with each corner until all the stars match. With a little bit of practice this will be done in about 10 minutes.