Reputation: 33
I'm working on a college project, where I need to handle images in java. Sometime ago I worked in math lab and it was so easy, so I would like to know if exits any java library that could let me play with the pixels values, color(by pixel), RGB model, gray-scale img, etc.
Upvotes: 0
Views: 513
Reputation: 89
Well, there is a library available in Java which can help to access Matlab code with in Java program. Please check http://code.google.com/p/matlabcontrol/
Upvotes: 1
Reputation: 189
I tend to use DataBuffer
objects for this kind of stuff. It's not very fast, but if you want to get out pixel information easily, it's the easiest way to do it. It's stored in the Raster
of the BufferedImage
.
Upvotes: 0
Reputation: 18601
You might want to take a look at the following classes:
Depending on the image formats you might also have to look (I hope not) at JAI
and JAI-imageio
.
Upvotes: 1
Reputation: 4280
I don't know matlab, but I worked with Java image processing a lot... Java standard library provides tons of methods to work with images on low level. You can access image pixels through BufferedImage. Make sure to read and understand the classes BufferedImageOp, RasterOp and ConvolveOp otherwise you may end up reinventing stuff.
The best examples for java image processing are on http://www.jhlabs.com/ There you can also find open source image editor and the source code for all the image effect demos.
Upvotes: 3
Reputation: 2311
Look at BufferedImages. You can load/save/edit images with it
http://download.oracle.com/javase/6/docs/api/java/awt/image/BufferedImage.html
http://download.oracle.com/javase/tutorial/2d/images/index.html
Upvotes: 2