fivemack: (Default)
[personal profile] fivemack






A two-step process here. The glare from the street-lights is fairly smooth whilst stars are fairly point-like, so in particular, if you take a square out of the image and line up the pixels in it by brightness, the middle one (the median) will almost certainly not correspond to a star, and will be probably a good estimate of how bright the street-light glare is for that square. So if for every pixel you consider the square around it, find that median brightness and subtract it, you've basically cut out the glare. Note from the image above that this treatment makes anything which isn't smooth glare with pointlike stars in it look Very Strange Indeed.

If you just apply the de-glaring process, the next problem is that bright stars look just the same size as faint stars; if you increase the overall brightness of the image so that the faint stars are visible, all stars above a certain brightness look like small white spots, and you can no longer see the constellations outlined by their brightest members.

To fix that, I've blurred the image, so that bright stars turn into large reasonably-bright blobs and faint stars vanish, and added the blurred version to the original to restore the faint stars. The result's pretty garish, but representative in three ways: bright stars are visibly prominent, the colours of the bright stars are about right, and (checking against an online star atlas) the faintest stars you can see in the image are pretty much the faintest stars that you could see with the naked eye were the town around Castle Hill to be replaced by unilluminated desert.

Here is the C++ code (requires libtiff, and I think I'm missing some important attribute so you have to do some no-effect transformation like mogrify -modulate 100 output.tiff to turn the TIFF file into one that the hugin panorama-making software can read).

Of course, once you have the data in a panorama program, there are various things you can do with it:




Date: 2009-01-26 09:13 pm (UTC)
ext_3375: Banded Tussock (Default)
From: [identity profile] hairyears.livejournal.com
Not bad... Have you tried the iPhone star atlas?

Date: 2009-01-27 12:01 pm (UTC)
From: [identity profile] fivemack.livejournal.com
Which of the seven at http://physics.weber.edu/schroeder/iPhoneStarApps/ do you recommend?

I can imagine a small logistic problem with the iPhone star atlas at this time of year, which is that the touchscreen doesn't work if I'm wearing thick gloves, and my fingers rapidly stop working very well if I take off the thick gloves. Adjusting the controls on a DSLR while wearing thick gloves isn't optimal, but is definitely possible.

Date: 2009-01-27 03:00 pm (UTC)
ext_3375: Banded Tussock (Default)
From: [identity profile] hairyears.livejournal.com
I recommend StarMap for the naked-eye astronomer: the ephemera are particularly good - meteor showers, planets... The only thing lacking is satellites.

There's no answer for the touchscreen problem with gloves. I've found nothing that works as a 'stylus', not even an eraser pencil.

March 2024

S M T W T F S
     12
3456789
10111213141516
17181920212223
24 252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 29th, 2026 10:20 pm
Powered by Dreamwidth Studios