Inserting georeferenced floating point image.

classic Classic list List threaded Threaded
6 messages Options
DC DC
Reply | Threaded
Open this post in threaded view
|

Inserting georeferenced floating point image.

Hello,

I've read in another post about inserting a texture that is a 16 bit image. I'm attempting to insert a floating point IR image instead of using a terrain cutout. There are some anomalies along the edges of a terrain cutout that may be avoided when using a texture insert instead. The values for my texture insert range in the 1e-4 values.

I read in the aforementioned post that GDAL will clamp those values between 0, 255 and that I should use the -scale option with gdal_translate, creating a VRT to tweak until it looks good before creating the GTiff. For us, the scale option will not work since tweaking the scale to make it 'look ok' won't do.

I can get the correct look for the texture by using the coverage=true option, because that reads the texture in as a float in ReaderWriterGDAL. However, the screen shot below (not the actual insert texture) demonstrates the problem with this. I've done my attempt to have ReaderWriterGDAL read the image as a float without the coverage tag with no success. Also, I really don't want to use the coverage option since I want these values to interpolate.

Is there a correction I can do within the shader to avoid the screen shot anomaly? Is there another method I'm not aware of where I can insert a georeferenced floating point texture without any special preprocessing?

This is using osgEarth 2.10.

Thanks,
DC

gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Inserting georeferenced floating point image.

Visualizing a 1-channel 16-bit image is going to require some kind of re-mapping or scaling into RGB space. What are you hoping to see?
Glenn Waldron / Pelican Mapping
DC DC
Reply | Threaded
Open this post in threaded view
|

Re: Inserting georeferenced floating point image.

I'm hoping to see the same floating point values I see in the original texture.

A  value of RED 1.234e-4 in the original texture will show up as RED 1.234e-4 on Earth.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Inserting georeferenced floating point image.

Are you using an HDR display? A 16-bit RED channel would require an HDR-capable monitor and a full HDR rendering pipeline, which OE cannot help you with. Most displays are limited to 24-bit RGB in which case will have to remap (downsample) to an 8-bit RED channel for display.
Glenn Waldron / Pelican Mapping
DC DC
Reply | Threaded
Open this post in threaded view
|

Re: Inserting georeferenced floating point image.

We render to a floating point FBO, which is post processed for HWIL scenarios.

It looks like I may have to stick with the terrain inserts.

gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Inserting georeferenced floating point image.

OK. Perhaps you could preprocess the data into R and G channels (MSB/LSB) and then unpack it in your FBO shader? Just a thought
Glenn Waldron / Pelican Mapping