Re: Tiff with signed samples

Bob Friesenhahn <[email protected]> Tue, 18 Aug 2020 18:52:57 -0500 (CDT)
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <[email protected]>
On Tue, 18 Aug 2020, Tom Lechner wrote:
>
> On 8/18/20 2:58 PM, Bob Friesenhahn wrote:
>> With signed values, there might be a 'nominal' measurement value equivalent 
>> to 0 with values then appearing above and below that 'nominal' value and 
>> scaled to not lose anything important. Another way to do things is to 
>> ignore negative values and only use the positive values.
> For Mars, elevation levels in meters are magically able to be stored 
> comfortably in a 16 bit int without custom scaling, top to bottom it's about 
> 31 km. In the nasa mars image, not quite sure what their 0 is physically, but 
> the pixel values range -8200 to 21162. I'm not against flooding mars to 
> ignore the negative values, but terraforming is a lot of work!

That is good to know.  As long as I know what to do, it is likely not 
difficult for me to support signed values as a post-processing step in 
the TIFF reader.  GraphicsMagick has the ability to support large 
colormaps (64k entries), which could be really useful in order to 
"colorize" an image like this.

> Yeah, Gimp and Krita both freeze everything and fill up my swap memory. gm 
> will at least resize it without doing that!

Yes.  Programs which try to be more memory efficient are often less 
memory efficient.  GM is not particularly memory efficient but its 
representation is very simple.

> Basically, height map to normal map is this:
>    http://cpetry.github.io/NormalMap-Online/
> https://stackoverflow.com/questions/5281261/generating-a-normal-map-from-a-height-map
>
> From values of adjacent "height" pixels, compute a normal vector, and store 
> as a unit vector XYZ in RGB channels. XY are tangent to the 3d surface and Z 
> points away from the surface. 50% means 0. Default normal is sticking 
> straight away from the surface, usually coded as (.5, .5, 1.0).

That sounds interesting.  Do you have programming talents? :-)

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt

_______________________________________________
Graphicsmagick-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help