From: Rune Allnor on
Hi all.

The past few days the moon has been unusually visible (that is,
visible for an unusally long consecutive time), so that the change
in phase is clearly visible over the course of a few hours.

The idea occured to me that it ought to be possible to take a number
of images of the moon, with a few hours interval, and assemble some
sort of animation of the lunar cycle from these images.

For this to work, one would need to align the individual images
to some reference image frame. My telescope is of the 'terrestial'
type, which means the tripod is oriented with respect to the horizon,
not the earth's axis of rotation, which causes all kinds of alignment
problems. Since such a sequence of images by necessity must be
taken over the course of considerable time (at least hours and days,
preferably weeks, probably months and years), one can not rely on
fixed references or constant system settings.

So there will be a considerable amount of fiddling required
to align the images.

What I have in mind is something like:

1) Take the image
2) Adjust brightness
3) Apply a Canny edge detector
4) Use the edge image to find translation/scale/rotation parameters
relative to an overall reference frame
5) Scale/rotate/translate original image according to parameters
from step 4)
6) Crop/resample the original image to a reference resolution
7) Insert into to existing sequence of images
8) (Re)generate animation

The difficult steps here are items 4) and 5), first finding scale and
rotation parameters and then scaling and rotating each individual
image reative to the reference.

Do anyone know how to do these kinds of things? I do *not* have
access to any image processing software packages. Since there
are less than 40 clear-weather winter nights per year and the moon
is below the horizon in summer, most of the fun of this project would
be to implement the algorithms...

Rune
From: ImageAnalyst on
Rune:
I've uploaded an animated gif of the moon's lunation (what you
described) to http://drop.io/lunation#
(It's an animated gif - you'll need to download it for it to "play.")
It's very cool. You'll see the size change and the wobble in addition
to the shadow moving.

There is also a lower quality YouTube movie of lunation at
http://www.youtube.com/watch?v=COfoBAwRPHk
I'm sure they used an algorithm like you described.

I suppose that if the moon goes from full to full in 28 days and full
to new in 14 days then the shadowline moves across the face of the
moon in 14 days and would move 1/(14*2) of the distance across the
moon in a 12 hour period so perhaps you might notice the shadow move
in a single night (or day). Might I suggest moving to Tucson, Arizona
or the big island of Hawaii for finishing your experiment? They'll
have warmer, clearer weather and they're both very nice places to
visit or live. Tucson, especially, has a huge optics and astronomy
community.

Maybe a web search for "lunation math equations" might turn up some
algorithms, or try sci.astro newsgroup, or try someone at the
University of Arizona's astronomy department (http://
www.as.arizona.edu/).
From: dbd on
On Dec 26, 7:57 am, Rune Allnor <all...(a)tele.ntnu.no> wrote:
> Hi all.
>
> ...
> The idea occured to me that it ought to be possible to take a number
> of images of the moon, with a few hours interval, and assemble some
> sort of animation of the lunar cycle from these images.
> ...

>
> Do anyone know how to do these kinds of things? I do *not* have
> access to any image processing software packages. Since there
> are less than 40 clear-weather winter nights per year and the moon
> is below the horizon in summer, most of the fun of this project would
> be to implement the algorithms...
>
> Rune

Modern panorama stitching software can be used to perform most of the
required operations. Output is usually available in the form of
multilayered unblended formats that could be reassembled as
animations. The stitching software would generate control points,
scale, rotate, lens correct, align and resample the images. Output is
available in unblended multilayer formats

I know how I would accomplish this with the tool I have used to stitch
a few thousand panoramas: PTGui, but this is a commercial product. I
believe the same capabilities can be found in freeware products.
Examples include:

Stitching
Hugin
http://hugin.sourceforge.net/
Panorama Tools
http://www.all-in-one.ee/~dersch/

Editors
http://www.irfanview.com/
http://www.gimp.org/

Of course, this wouldn't allow you to be as hands-on with the
algorithms. On the other hand, the stitchers above are open source and
could be used as a source of algorithms.

Dale B. Dalrymple
http://dbdimages.com
From: Vladimir Vassilevsky on


Rune Allnor wrote:


> The idea occured to me that it ought to be possible to take a number
> of images of the moon, with a few hours interval, and assemble some
> sort of animation of the lunar cycle from these images.
>
> For this to work, one would need to align the individual images
> to some reference image frame.

You realize, of course, that digital image fiddling will result in the
loss of resolution and probably some artifacts as well. Wouldn't it be
better to modify the scope?

> Do anyone know how to do these kinds of things? I do *not* have
> access to any image processing software packages.

С++ compliler is all that required :-)

VLV

From: Rune Allnor on
On 27 Des, 08:42, Vladimir Vassilevsky <nos...(a)nowhere.com> wrote:
> Rune Allnor wrote:
> > The idea occured to me that it ought to be possible to take a number
> > of images of the moon, with a few hours interval, and assemble some
> > sort of animation of the lunar cycle from these images.
>
> > For this to work, one would need to align the individual images
> > to some reference image frame.
>
> You realize, of course, that digital image fiddling will result in the
> loss of resolution and probably some artifacts as well. Wouldn't it be
> better to modify the scope?

It would probably be better what the end result is concerned,
but it is not practical. The scope & camera combo I am using
is a terrestial scope + hand-held compact camera, so the
images are not exactly top-notch. I am observing from urban'ish
areas at high lattitudes, so there is a lot of convecting
atmosphere, due to heat over houses, messing things up at the
time of year when observing is possible. On the other hand,
I am playing with a 8-10 MPix camera, so some degradation
might be allowed without results turning totally disastrous. .

Again, this is as much a DSP/Image processing project as an
astronomy project.

> > Do anyone know how to do these kinds of things? I do *not* have
> > access to any image processing software packages.
>
> С++ compliler is all that required :-)

Got that one. An the Boost.GIL image facilities framework.
A free Adobe library, apparently written by the guys who
wrote Photoshop, that contains most of the basics for
handling images, but without the nifty processing algorithms.

Rune