4
$\begingroup$

TL;DR

Given products available in this page, how can I get a 3d model, or at least a point cloud, or as a last chance just a suitable depth map for depth map viewer, for this image?

example image

What I tried

I found a couple of interesting sites providing access to some interesting derived products of MER missions, widely superseding the original "old fashioned "Raw images page":

In PDS image atlas I found these "3d" products available:

  • terrain mesh: .rgb files; how to open them? - example id: 1p567549107rsld0ijp2376l2m1 (RSL product)
  • terrain wedge: .vst (ViSTa) files: how to open them? - example id: 2p291489372vilb0ltp2356l2m1 (VIL product)
  • range: .img files; each pixel contains a value representing distance from rover; I thought it was equivalent to depth map, but then found that actually it's the distance from camera, so it's not suitable for my use without a conversion - example id: 1p581745020rnld2fcp2681l8m1 (RNL product)
  • xyz: img files; this should be actually a depth map, given by Z values (see below) - example id: 2p291489372xylb0ltp2356l2m1 (XYL product)

XYZ image

I tried converting it into greyscale using irfanview, then I uploaded it to this Depthmap viewer together with the corresponding raw image, getting weird results; then I further studied the format and I probably understood the reason of weird results:

the file contains 3 data per each pixel of original image: the X, Y and Z coordinates; this results into a "false colors" image, where each pixel "mixes" "Z" information (useful for depth map) with X and Y information; I should seaparate "Z" from other bands.

If I understand correctly the format:

  • each datum is a 32 bit float (see example label)
  • file is of type "BSQ" (Band Sequential): this should mean that the 3 x,y,z matrix are stored sequentially
  • Values for "Z" should be in 3rd band
  • Using NASA Viewer I should be able to extract just the "Z" information and turn it into an image, but I don't understand how to use this dialog to get what I need:

Nasa Viewer screenshot

Documentation says:

The window consists of buttons to increase/decrease the band strength and band intensity for red, green, and blue.

The buttons that control the band strength for each color increase/decrease by 1 with each click of the button.

Note: The band strengths should never be set to 0. Unexpected behavior will occur.

The buttons that control the band intensity for each color increase/decrease by 0.1 with each click of the button.

Alternatively, there are text boxes found to the right of the buttons where the band strengths and intensities can be entered manually.

The Apply Selections button is used to apply the current settings to the image and displays it. The current settings are found to the left of the buttons.

I should obtain a single-channel image, but I can't. Any help?

== Useful resources ==

$\endgroup$

1 Answer 1

1
$\begingroup$

The xyz file is in the format "PDS image data" according to the file command; GDAL may understand it.

We can rule out PDS4 being relevant, as that is is XML based and the XYZ file is not.

Other software exists, such as PyPDS; there's also a transform tool which might extract the information you need.


I'm dubious that it's possible to just extract the Z-data and get anything useful. The Great Wave off Kanagawa

The data is - I believe - stored as XYZ triplets. The wave might have a point at (-3, 1, 10) and the mountain at (300, -100, 1000) -- these triplets denoting a point in space (in some sort of coordinate system) where a radar reflection was observed from. (Note how the numbers for the wave are all smaller due to being closer, despite visually not being that far away on the image). Getting only the Z data would just leave you with 100 and 1000 -- but you'd lose the useful data of where those observations were taken from. I expect the image you've shown was taken by dropping those points into 3D space, colouring those points with their Z value, and then taking a top down picture of those points. Note the gaps where there are no relevant data-values at all!

$\endgroup$
1
  • 1
    $\begingroup$ I spent last two months studying NASA 3d formats; my progress are visible in this repo github.com/jumpjack/VST-converter , but currently it's just a mess of nonsense sources :-) Once I'll get something actually useful I will post an answer to my question. Anyway yes, XYZ/IMG products contain 3d models in "pointcloud" form; and a VIL/VST file contains pointcloud and triangles for 1 image; .ht files contain heightmaps; .pfb files contain multiple meshes derived from multiple VST files,.... $\endgroup$
    – jumpjack
    Jul 27 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.