IPB

Welcome Guest ( Log In | Register )

9 Pages V   1 2 3 > »   
Reply to this topicStart new topic
IMG2PNG, PDS/FITS to PNG conversion
Bjorn Jonsson
post Feb 16 2008, 02:04 PM
Post #1


IMG to PNG GOD
****

Group: Moderator
Posts: 2250
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
Bjorn Jonsson
post Jun 7 2009, 12:53 AM
Post #2


IMG to PNG GOD
****

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



I just uploaded a new version of IMG2PNG. This version is important for those of you that use it to calibrate Cassini images as I corrected a nasty bug that resulted in incorrect brightness of the images. For example, this manifested itself in blue images that became too dark relative to the red and green ones. This messed up RGB composites.

There are no changes that affect images from other spacecraft.

As before this can be downloaded at http://www.mmedia.is/bjj/utils/img2png
Go to the top of the page
 
+Quote Post
djellison
post Dec 11 2009, 02:34 PM
Post #3


Founder
****

Group: Chairman
Posts: 14431
Joined: 8-February 04
Member No.: 1



Another data set, another IMG2PNG challenge smile.gif

http://hirise-pds.lpl.arizona.edu/PDS/DTM/...SP_002686_1410/

I THING they're 32 bit IMG's - any chance of a tweak and recompile - IMG2PNG goes "Errm - excuse me, these are more than 16bit" and happily produces a 16 bit PNG anyway - which does have the image data in there, but it's stuck right down at the bottom of the histogram and stretching it to get some sensible displacement, I can see that it's got stair-stepping much like using 8 bit displacement maps.
Go to the top of the page
 
+Quote Post
Bjorn Jonsson
post Dec 12 2009, 12:41 AM
Post #4


IMG to PNG GOD
****

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



I'll take a look at this sometime in the next several days. In the meantime it might work to do "img2png -sNNN..." where NNN is some "big" number. This might scale the output intensity to something that makes sense (I haven't tested this yet so I'm not completely sure).
Go to the top of the page
 
+Quote Post
siravan
post Dec 12 2009, 02:19 AM
Post #5


Member
***

Group: Members
Posts: 128
Joined: 10-December 06
From: Atlanta
Member No.: 1472



QUOTE (djellison @ Dec 11 2009, 09:34 AM) *
Another data set, another IMG2PNG challenge smile.gif

http://hirise-pds.lpl.arizona.edu/PDS/DTM/...SP_002686_1410/


I've written a utility program fitsfromimg32.exe, which converts 32 bits IMG files to FITS format. It seems to be doing a good job on these files. If anyone is interested, please send me a message, so that I can email the exe file or the C++ source files.
Go to the top of the page
 
+Quote Post
djellison
post Dec 12 2009, 02:09 PM
Post #6


Founder
****

Group: Chairman
Posts: 14431
Joined: 8-February 04
Member No.: 1



sNNNN worked in brightening up the resultant 16 bit PNG - but it's got stair stepping in there, where I wouldn't expect it to be.
In an ideal world - I'd have a 16bit PNG that goes from black (low) to white (high) and a text file telling me the actual altitude range between top and bottom so I can scale them appropriately. DAMN - I should have been a code monkey.

It's doable via ISIS3 I think - but ISIS is playing hardball with me today and not even letting me do USGS DEM isis2raw processing. Grrrrr.
Attached thumbnail(s)
Attached Image
 
Go to the top of the page
 
+Quote Post
mhoward
post Dec 12 2009, 03:35 PM
Post #7


Senior Member
****

Group: Moderator
Posts: 3431
Joined: 11-August 04
From: USA
Member No.: 98



QUOTE (djellison @ Dec 11 2009, 08:34 AM) *


I must be missing something here. Why do the files in that directory have .jp2 extensions?
Go to the top of the page
 
+Quote Post
imipak
post Dec 12 2009, 07:12 PM
Post #8


Member
***

