IPB

Welcome Guest ( Log In | Register )

IMG2PNG, PDS/FITS to PNG conversion
Bjorn Jonsson
post Feb 16 2008, 02:04 PM
Post #101


IMG to PNG GOD
****

Group: Moderator
Posts: 2251
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.
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
Bjorn Jonsson
post Mar 15 2016, 10:05 PM
Post #102


IMG to PNG GOD
****

Group: Moderator
Posts: 2251
Joined: 19-February 04
From: Near fire and ice
Member No.: 38



A new IMG2PNG version is now available at the usual site:

http://bjj.mmedia.is/utils/img2png/index.html

The biggest change in this version is that it is now possible to debayer (also known as demosaicking) the input images. This is applicable for images from e.g. Chang'e 3. There are three new command line options associated with this:

-debayer
-debayer_ash
-debayer_exp

-debayer is used to debayer the input images using a default algorithm (Adaptive Smooth Hue) and -debayer_ash can be used to explicitly select this algorithm. This is the same algorithm as the one that can be selected in the "Debayer Image" ImageJ plugin; it has been used by Damia to process Curiosity images with great results (see e.g. here). -debayer_exp is used for experimental stuff, currently the Directionally Weighted Gradient Based Interpolation algorithm where I have been experimenting with post-processing the debayered images to suppress color artifacts (currently this involves selectively median filtering the hue using a 3x3 neighborhood for each pixel - this may change in future versions). -debayer_exp seems to work slightly better than -debayer_ash for some of the Chang'e 3 images but it is likely to work worse than debayer_ash for some images too (if anyone finds images where this is the case I'd like to know).
The color filter arrangement can be specified, e.g. -debayer:RGGB (which is the default arrangement and the one used by Chang'e 3).

Some bugs have also been fixed, mainly in the conversion of Chang'e 3 and LROC images and I also fixed some nasty bugs in the thumbnail generation code (for one thing, the automatic contrast stretch was far too severe). Also the header was sometimes missing from the metadata table that can be created with -metadata_table and there is now a Chang'e 3-specific version of this table.

See the IMG2PNG webpage for more details.
Go to the top of the page
 
+Quote Post

Posts in this topic
- Bjorn Jonsson   IMG2PNG   Feb 16 2008, 02:04 PM
- - elakdawalla   You need to download the label (*.LBL) as well as ...   Jan 30 2016, 05:39 PM
- - Ian R   Bjorn, I can't thank you enough for not only ...   Jan 30 2016, 08:41 PM
- - JohnVV   QUOTE (open768 @ Jan 30 2016, 06:02 AM) H...   Jan 30 2016, 10:17 PM
- - Bjorn Jonsson   A new IMG2PNG version is now available at the usua...   Mar 15 2016, 10:05 PM
- - Bjorn Jonsson   A new IMG2PNG version is now available at the usua...   Oct 8 2016, 01:03 PM
- - neo56   Bjorn, are you developing or do you plan to develo...   Oct 26 2016, 01:53 PM
- - scalbers   I'm checking how well GDAL works on a Mac to c...   Dec 3 2016, 11:48 PM
|- - jhagen   QUOTE (scalbers @ Dec 3 2016, 03:48 PM) I...   Jul 3 2017, 07:12 PM
- - Rick Ramirez   I've been having some trouble getting the resu...   Feb 23 2017, 02:49 AM
|- - elakdawalla   QUOTE (Rick Ramirez @ Feb 22 2017, 06:49 ...   Feb 23 2017, 06:22 PM
|- - Bjorn Jonsson   QUOTE (Rick Ramirez @ Feb 23 2017, 02:49 ...   May 1 2017, 03:48 PM
- - JohnVV   the pds img files are here http://lroc.sese.asu.ed...   Feb 23 2017, 06:22 AM
- - JohnVV   the clipping is do to the img file being a SIGNED...   Feb 23 2017, 08:30 PM
- - elakdawalla   Ah, right. I don't know that IMG2PNG currently...   Feb 23 2017, 09:03 PM
- - Rick Ramirez   Thanks for the help. I didn't realize IMG2PNG...   Feb 24 2017, 05:50 PM
- - Bjorn Jonsson   I took a look at this and it's a bug in IMG2PN...   Mar 6 2017, 11:14 PM
- - Bjorn Jonsson   It has come to my attention that for some reason t...   May 3 2017, 12:24 AM
- - Suchandler96   I am recently handling the viking orbiter raw imag...   Jul 3 2017, 04:32 AM
- - Bjorn Jonsson   A new version of IMG2PNG is now available. This is...   Apr 4 2018, 10:06 PM
- - Bjorn Jonsson   This may be a strange time to announce a new versi...   Mar 21 2020, 04:09 PM
- - Bjorn Jonsson   Turns out there was a subtle bug in the new 64 bit...   Apr 7 2020, 10:21 PM
- - Antdoghalo   Hi, I'm trying to convert Img files with this ...   Jun 19 2020, 01:32 PM
- - Bjorn Jonsson   I recently fixed a bug in IMG2PNG that occurred wh...   Aug 1 2020, 09:39 PM
|- - RonCatwanson   QUOTE (Bjorn Jonsson @ Aug 2 2020, 12:39 ...   Mar 3 2021, 08:12 AM
- - stevesliva   Doug told me this was okay to post... QUOTE Three ...   Aug 2 2020, 03:09 AM
- - nprev   I take it that five is right out, then...?   Aug 2 2020, 03:14 AM
- - JohnVV   img2png might be useful on linux but seeing as IS...   Mar 4 2021, 05:14 PM
- - volcanopele   There are a few data sets that are not properly su...   Mar 4 2021, 10:10 PM
- - djellison   I see in the release notes that Chang'e 3 data...   May 12 2022, 06:16 AM
- - Antdoghalo   Are their plans to one day incorporate PDS4 conver...   Jun 5 2022, 04:34 AM
- - Bjorn Jonsson   Yes, I will be adding PDS4 support. This is a fair...   Jun 6 2022, 10:14 PM
- - Bjorn Jonsson   A new version of IMG2PNG is now available. This is...   Jul 20 2023, 08:39 PM
- - Bjorn Jonsson   A new version of IMG2PNG is now available. This fi...   Jan 29 2024, 11:19 PM
- - Antdoghalo   Is there a possible ETA on a PDS4 compatibility? A...   Apr 22 2024, 01:55 AM
2 Pages V  < 1 2


Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 23rd May 2024 - 06:51 AM
RULES AND GUIDELINES
Please read the Forum Rules and Guidelines before posting.

IMAGE COPYRIGHT
Images posted on UnmannedSpaceflight.com may be copyrighted. Do not reproduce without permission. Read here for further information on space images and 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.