Java image with double value pixel
Actually I'm working with BufferedImages, that provide me pixel values in int type.
Do you know a Java object to开发者_运维百科 represent an image that the pixel value in double or float type?
I'm not sure exactly what your end goal is, but you could look into java.awt.image.ColorModel . Either that or you could do your processing on a float[][]/double[][] and then round if you need to do something with your BufferedImage.
I do know of an implementation off the top of my head, but you can use the SampleModel/WritableRaster to access bands independently and create your own backing however you like. It likely won't be much fun though. Although, I'd question the "access component (??) as a double/float" requirement (unless you're doing something fun like OpenGL 8-bit floats ... which don't map to Java floats anyway :-)
You can use Java Advanced Imaging API (JAI).
JAI introduces two new data classes, which extend the Java 2D DataBuffer
image data class: DataBufferFloat
and DataBufferDouble
.
http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/J2D-concepts.doc.html#52401
精彩评论