Group: Members
Posts: 646
Joined: 23-December 05
From: Forest of Dean
Member No.: 617



CODE
[imipak@localhost] $ file ~/Download/DT2EC_002620_1410_002686_1410_A01.JP2
../Download/DT2EC_002620_1410_002686_1410_A01.JP2: JPEG 2000 image data


--------------------
--
Viva software libre!
Go to the top of the page
 
+Quote Post
mhoward
post Dec 12 2009, 07:26 PM
Post #9


Senior Member
****

Group: Moderator
Posts: 3431
Joined: 11-August 04
From: USA
Member No.: 98



I guess I need to be more clear. Above, we're talking about these files (?) as if they're IMG files. IMG file does not equal JPEG 2000 file, as far as I know.

What am I missing here?
Go to the top of the page
 
+Quote Post
Phil Stooke
post Dec 12 2009, 08:30 PM
Post #10


Solar System Cartographer
****

Group: Members
Posts: 10121
Joined: 5-April 05
From: Canada
Member No.: 227



Stepping around that wee problem for a second, the Kaguya released images, when unzipped, are 32 bit IMGs, are they not?

Phil


--------------------
... because the Solar System ain't gonna map itself.

Also to be found posting similar content on https://mastodon.social/@PhilStooke
NOTE: everything created by me which I post on UMSF is considered to be in the public domain (NOT CC, public domain)
Go to the top of the page
 
+Quote Post
elakdawalla
post Dec 12 2009, 09:18 PM
Post #11


Administrator
****

Group: Admin
Posts: 5172
Joined: 4-August 05
From: Pasadena, CA, USA, Earth
Member No.: 454



One of the files in that directory has an IMG extension...


--------------------
My website - My Patreon - @elakdawalla on Twitter - Please support unmannedspaceflight.com by donating here.
Go to the top of the page
 
+Quote Post
siravan
post Dec 12 2009, 10:03 PM
Post #12


Member
***

Group: Members
Posts: 128
Joined: 10-December 06
From: Atlanta
Member No.: 1472



I've attached a portion of DTEEC_002620_1410_002686_1410_A01.IMG. It is converted into 16 bit gray scale and shrunk 4 times. Note that it is a DEM, showing elevation at the edge of a crater with gullies cutting into the slopes.
Attached thumbnail(s)
Attached Image
 
Go to the top of the page
 
+Quote Post
Phil Stooke
post Dec 12 2009, 11:17 PM
Post #13


Solar System Cartographer
****

Group: Members
Posts: 10121
Joined: 5-April 05
From: Canada
Member No.: 227



Ah, now it's starting to make sense... two HiRISE images making a stereo pair (each with a full image and a color strip), and a DEM. That's quite a useful dataset...

Phil


--------------------
... because the Solar System ain't gonna map itself.

Also to be found posting similar content on https://mastodon.social/@PhilStooke
NOTE: everything created by me which I post on UMSF is considered to be in the public domain (NOT CC, public domain)
Go to the top of the page
 
+Quote Post
JohnVV
post Dec 13 2009, 02:42 AM
Post #14


Member
***

Group: Members
Posts: 890
Joined: 18-November 08
Member No.: 4489



QUOTE
the Kaguya released images, when unzipped, are 32 bit IMGs, are they not?

from ghex the LALT_GGT_MAP.IMG is a 32 bit 4byte_float

i used raw2isis to open it
Go to the top of the page
 
+Quote Post
mhoward
post Dec 13 2009, 03:09 AM
Post #15


Senior Member
****

Group: Moderator
Posts: 3431
Joined: 11-August 04
From: USA
Member No.: 98



QUOTE (elakdawalla @ Dec 12 2009, 02:18 PM) *
One of the files in that directory has an IMG extension...


Ah, ok. I completely missed that somehow. Thanks.
Go to the top of the page
 
+Quote Post

9 Pages V   1 2 3 > » 
Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 19th March 2024 - 02:07 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.