I have data for a full sky astronomical catalog which is comprised or
a large number of 256x256 jpeg images.
There is about 50 gig of data in total, at multiple resolutions.
I don't want to make a panorama, but I do want to modify the image
tiles so that blend together more smoothly than they currently do.
Can hugin and/or related tools help with this?
Many thanks,
Matthew Gates
No need. They are already fit together nicely. What I'm after is the
blending of edges.
> Do you have stellarium?
>
> http://www.stellarium.org
Yes, I'm a developer on the project :-). The images in question make
up part of a full sky survey which we are trying to add to the
program. The problem is that there are visible edged between tiles:
http://porpoisehead.net/images/dss_blend_needed.jpg
This image shows some of the Northern hemisphere with tiles we have
imported so far. These are only the lowest resolution tiles... as one
zooms in, higher resolution tiles are loaded (several per visible tile
at this lowest resolution. This is somehow similar to how projects
like OpenStreetMap have multires image sets).
If you want to try it out, check out an build the toastImages branch
from launchpad.net.
So many I could have been clearer: I want to feed in pre-distorted
images and get them out with only the color and brightness blending
done.
Thanks
Matthew
:) Thanks.
>> http://porpoisehead.net/images/dss_blend_needed.jpg
>
> Okay, I see now. What sort of distortion is that?
It's a bit complicated, and I don't have all the details, so this
description might need to be amended if we need to probe into it in
more detail.
The DSS tiles are split from large, high resolution photographic
plates which are themselves subject to distortions due to the optical
properties of the telescope used. I can find a detailed description
of the distortion if necessary. It's not a standard barrel distortion
though.
We chop these plate images into slightly overlapping tiles, run them
though some programs which remove the plate specific distortion
preparing them for the toast projection method:
http://www.worldwidetelescope.org/docs/worldwidetelescopeprojectionreference.html
Stellarium reads these tiles, knows about the toast projection and
translates this into sky coordinates "unwrapping" the tiles onto the
sky. Stellarium itself can project the curved sky onto the screen
with multiple methods, but this is not important for processing the
images.
> It looks like the
> tiles were brighter towards one corner, with some colour variation
> from blue to reddish thrown in. Hugin's notion of brightness
> variations are that they are a function of radial distance from a
> point, so it can deal with vignetting, but the data at hand look like
> as if there's maybe also a gradient on them, which hugin couldn't deal
> with. Mind you, if it can be conceived of as vignetting, it should be
> possible, and it doesn't matter if the vignetting is off-center. As
> far as the chromatic variations are concerned, I'm more pessimistic.
There are many factors here. Vignetting is probably a large part of
it. Individual tiles may come from close to or far from the optical
axis of the telescope which was used to create them, so if it's
possible to have the center of the vignetting compensation be far
outside of an individual image, that might work well. The exact way
the vignetting affects the image is probably not quite the same as
with normal camera lenses, but I dare say it is well documented and
details can be found if necessary.
The original plates were taken over a long period of time, so there
will be plate-to-plate variations which are much harder to compensate
for - atmospheric conditions when an individual plate was exposed such
as dust and water vapor in the atmosphere, altitude angle and so on,
scattering of light from bright objects such as the moon and planets
and so on.
>> This image shows some of the Northern hemisphere with tiles we have
>> imported so far. These are only the lowest resolution tiles... as one
>> zooms in, higher resolution tiles are loaded (several per visible tile
>> at this lowest resolution. This is somehow similar to how projects
>> like OpenStreetMap have multires image sets).
>
> ... or Microsoft's HD View.
>
> Are the images in a place where one could access them, to have a more
> in-depth view - and also at the metadata to see how feasible it would
> be to take them in en masse and run them through some batch job? If I
> could get my hands on some of them, I'd gladly see what I can do to
> help you.
The images can be downloaded, but it's hard to know which ones are
adjacent at a given resolution. I will try to research this.
Matthew
That should be possible Creation of the tiles is long and intensive
process, but if we can do it once, we can do it again. I agree that
it makes sense to do the blending first, then chop up the tiles.
> Do you have access to them at that stage? I am only guessing,
Well, we have tarballs with the original plate jpegs split into small
chunks. That's how the data arrived to us after some processing by
another The tarballs contain sub-directories x1 x2 x4 etc. x1 is
the highest res. Don't worry about the rest of the directories, they
are just lower resolution version of the same data.
In x1 you will find the DSS plate split into tiles (64 x 64 = 4096
jpeg files at resolution of 300x300 each - if you were to recombine
them into the DSS plate, it would be a single 19200x19200 image).
There is also one meta-data file per jpg file. The exact contents and
format I am not familiar with, but I can find out.
An example DSS plate .tgz cab be found here:
http://porpoisehead.net/misc/S357.tgz (13 meg)
There are many of these files 1792 of these files - the one above is
the smallest. Total size ~65 gig! I love me some hefty data. :D
> but my feeling is that the image processing needed to make them
> blendable nicely could be done without having to take into account
> every small detail - it might suffice to define the procedure needed
> at a low resolution and then just let it trickle down to higher
> resolutions.
> If you were to try to model the vignetting on lots of small tiles,
> trying to undo an effect at the source image level, you introduce much
> more potential error than working on the source images straight away.
> But you may get away with figuring out the vignetting and mabe other
> problems in the source images by looking at lo-res versions of them
> and still come up with parameters suitable to treat them down to the
> highest resolution.
The x64 directories in the .tgz files might be useful here, as they
are full-plate at low res. We could maybe extract these, experiment
with blending and even stitch them together into a panorama to check
it. 1792 300x300 tiles isn't so bad.
I can do the extraction of this data on the server and create a single
archive file which should be a manageable size.
Am 16.12.2010 18:49, schrieb Matthew Gates:
> An example DSS plate .tgz cab be found here:
>
> http://porpoisehead.net/misc/S357.tgz (13 meg)
>
> There are many of these files 1792 of these files - the one above is
> the smallest. Total size ~65 gig! I love me some hefty data. :D
Is there a summary of the "production" process for you data? I assume
the following:
1. You got the tiled DSS plate files from some observatory.
2. You have some software to reproject the tiles into TOAST.
If you want to try the hugin vignetting correction, one needs to know
corresponding pixels between the overlapping plates. There are two
possibilities:
1. Add support for the input image (plate) format to hugin, and write a
script that creates a PTO file from the metadata in the plate files.
Then the standard workfow could be used (on the x64 images). The
corresponding parameters could then be used for radiometric correction
of the individal plates. If we add the toast projection, to panotools,
it would be possible to directly output toast, otherwise its possible to
produce corrected plate images.
2. Keep all the geometry stuff outside hugin and produce a input file
for hugins vig_optimize tool with corresponding pixels within your
software. This should be a simple text file with the following format:
img1_nr img2_nr x1 y1 x2 y2 r1 g1 b1 r2 g2 b2 0 radius_1 radius_2 0
where r,g,b are the respective RGB values and radius is the distance
from the center, divided by the distance to the edge (if I remember
correctly). Together with a fake pto file, this could be feed into
vig_optimize to determine the correction parameters.
Looking at http://porpoisehead.net/images/dss_blend_needed.jpg
I'm a bit sceptical how well it might work with hugins vignetting
correction though. Do you know if the position of the plate in the
telescopes focal plane is available in the metadata? Do you have a
document describing the metadata?
> The x64 directories in the .tgz files might be useful here, as they
> are full-plate at low res. We could maybe extract these, experiment
> with blending and even stitch them together into a panorama to check
> it. 1792 300x300 tiles isn't so bad.
>
> I can do the extraction of this data on the server and create a single
> archive file which should be a manageable size.
For a first experiment, a smaller subset of the mosaic would be
sufficient, maybe a 5x5 grid. For this test, the alignment could be done
in hugin to avoid the steps I have mentioned before. The full data will
be a real challange, even when using the tiny images.
The full mosaic would be much simpler, if we had a "reference image"
that covers the whole mosaic. It only needs to contain the "background"
brightness, not all the stars etc. This would make the "vignetting"
correction much simpler and probably yield a nicer result.
ciao
Pablo
I hope Fabien will join in the conversation here. He's been dealing
with the processing of these images into the toast projection and so
is much more familiar with this stuff than me.
>> The x64 directories in the .tgz files might be useful here, as they
>> are full-plate at low res. We could maybe extract these, experiment
>> with blending and even stitch them together into a panorama to check
>> it. 1792 300x300 tiles isn't so bad.
>>
>> I can do the extraction of this data on the server and create a single
>> archive file which should be a manageable size.
>
> Sounds very good; I fully agree, hope to see the data soon!
Here's a tarball with the x64 images and their associated meta-data files:
http://porpoisehead.net/misc/dss_low.tar.gz (~11 meg)
I'm assuming the N??? ones are for the Northern hemisphere and the
S??? files are for the Southern hemisphere, but this should become
apparent from the metadata analysis.
Matthew