Manual for stellarium – input own image into stellarium




Дата канвертавання27.04.2016
Памер26.4 Kb.
Manual for stellarium – input own image into stellarium
Programs needed; Auto stitch (demo), Gimp (free) and Microsoft paint

Where to download:



  • Gimp - http://www.gimp.org/windows/

  • Auto stitch - http://people.cs.ubc.ca/~mbrown/autostitch/autostitch.zip

  • Microsoft paint – Located already within start menu -> all programs -> accessories -> paint


Part 1 – Capturing the landscape
First you need to make your panoramic picture. Some cameras have the function of taking panoramic pictures. In this example we will be using a normal camera without the panoramic function.

There are 2 different ways to make a panoramic picture using a normal average camera. The first and normal way to make the panoramic picture is stand at the centre of your landscape and take pictures of the 360 degree angle, making sure you overlap each picture. The more you overlap the more detail and less errors there will be in the final picture. The amount of pictures needed depends on the quality of pictures your camera takes. If you have a low quality camera then you should ideally take more photos to patch up any glitches and increase quality of the panoramic picture. If you have a higher quality camera you should take more pictures as higher quality cameras has less blur and inequalities of light and background equivalence. The ideal amount of pictures you should take is between 30 and 40.

The second way is to take a video of your site. To do this you need to be steady and slow. You need to take a video of the whole 360 degree angle of the site from the centre, being careful not to go too fast and not to change the plane of sight. The video has to be at a steady height and at a slow pace. The reason behind this is due to the fact that if you move too fast then the video will be blurry and you can not extract the frames from the video due to quality of the frames. The reason for a constant plane of sight is so that you can have a steady and equal panoramic image, otherwise the image will not work as well.

Take a sample area of the ground; this will be the stellarium ground as well.


It is very important that you make angle notations of noticeable points of interest, for example, a big distinct tree. This will allow you to calibrate the azimuth later on in stellarium. Make note of the difference between magnetic north and true north
Part 2 – Panoramic picture
When extracting the video you need to print screen the video and paste it into paint, you then save the image as “1” in the jpeg format


You then take as many print screens to make a panoramic image, make sure the pictures overlap, this increases the chances that the background horizons will match and overlap instead of being uneven. The more print screens you take the high quality the panoramic picture is, if the video on screen is too small you could also lose resolution, so make sure your video is at 100%. Depending on the quality of the video and megapixels, less or more pictures will be taken.

You then save all the images in a single folder to make things convenient.

Download and open the auto stitch program, first you want to change the settings, click on Edit followed by options. A window should now pop up you want to change the “scale” and “JPEG quality” both to 100. This increases the quality of the panoramic picture when auto stitch stitches the images together.

You then want to click on file and open, find your folder and highlight all images present, click open. The image should stitch itself. Your panoramic picture is now ready, and should be saved in the same folder as your other pictures as “pano”.

The other method of just taking pictures is simpler; just take the pictures at the chosen site, roughly 40-50 pictures depending on your camera picture quality.

*If the images are NOT jpeg you can change them, open them in paint, save as, and change to jpeg and rename to 1 etc.


Copy the same steps as before, auto stitch the images to make your panoramic view.

The reason we will be using gimp is so that we can delete the background sky, the reason we will be deleting the atmosphere is because stellarium will automatically add the stars and constellations. Our background within the image is useless as it only shows the position of the sun one point in time. We need to delete it so that we can view other astronomical activities partaking within the site.


First install the gimp program and open gimp when it’s finished installing, the shortcut should be located on the desktop icons, the icon is a dog with a paintbrush on his mouth.

File -> open -> find your “pano” picture and open the picture onto gimp. Alternatively you can right click the pano picture after installing gimp and “open with” gimp. The program should take a short while to load.

Once it has loaded and the image is on the canvas you can start with the editing.

First of all understand that the picture has to have an “alpha channel” and in the format of “.png. The reason behind the formats is that it keeps the alpha channel. The alpha channel allows the pictures to maintain a transparent background so that it can be fitted in with another background, like glass. If the image is in another format, the alpha channel will be lost and the deleted spaces will be turned white automatically.

The reason we want an alpha channel is so that stellarium can fit its own background into our image so that the constellations can be seen as well as the rising and setting of the sun, moon and stars.
Firstly you want to click on layer -> transparency -> add alpha channel.

This automatically puts an alpha channel on the background.



An important note is that gimp adds images in layers, so at the moment it’s the background later, the alpha channel which is checked patterned black and grey, on top of the alpha channel is your panoramic image.




Next you have to use the “magic wand tool” located on the left toolbar (looks like a wand), using this you can select certain areas depending on the colour. In this case we do not want the sky, so we select the sky and press the delete key on your keyboard you can also increase the threshold located at the bottom of the toolbar when selected magic wand to increase the amount of details the magic wand selects, e.g. if the threshold was on 1 then it only takes 1 (very) specific shade of colour whereas if it was on maximum then it would take the whole picture. Experiment with different thresholds to get just the sky off the pano image.




