need help. how to uncompress .img files from magellan |
need help. how to uncompress .img files from magellan |
Jan 6 2011, 11:33 PM
Post
#1
|
|
Junior Member Group: Members Posts: 91 Joined: 21-August 06 Member No.: 1063 |
Hoping someone can help.
I am trying to uncompress the FMAP .img files which are part of magellans images of venus so I can use a converter program to convert them from sinusodal to cylindrical mapping. Things I do know is that I can just rename .img to .raw and open in photosho however the converter program newmap.exe which is an old dos program that is provided with the FMAP images requires I think the uncompressed .img files in order to convert sinusodal to cylindrical. I know the .raw didnt work. And I get error saying my .img files are compressed so it wont work. I know .img files are not cd or dvd image file or so I think becuase I could not open them in MagicISO If they were CD images I would think MagicISO would work but I may be wrong though. Anyone familiar with what I am trying to do. Any image processing guys out their do this with the magellan FMAPS? I figure the experts would be here. thanks |
|
|
Jan 7 2011, 12:46 AM
Post
#2
|
|
Member Group: Members Posts: 128 Joined: 10-December 06 From: Atlanta Member No.: 1472 |
IMG files usually have either a text header or a separate text .lbl file, which you can read using a text editor and figure out what to do with them. A typical example is included here. It basically means that the file is organized into 20682 fixed-length records, each 30776 bytes in length (i.e. total file size is 30776*20682=636509232 bytes). ^IMAGE line means raw data begins at the second record (it is a 1 base system, so the first record is 1, not 0), hence, the image data starts at byte 30776. Here, each pixel is recorded as a 32 bit (SAMPLE_BITS) floating point number (SAMPLE_TYPE=PC_REAL, technically little-endian IEEE 754 floating-point number; in practice, this is the 'float' type in most programming languages). The image dimension is 20681 x 7694 pixels. The data is organized row first, so the first line of data is from byte 30776 to 30776+7694*4-1=61551. You can read it using a raw data import utility (Photoshop has one, I guess Gimp has one too), or if you are prone to write your own code, you can write a quick import program in the language of your choice.
PDS_VERSION_ID = PDS3 /*File format and length */ RECORD_TYPE = FIXED_LENGTH RECORD_BYTES = 30776 FILE_RECORDS = 20682 ^IMAGE = 2 OBJECT = IMAGE LINES = 20681 LINE_SAMPLES = 7694 BANDS = 1 OFFSET = 0.0 SCALING_FACTOR = 1.0 SAMPLE_BITS = 32 SAMPLE_BIT_MASK = 2#11111111111111111111111111111111# SAMPLE_TYPE = PC_REAL MISSING_CONSTANT = 16#FF7FFFFB# VALID_MINIMUM = -366.22 VALID_MAXIMUM = 1793.79 END_OBJECT = IMAGE |
|
|
Lo-Fi Version | Time is now: 19th April 2024 - 01:16 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. |