Put the "ImageReg" directory in the package under the starview directory
such that this directory is at the same level as "bin",
"data", and "scripts".
Prepare your own
ppm file of the sketch you want to use e.g. “ImageReg/Images/orion_sketch.ppm”.
Prepare the .aln
file (alignment file) of the image e.g. “ImageReg/orion_sketch.aln”
(the aln has a strict format - please use the above .aln, copy it to your own .aln
file, and modify the "IMAGE").
Start the starview
program by “run” script and under Basic Adjustment -> Log10(m)
tune the scale to about 7.0 to make sure we are at the Earth's
scale to look at the sky.
Open the image
registration panel and then the subpanel
[1. Open Alignment file]
In the "Align File" edit box, type in “ImageReg/orion_sketch.aln”
and click the "Load" button.
Check the "show
image" checkbox or press key '\' to show the image. You may
want to tune down the transparency of the image to better see
through the stars.
In case you are
using your own image (instead of the orion_sketch.aln that we have aligned
already), you will see your own image mapped over orion, which is wrong of
course. Now open the subpanel
[2. Set Correspondence]
You need to pick 3 stars in the star dataset and corresponds them
to the image
(an image/tex coordinate) and the system can then compute a
matrix from texture coordinates to 3D coordinate.
Now, the important
Right click on a
3D star of your choice.
(You wil see the name of the star appears when the star is
selected. You have to make
sure that this star appears in your sketch picture)
click on the "take
star" button in the "set correspondence" subpanel
Repeat this two
more times and take two more stars
selected three stars as the three 3D points in the space. Next, you may
press key "o" or
check the "show image overlay" checkbox to bring up your picture
on screen. In the
image overlay, you will see three green dots with numbers "1", "2",
and "3" above the
dots. These dots corresponds to the three stars your selected.
Drag the dots to
the corresponding stars over the image overlay to match the stars on
your sketch image.
You will see the 3D image starting to match the 3D stars accordingly.
Note: you may drag
the edge/corner of the image overlay to make it bigger.
To fine tune the
matching, you may use the texcoord spinners below the "take star" buttons.
After you are
satisfied with the alignment, you may export the .aln file (e.g.
orion_sketch.aln) and you will see that your .aln is updated. And inside the .aln
file, you will find a matrix that transforms the 2D texture coordinate to the
corresponding 3D position for you to put in your picture in 3D.
As I know, even
using the fine tuning in (13), you may not get the stars aligned well. Because
the three stars you selected are too close to each other in the image and a
small change in their tex.coord. will cause a big difference in the overall
transformation. You can pick another star, which is further away to the edge of
your sketch and do (12) and (13) again for that star. Repeat until you are
satisfied and export the .aln file.