IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
NASAView and raw MGS topography data, How to create images with the full sample size?
Guest_Magnus Lundstedt_*
post Mar 14 2006, 03:41 PM
Post #1





Guests






I am toying around with some raw image data from MGS in the form of pds files. (EDIT: MOLA instrument images). I have downloaded the data from here:

http://pds-geosciences.wustl.edu/missions/mgs/megdr.html

Each image consists of a pair of files: ".img" and ".lbl". The img-file contains the data and the lbl file contains metadata. In this metadata file it says that the sample size is 16 bits. But in the program NASAView, which one uses to generate images from pds files, I have only managed to create 8 bit images.

Is it possible to create images with the full 16 bit data with NASAView? Or should I use some other program? Or do I have to write it myself?

Thanks for any suggestions!

/Magnus (magnus @ #space)
Go to the top of the page
 
+Quote Post
djellison
post Mar 14 2006, 04:04 PM
Post #2


Founder
****

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



Your best bet is going to be using the MOC Gallery
http://www.msss.com/moc_gallery/ as then you'll have the projected images, processed just about as well as they can be, in a comparatively lossless format (gif) - AND - they're easier to find smile.gif

MC might correct me, but I believe MOC is only 8 bits. MER cameras are 12, but MOC is just 8.

Doug
Go to the top of the page
 
+Quote Post
Guest_Magnus Lundstedt_*
post Mar 14 2006, 04:16 PM
Post #3





Guests






QUOTE (djellison @ Mar 14 2006, 05:04 PM) *
Your best bet is going to be using the MOC Gallery
http://www.msss.com/moc_gallery/ as then you'll have the projected images, processed just about as well as they can be, in a comparatively lossless format (gif) - AND - they're easier to find smile.gif

MC might correct me, but I believe MOC is only 8 bits. MER cameras are 12, but MOC is just 8.

Doug


I dont know. That would mean that they have 255 steps in -8 km to +21 km - 110 m resolution - not too good sad.gif Also the meda datafile says 16 bits, but its maybe something else? The instrument in question is the "MOLA", the laser altimeter instrument, I dont know if it can be compared to ordinary cameras? I thought the MOLA had sub meter vertical resolution. (i saw 30 cm somewhere)

If I go to moc-gallery and pick already processede images, I dont get them the way I want. smile.gif Besides if i get them in gif (max 8 bits per pixel) its no better than what the NASAView program does wink.gif

/Magnus
Go to the top of the page
 
+Quote Post
mcaplinger
post Mar 14 2006, 04:21 PM
Post #4


Senior Member
****

Group: Members
Posts: 2511
Joined: 13-September 05
Member No.: 497



QUOTE (djellison @ Mar 14 2006, 08:04 AM) *
MC might correct me, but I believe MOC is only 8 bits.

That's true, but he was talking about MOLA gridded products, which are 16 bits.

It depends on what you want to do with the data as to how many bits you need. More recent versions of Photoshop do 16 bits. For altimetry, many applications make a shaded relief map in 8 bits from the original topo data.


--------------------
Disclaimer: This post is based on public information only. Any opinions are my own.
Go to the top of the page
 
+Quote Post
Guest_Magnus Lundstedt_*
post Mar 14 2006, 04:48 PM
Post #5





Guests






QUOTE (mcaplinger @ Mar 14 2006, 05:21 PM) *
That's true, but he was talking about MOLA gridded products, which are 16 bits.

It depends on what you want to do with the data as to how many bits you need. More recent versions of Photoshop do 16 bits. For altimetry, many applications make a shaded relief map in 8 bits from the original topo data.


Ok, but there is no imageformat with 16 bits of indexed colors? Or even possible to export in NASAView as a 32 bit image, where there is plenty of space for 16 bit data for each pixel? In that case I must do my own program I guess. Ah well.

Thanks for the help!
Go to the top of the page
 
+Quote Post
helvick
post Mar 14 2006, 05:43 PM
Post #6


Dublin Correspondent
****

Group: Admin
Posts: 1799
Joined: 28-March 05
From: Celbridge, Ireland
Member No.: 220



QUOTE (Magnus Lundstedt @ Mar 14 2006, 04:48 PM) *
Ok, but there is no imageformat with 16 bits of indexed colors? Or even possible to export in NASAView as a 32 bit image, where there is plenty of space for 16 bit data for each pixel? In that case I must do my own program I guess. Ah well.

Thanks for the help!

ImageMagick supports 16bit PNG greyscale so you can work with that format using the various ImageMagick libraries but it's a new format so support is rare and you have to use the 16bit ImageMagick variant.

You could work the data into 16,24 or 32 bit image format but none of them would display 16bits of greyscale properly.
Go to the top of the page
 
+Quote Post
Guest_Magnus Lundstedt_*
post Mar 14 2006, 07:05 PM
Post #7





Guests






I have done what I wanted with 8 bit vertical resolution instead. That is to make images for a mars with a hypothetical oceans with several different ocean heights. To compose in a video afterwards. It was pretty fun. Will probably try somehow to do it with 16 bit vertical resolution instead and far more images, or perhaps dynamically generate images or parts of images based on user input data.

Another thing I have learned is that 11000x5500 px videos does not work so well. smile.gif I managed to encode it, but when I played it in VLC, my computer froze. heh. So I had to settle for 1280x640 for the video. Ah well.

This is the result of what I did:

http://magnus.infidyne.com/mars/water/
Go to the top of the page
 
+Quote Post
algorimancer
post Mar 16 2006, 01:37 PM
Post #8


Member
***

Group: Members
Posts: 656
Joined: 20-April 05
From: League City, Texas
Member No.: 285



QUOTE (Magnus Lundstedt @ Mar 14 2006, 01:05 PM) *
I have done what I wanted with 8 bit vertical resolution instead. That is to make images for a mars with a hypothetical oceans with several different ocean heights. To compose in a video afterwards. It was pretty fun. Will probably try somehow to do it with 16 bit vertical resolution instead and far more images, or perhaps dynamically generate images or parts of images based on user input data.

Another thing I have learned is that 11000x5500 px videos does not work so well. smile.gif I managed to encode it, but when I played it in VLC, my computer froze. heh. So I had to settle for 1280x640 for the video. Ah well.

This is the result of what I did:

http://magnus.infidyne.com/mars/water/


I like the 1300-1400 meter water depth versions. That looks like a nice world to live on smile.gif
Go to the top of the page
 
+Quote Post
Bjorn Jonsson
post Mar 22 2006, 03:35 PM
Post #9


IMG to PNG GOD
****

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



16 bit PNGs work well for this purpose and Photoshop CS can handle them. I have been using 16 bit PNGs to do renders of Mars based on MOLA data (an old and rather bad experimental one can be seen here: http://www.mmedia.is/bjj/3dtest/mars_vm_pt3rt.jpg ). 8 bits are usually insufficient for this kind of work.

What I did was to take all of the IMG MOLA files and convert/merge them into a single, huge 'RAW' file using a small program I wrote. I then wrote a small program that can extract a selected latitude/longitude range from the 'RAW' file and write the result to a 16 bit PNG file. I then use that file to render a limited area at high resolution.

I don't remember if my IMG2PNG utility can convert a MOLA PDS file to a PNG (I'm at work so I can't check it wink.gif) but it could be modified fairly easily to do so if it doesn't work.
Go to the top of the page
 
+Quote Post
djellison
post Dec 22 2007, 05:36 PM
Post #10


Founder
****

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



QUOTE (Bjorn Jonsson @ Mar 22 2006, 03:35 PM) *
I don't remember if my IMG2PNG utility can convert a MOLA PDS file to a PNG (I'm at work so I can't check it wink.gif ) but it could be modified fairly easily to do so if it doesn't work.


Peaaaaawwwwwwwwwwwwwwwwww.... 21 month forum time warp. Wadda ya know, googling about MOLA and PNG's - I ended up back here again smile.gif

MOLA+IMG2PNG - It doesn't like them - and I'd really like to go to the 64 or 256 pix/deg resolution from here -http://pds-geosciences.wustl.edu/missions/mgs/megdr.html

NASA View loads the 4 chunks for the 64 fine, and saves GIF's fine - but they get stretched, unequally, in the process, and downed to 8bit.

A 20k or 40k 16bit PNG bump/displacement map for Mars rendering would be rather good when I'm rendering out of 3ds max at 4000x4000 pixels

I've got a fairly 'flat' 16k colour map which isn't too bad....but more is ALWAYS better when 16 megapixels are required

Doug
Attached thumbnail(s)
Attached Image
Attached Image
 
Go to the top of the page
 
+Quote Post
djellison
post Dec 26 2007, 03:22 PM
Post #11


Founder
****

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



YEah - here's the 8 bit v 16 bit problem - I'm getting steps in my terrain. Looks awesome at the moment, but that extra resolution for altitude would take it to that level where you couldn't see those 256 steps.

Doug
Attached thumbnail(s)
Attached Image
 
Go to the top of the page
 
+Quote Post
mcaplinger
post Dec 26 2007, 04:26 PM
Post #12


Senior Member
****

Group: Members
Posts: 2511
Joined: 13-September 05
Member No.: 497



QUOTE (djellison @ Dec 22 2007, 09:36 AM) *
NASA View loads the 4 chunks for the 64 fine, and saves GIF's fine - but they get stretched, unequally, in the process, and downed to 8bit.

The problem is that the GIF format is inherently limited to 8 bits.

For the maps of Mars I was working on in 2000-2002, I used the GMT tools and GMT-format files that could be obtained from the MOLA website (since they used GMT for a lot of their products.) But GMT is really hard to use and I think predates the widespread use of PNG.

Later versions of Photoshop can load 16-bit images in raw format, which would involve using NASAview to determine the image dimensions and the header size, and then telling Photoshop to load those dimensions and skip the header. It might then be possible to save as a 16-bit PNG. But I've never tried this.

Your best best is to use some kind of raw file import capability.


--------------------
Disclaimer: This post is based on public information only. Any opinions are my own.
Go to the top of the page
 
+Quote Post
djellison
post Dec 31 2007, 03:31 PM
Post #13


Founder
****

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



NEARLY works with Photoshop.

The dimensions are in the LBL, but I'm getting an odd clipping whereby (I think) I'm getting two hacks at 16 bits, with the depths resetting from black to white to go deeper. Odd.

Works a treat for CTX...not so good for MOLA.

Doug
Attached thumbnail(s)
Attached Image

 
Go to the top of the page
 
+Quote Post
hendric
post Dec 31 2007, 03:58 PM
Post #14


Director of Galilean Photography
***

Group: Members
Posts: 896
Joined: 15-July 04
From: Austin, TX
Member No.: 93



Doug,
I'm just guessing, but it is it possible for you to change the DEM image from 8 to 16 bit in Photoshop, and then add some Gaussian noise for the lower 8 bits? It would get rid of the stairstepping effect at least.


--------------------
Space Enthusiast Richard Hendricks
--
"The engineers, as usual, made a tremendous fuss. Again as usual, they did the job in half the time they had dismissed as being absolutely impossible." --Rescue Party, Arthur C Clarke
Mother Nature is the final inspector of all quality.
Go to the top of the page
 
+Quote Post
djellison
post Dec 31 2007, 04:03 PM
Post #15


Founder
****

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



That would help a bit, for now - but...

These things take 2 or 3 days to render out a 4k res sequence of 1800 frames smile.gif

What I'd really like is to get both the 16 bit sorted AND use the 64 ppd data. That means getting the four panels processed the same to mosaic them up as one roughly 20k x 10k mosaic and the way NasaView loads them, it stretches each, unequally.

So I'll hang tight till I can figure out the processing at 16 bit, mosaic them, then get re-rendering ( I think a cheap render node or two might be usefull in the meantime!)

Doug
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 26th April 2024 - 08:42 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.