IMG2PNG, PDS/FITS to PNG conversion |
IMG2PNG, PDS/FITS to PNG conversion |
Dec 13 2009, 05:28 AM
Post
#16
|
|
Member Group: Members Posts: 128 Joined: 10-December 06 From: Atlanta Member No.: 1472 |
|
|
|
Dec 20 2009, 02:31 PM
Post
#17
|
|
Founder Group: Chairman Posts: 14434 Joined: 8-February 04 Member No.: 1 |
FWIW - Using ISIS3 I've now got these converting fine. PDS2ISIS, ISIS2RAW, then import to Photoshop as mentioned in the HiRISE DEM thread.
|
|
|
Jan 21 2010, 09:46 PM
Post
#18
|
|
Newbie Group: Members Posts: 3 Joined: 21-January 10 Member No.: 5182 |
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. I was wondering if the 32 bit version of this is now available or if your fitsfromimg32 can be downloaded anywhere. Cheers. Ali. |
|
|
Jan 21 2010, 10:34 PM
Post
#19
|
|
Newbie Group: Members Posts: 3 Joined: 21-January 10 Member No.: 5182 |
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 Hi there I am pretty new to this so excuse me if this is a bad observation. I've noticed that the img2png only works with one of the IMG files I downloaded from the Mars DEM site at HiRise. with further investigation the only difference I found was that the Min and Max values for all the other (non working) IMG files were : VALID_MINIMUM = -1954.39 VALID_MAXIMUM = -1833.56 in the negative range. and always resulted in a black .png file. (got this info from a pds2jpg converter I found which makes the 8 bit conversion. The only IMG file that converted successfully had a positive min and max value : VALID_MINIMUM = 782.07 VALID_MAXIMUM = 1300.01 I've tried using the -s option to multiply by a negatice number or the -ctcal_dep.txt to set up a file with the correct ranges but I get nothing. my cal_dep.txt file is just : -1954 -1800 (as I understood it it should only have one entry per file) if I am getting any of this wrong I appologise and would appreciate any guidance in converting these files. my aim is to convert the files into hieghtmaps and eventually to 3d models in a standard 3d format. Cheers. ~a |
|
|
Jan 25 2010, 12:14 AM
Post
#20
|
|
IMG to PNG GOD Group: Moderator Posts: 2254 Joined: 19-February 04 From: Near fire and ice Member No.: 38 |
I have now fixed the bug mentioned by knight (and by Doug several weeks ago - it's the same bug). IMG2PNG now correctly converts the HIRISE DEMs. Actually it should correctly convert all files containing 32 bit floating point data if the files also contain information on the valid minimum and valid maximum data values or if that information is in a detached label.
As before this can be downloaded at http://www.mmedia.is/bjj/utils/img2png |
|
|
Jan 25 2010, 12:26 AM
Post
#21
|
|
Newbie Group: Members Posts: 3 Joined: 21-January 10 Member No.: 5182 |
Awesome !
Thanks Bjorn, I will test this when I get to work ! Cheers, ~a |
|
|
Jan 26 2010, 12:59 AM
Post
#22
|
|
IMG to PNG GOD Group: Moderator Posts: 2254 Joined: 19-February 04 From: Near fire and ice Member No.: 38 |
I just made another new version of IMG2PNG, this time to correctly handle the MGS MOLA files. For the conversion to work, the label files (.LBL) must be downloaded in addition to the image files (.IMG) since the image files contain no header. When converting, the constant 8208 is added to the data to get rid of negative values.
EDIT: Currently IMG2PNG may only work for the MOLA topographic data (the megt*.img files) - I still haven't tested other 'types' of MOLA data. However, that's the data that should be most interesting. I'll do a new version that should work for more MOLA files in a week or two. |
|
|
Jan 26 2010, 02:19 AM
Post
#23
|
|
Administrator Group: Admin Posts: 5172 Joined: 4-August 05 From: Pasadena, CA, USA, Earth Member No.: 454 |
Although the gridded topographic data is indeed likely the most interesting for folks interested in digital terrain maps, I just want to speak up for the PEDRs. I don't think very many people appreciate how much better the along-track resolution of the MOLA data is than it is represented in the gridded data. Anybody who's seriously using MOLA data to understand the shape of a Martian feature is missing the boat if they do not use the PEDRs as topographic cross-sections.
However, we don't need IMG2PNG to read PEDRs; they're best read as lat, lon, altitude triples in a table. -------------------- My website - My Patreon - @elakdawalla on Twitter - Please support unmannedspaceflight.com by donating here.
|
|
|
Mar 15 2010, 04:24 PM
Post
#24
|
|
Junior Member Group: Members Posts: 94 Joined: 15-October 09 Member No.: 4979 |
I can't seem to get IMG2PNG to work on my computer- downloaded the latest version, and I was hoping to explore some of the LROC data release. However, the exe file gets this error "This application has failed to start because cftisio.dll was not found. Re-installing the application may fix this problem." I kept the cftisio.dll file in the same folder. Any suggestions? Running on an XP system.
|
|
|
Mar 15 2010, 08:11 PM
Post
#25
|
|
IMG to PNG GOD Group: Moderator Posts: 2254 Joined: 19-February 04 From: Near fire and ice Member No.: 38 |
This is weird - IMG2PNG should work if cfitsio.dll is in the same directory as img2png.exe.
Putting cfitsio.dll into the directory where Windows resides (usually c:\windows) might fix the problem. |
|
|
Mar 16 2010, 12:02 PM
Post
#26
|
|
Junior Member Group: Members Posts: 94 Joined: 15-October 09 Member No.: 4979 |
|
|
|
Mar 16 2010, 11:03 PM
Post
#27
|
|
Newbie Group: Members Posts: 4 Joined: 7-July 09 Member No.: 4857 |
Do you have local administrator rights on your workstation? Is it possible that you need to register the DLL?
|
|
|
Mar 17 2010, 01:05 AM
Post
#28
|
|
Junior Member Group: Members Posts: 94 Joined: 15-October 09 Member No.: 4979 |
I think thats the problem, I don't have admin rights on my work computer.
Do you have local administrator rights on your workstation? Is it possible that you need to register the DLL? |
|
|
May 2 2010, 05:33 AM
Post
#29
|
|
Newbie Group: Members Posts: 9 Joined: 30-April 10 Member No.: 5339 |
Hi guys,
I'm working on a real-time renderer for large data-sets, and i stumbled onto this website while trying to figure out how to read Mars data into my program. Fascinating website, and I am amazed to see the zeal/respect/love you guys have for outer-space! Anyway, sticking to the topic of the thread: Does IMG2PNG produce 32-bit floating PNGs or does it scale them to 16-bit unsigned integers? |
|
|
May 3 2010, 12:12 AM
Post
#30
|
|
Member Group: Members Posts: 890 Joined: 18-November 08 Member No.: 4489 |
i am not sure but most of the mars data is 12 bit black & white
nasa-view out puts to 8 bit indexed gray isis3 ( at the moment ) outputs to a 8 bit gray png and 8 bit tiff ( the tiff should be fixed soon ) i have been running Linux for YEARS and have not needed the MS Windows img2png.exe |
|
|
Lo-Fi Version | Time is now: 25th September 2024 - 03:33 AM |
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. |