|
Bird
Carpal Tunnel
   
Reged: 08/07/03
Posts: 2629
Loc: Canberra, Australia
|
|
With Charles' permission, I'd like to start a thread that is dedicated to a particular software toolkit that most people probably don't know about - NetPBM.
This first post should set the guidelines for this thread - no images please, unless you want to show a particular before & after from processing through one of the NetPBM tools.
There are other threads for general astrophotography images. Lets' try and keep this one a bit small & clean.
---
http://netpbm.sourceforge.net/
Anyway, about NetPBM... It was originally written for UNIX, but there's a Windows command-line version available now, and it'll probably even run on Ron's Mac :-) so I guess it counts as a "generally available" image processing tool.
NetPBM isn't a single application. In grand old UNIX tradition it is a collection of small, special-purpose tools that can be connected together on a commandline to make a processing pipeline. In general terms this pipeline will have the following pieces (from left to right):
- convert image into one of the PBM internal formats
- process image (possibly multiple stages of this)
- convert result back into external format and save
NetPBM has several internal formats, and you pick the one that is closest to your original - monochrone(PBM), greyscale(PGM) or colour (PPM). The important thing about these formats is that they are lossless, so multiple processing stages don't degrade the image. If you are starting with something lossy like jpeg, then this is important.
The toolkit uses a generic term "PNM" to mean any of these formats. A tool that takes a "PNM" format can be fed either a PBM/PGM/PPM image.
As a real example, I have been using one of the noise-filtering tools to preprocess mars frames before feeding them into registax. The pipeline looks like this:
- convert BMP into PPM (RGB colour format)
- feed this image into the noise filtering tool pnmnlfilt
- convert the result back into BMP and save.
The commandline looks a bit like this:
bmptoppm < IMAGE001.BMP | pnmnlfilt 0.6 0.8 | ppmtobmp > IMAGE001a.BMP
Now, you might wonder why a commandline tool like this is interesting. Well, when I have 2500 of these suckers to convert, I can write a simple batch program to process them all - something that's damn near impossible with any GUI based tool.
You might consider it to be a command-line, component based version of something like Photoshop or GIMP, suited to people who want to script up elaborate processing runs and possibly write custom processing components.
There's a lot more to this toolkit, but you should probably just check out the website, and maybe download it and have a play / read the docs to get a feel for all the different options. There are many conversion,filtering and special effects that are available.
Also, the internal formats - particularly the colour PPM format - are simple to program, so writing your own tool to do some custom processing is very easy. I wrote a small tool that locates & centres mars in each frame. It's about 50 lines of C.
The URL is http://netpbm.sourceforge.net/
The documentation is here:
http://netpbm.sourceforge.net/doc/
cheers, Bird
-------------------- Deep Sky Optics 13.1" f/5.5 newtonian,
PGR Dragonfly Express, PGR Dragonfly 2
RedHat Linux + Coriander
http://www.acquerra.com.au/astro/
Edited by Bird (09/18/03 07:51 PM)
|
Bird
Carpal Tunnel
   
Reged: 08/07/03
Posts: 2629
Loc: Canberra, Australia
|
|
If anyone wants to try it, I put the source and a compiled-for-windows version of my mars-centering tool on my website.
It only understands PPM input, and it writes PPM output, so it's really meant to be used along with other components out of NetPBM.
You can grab the source and a windows binary from these URL's
http://www.acquerra.com.au/personal/bird/astronomy/ppmcentre.c http://www.acquerra.com.au/personal/bird/astronomy/ppmcentre.exe
For an example of a script that I use for processing, here is a UNIX shellscript that I run to centre mars and filter out some of the noise. I do this before feeding the frames into registax :-)
If you don't know unix shell, it's a bit like windows batch files but much more powerful. There are various windows-compatible version of UNIX shells around - my favourite is here:
http://www.mingw.org/msys.shtml
Anyway, here's the script. It puts the aligned/filtered images into a subdirectory called "aligned".
cheers, Bird
--------UNIX SHELL SCRIPT FOLLOWS ------------
#!/bin/sh
mkdir -p aligned || { echo "Cannot create directory"; exit 1; }
echo Aligning
for i in *.bmp; do echo $i bmptoppm < $i | pnmnlfilt 0.5 0.8 | ppmcentre | ppmtobmp -bpp 24 > aligned/$i done
-------------------- Deep Sky Optics 13.1" f/5.5 newtonian,
PGR Dragonfly Express, PGR Dragonfly 2
RedHat Linux + Coriander
http://www.acquerra.com.au/astro/
|
Anonymous
Unregistered
|
|
I saw CygWin... YeeeHaaaa another excuse to keep on using BASH in Windows!
Since I had serious aligning problem with Mars because of manual tracking i'll have a go at it when i finished painting the outside of my house 
Peppe
|
|
5 registered and 1 anonymous users are browsing this forum.
Moderator: Charlie Hein, knuklhdastnmr
Print Thread
|
Forum Permissions
You cannot start new topics
You cannot reply to topics
HTML is disabled
UBBCode is enabled
|
Thread views: 769
|
|
|
|
|
|
|