IMG2PNG, PDS/FITS to PNG conversion |
IMG2PNG, PDS/FITS to PNG conversion |
Feb 16 2008, 02:04 PM
Post
#1
|
|
IMG to PNG GOD Group: Moderator Posts: 2256 Joined: 19-February 04 From: Near fire and ice Member No.: 38 |
I decided to create a special thread for this topic. Previously information on IMG2PNG was scattered across various threads here.
I new version of IMG2PNG is now available. For those that don't know, this is a command line uitility that can convert various PDS formatted files to PNGs (8 or 16 bits per pixel depending on the input files). This utility should work for lots of different PDS files, e.g. MER, Pathfinder, Voyager, Galileo, Cassini, Stardust, various Mars orbiters, Mariner 9/10 (!), Viking Orbiter, Viking Lander, Magellan, Clementine, Messenger, New Horizons etc. The major new feature in the new version is the ability to convert FITS files. IMG2PNG can be downloaded by visiting http://www.mmedia.is/bjj/utils/img2png Any information on possible bugs welcome. |
|
|
Mar 21 2011, 06:52 PM
Post
#2
|
|
IMG to PNG GOD Group: Moderator Posts: 2256 Joined: 19-February 04 From: Near fire and ice Member No.: 38 |
I'm now very close to finishing the new version of IMG2PNG. A beta version is now available here:
http://www.mmedia.is/bjj/utils/img2png/img2png_new.zip This is an 'unofficial' version so there's no mention of it yet on the IMG2PNG page. There are lots of improvements and even though this is a beta version I'm pretty sure it has fewer bugs than the old version. With the exception of a few new command line options the new version has the same user interface as the old one. Some improvements: (1) LRO WAC and NAC data is now correctly converted. The WAC framelets are automatically 'rearranged'. However, the distortion described in Fig. 3 at http://www.moonposter.ie/waced-moon.htm is not corrected but I may add that correction in a future version. To automatically correct the orientation of the images (flip horizontally and/or vertically) you need to download a recent version of the cumindex.tab (or index.tab for a subset of the data) file that comes together with the LRO imaging data and add a line to img2png.ini telling IMG2PNG where to find it, for example this: lroc_index_file=P:\lro\index\CUMINDEX.TAB (2) LCROSS data is now correctly converted. Some of the LCROSS images are actually tricolor images. Since IMG2PNG always outputs only grayscale images the resulting PNG image contains three images with channel 1 at the top, channel 2 in the middle and channel 3 at bottom. (3) Doug 'discovered' that SMART-1 images couldn't be converted in the old version (see http://www.unmannedspaceflight.com/index.p...t&p=167207). The new version correctly converts this data. The bug mentioned by Ian in the message above Doug's message is also absent in the new version. (4) The new version correctly handles a far greater number of 'variants' of PDS files than the old version. In particular files containing 4 byte floating numbers frequently didn't get correctly converted in the old version. IMG2PNG doesn't handle all possible variants of PDS files though. (5) The black horizontal stripes that are sometimes present in Cassini and Voyager images can now be removed using a new command line option, -destripe. They are removed using linear interpolation. Linear interpolation is not optimal; in a future version a better (and more complex) algorithm will probably be used. (6) Images with non-square pixels can now be resampled to square pixels using the -resample command line option. At present the NEAR MSI images are the only images that get resampled (this is because at present these are the only images I know of with non-square pixels). (7) The filter name(s) can now be included in the output filename using the -fnamefilter command line option and the observation id using the -fnameobs command line options. (8) Calibration files can now be specified using the new command line option -calib. This is implemented as suggested in machi's post: http://www.unmannedspaceflight.com/index.p...st&p=170463 So if you have a file named flat.txt (as in machi's example) use "-calibflat.txt". If this option is used the bias and darkframe are subtracted from the image and the result then divided by the flatfield. Individual calibration files are optional so you can for example omit bias correction by omitting the "b=" line (or commenting it out by prefixing the line with ; or #). If the input image is 8 bit it is converted to 16 bits before calibrating. (9) I corrected a very minor bug in the Cassini calibration. The effects of the bug were extremely small so I don't think this is of any importance for the the typical users of IMG2PNG. And that's it. But - as mentioned previously - this new version is far easier to maintain and modify than the old version. So I will probably be adding new features. In particular, in a future version it will be possible to remove reseau marks from Mariner 9/10, Viking and Voyager images and correction for geometric distortion in the Voyager images is something that may appear in a future version. |
|
|
Lo-Fi Version | Time is now: 31st October 2024 - 10:57 PM |
RULES AND GUIDELINES Please read the Forum Rules and Guidelines before posting. IMAGE COPYRIGHT |
OPINIONS AND MODERATION Opinions expressed on UnmannedSpaceflight.com are those of the individual posters and do not necessarily reflect the opinions of UnmannedSpaceflight.com or The Planetary Society. The all-volunteer UnmannedSpaceflight.com moderation team is wholly independent of The Planetary Society. The Planetary Society has no influence over decisions made by the UnmannedSpaceflight.com moderators. |
SUPPORT THE FORUM Unmannedspaceflight.com is funded by the Planetary Society. Please consider supporting our work and many other projects by donating to the Society or becoming a member. |