You should also delete all the sky parts between the trees or buildings if present.

This just leaves you with the outline of the site that you took a picture of and the sky as an alpha background.

The bottom of your image should be wavy; you need to delete the bottom of the image so that it’s a straight line. Select the whole image by pressing “ctrl and a” then selecting the move tool and drag the image down so that the ground is now. You should have something like this now.

Remember to save now and again
Part 3 – separating the images equally
Now you need to divide the image into different sections, each section has the dimensions of the power of 2, so 64, 128, 256, 512, 1024, 2048 and 4096. For example 1024 by 512 or 1024 by 2048, take note that the image should be landscape not portrait.


Landscape

*Each image has to be the same size, you cant have .


First create a new canvas, press “ctrl and n” this opens a new window in which you can make your new canvas and choose the height and width of your selected size. After you have the new canvas you can put the alpha layer on again, select all by pressing ctrl and a, then press delete. You should just have a blank alpha channel on your new canvas now; go back to your other image.

To choose your size, you should round it higher or lower to the nearest power of 2, so if you have 2000 you should round it to 2048 etc.

You can then decide how many sections you want, recommended minimum 2 sections and max 8.

Use the rectangle cutting tool located on the left toolbar. Draw out a rectangle starting from left to right, at the bottom left it says how big the rectangle you currently have.




Size of rectangle
Change the rectangle to your chosen size then press ctrl x, this cuts the image, go to the blank canvas then press “ctrl + v”, this pastes the image.

The image should be in the middle of the canvas, drag the image to the bottom and save the image as whatever your site is called and 1 e.g. barbook1 and save it in the format “png” so save the name as “barbrook1.png” this automatically changes the format to png.

Do the same for the rest of the images changing the name of the image numbers.

After you finished, close gimp, remember NOT to save the changes to the original pano picture, you will need it later.

You should now have 2-8 saved pictures in the format of png, all the same height and width.

Now, using the picture of the ground you took before, resize the image to dimensions of a power of 2 also. I used 512 x 512.

Make a new folder and name it the name of your site in lowercase

Place all the images into the folder


Part 4 – scripting
Go to my computer -> C: / -> program files -> stellarium -> landscapes

This should have all the files and folders of the current landscapes in stellarium

Go into a folder that is most like your landscape, e.g. if you have 2-6 PNG pictures and your pictures are most like guereins in terms of vertical and farness of your landscape then go into the guereins folder. If you have a single PNG picture of your panoramic view, then choose mars. Go into the folder and copy the WordPad/notepad file called “landscape” or “landscape.ini”.

Once you have copied the file paste it into your folder that you made.

*Important note: the document is a script, not a normal file, so be careful in what you delete, only delete the name, nothing else.

First, you want to right click the file and choose “open with” which should lead to a drop down menu and choose notepad.


You want to change the details of the script.



  1. Change the name of the location highlighted in red, change the name from guereins to your landscape name.

  2. Change the author name. highlighted in yellow

  3. Change the description highlighted in green, so delete the description only, and write a brief description of your landscape

  4. Change the “nbsidetex” highlighted blue which means how many pictures you have, which is how many PNG pictures you have (not including background)

  5. Change the names of the PNG, highlighted in violet, you want to change the names only, you can keep the “.png”. If there are extra just delete them.

  6. Changes the “NBside”, NBside are the sides of your landscape, i.e. the pictures. So you want to delete all the extra ones and rename the numbers of the sides (figure x)

  7. change the “groundtex” from “guereinsb” to “background” leave the .png

  8. Change the “décor angle rotatez” – to calculate the décor angle rotatez, first you want to open your original panoramic picture. Using the equation “270+b-360*(x/X)”, where b is the angle point of interest *note: mention point of interest at the beginning* x is the distance (on the pano picture, open on gimp.) between the left and the point of interest and X is the width of the whole pano picture



  1. Lastly change the latitude, longitude and altitude.

To check you have done this right. “Save as” the script as landscape2.ini.

Reopen the new script you made in notepad, if your script looks like this


*If your notepad looks like this then you’ve done it right





*If your picture looks like this you’ve done it wrong, the reason behind this is most probably because you deleted something you was not suppose to.

If you have done this right, copy the folder containing your pictures and your script and paste it into the landscapes folder along with the other landscape folders and open the stellarium program.



Go to the left hand side toolbar and select “sky and viewing options window”, which should open up and window. Click on the landscape tab and find your own landscape.


Landscape


База данных защищена авторским правом ©shkola.of.by 2016
звярнуцца да адміністрацыі

    Галоўная старонка