Help. How to read a 16 bit grayscale image now JAI is no more?

#1

Hey guys,
Now the JAI library is deprecated, I am a little bit at a loss on how to read a 16bit grayscale heightmap in Processing. Can anyone recommend a format that’s easier to read, or a replacement imaging library or workaround?

Appreciated!

#2

Could you say a but more about what your goal is, specifically? Are you loading data in a fixed format – from files, sensors? – and trying to display it on screen as PImage? Could you link to JAI deprecation you mention?

#3

I was using using JAI to load a 16bit grayscale image (a depthmap) into a BufferedImage, just to read the brightness data and convert to a 3D model (relief). The level of precision is exactly why 8bit images didn’t suffice.

#4

Have you taken a look at ImageJ? I used to use it for 16bit grayscale, although not with Processing directly.

Interesting example of a similar discussion by GeoTools https://github.com/geotools/geotools/wiki/Replace-JAI

I think @cansik has also worked with ImageJ before, but I’m not sure in what way.

Here are some old ImageJ plus processing threads from the old forum:

2 Likes
#5

Ah nice thanks, let me take a look!