What Is the Best Java Image Processing Library/Approach

What is the best java image processing library/approach?

There's ImageJ, which boasts to be the

world's fastest pure Java image
processing program

It can be used as a library in another application. It's architecture is not brilliant, but it does basic image processing tasks.

best image processing library for java

Catalano Framework is the best lib in image processing for java. It works in Android too with the same code.
Example:

FastBitmap fb = new FastBitmap("c:\\yourImage.bmp");

fb.toGrayscale();

Threshold t = new Threshold(120);
t.applyInPlace(fb);

// Your objects.
BlobDetection bd = new BlobDetection();
ArrayList<Blob> blobs = bd.ProcessImage(fb);

What is the best Java Image Processing Library that is Comercially Opensource/Free for low level pixel manipulation?

-- Edited in response to comments --

While you may understand signal processing, the application of signal processing to images, or image processing is something you should pay attention to if you intend to leverage your signal processing to images in a non-wasteful (reinvent the wheel) manner.

"Writing it from scratch", using the 2D API performs grayscale color space translation in about 4 lines. Not too heavy price to pay. From page 175.

public static Color coverToGrayscale(Color color) {
ColorSpace graySpace = ColorSpace.getInstance(ColorSpace.CS_GRAY);
float[] gray = color.getColorComponents(graySpace, null);
return new Color(graySpace, gray, 1.0f);
}

Convolutions are handled in chapter 10. The convolution exercise demonstrates a 3x3 blur kernel on pages 206-208. The framework can be used for any kind of convolution.

Hugh Transforms are not to be found in a typical image-processing library. Look to an edge detection / object detection library. If you port / modify a Fernandes / Oliveira styled algorithm, you can even leverage the kernel engine of the 2D API to render an image representing the findings of the transform.

Getting the pixel data as an array is an odd requirement. It's already in array format.

Again, I recommend the book, and a week to read it. It will literally save you weeks of programming time, if you attempt a "try to learn it as you go" approach using the lower level concepts of signal processing. That said, when you get to the kernel engine particulars, your signal processing knowledge is going to pay off in spades.

-- Original post follows --

It seems that there are two sides to this question. One is specifically about an open source Java API for low level image manipulation, the other is for more general documentation concerning low level image manipulation (color models, etc.).

I would recommend that you obtain a copy of "Java 2D Graphics" by Jonathan Knudsen. It is a bit out-of-date when it talks about non Java 2D constructs (the examples chain into the drawing subsystem the outdated way, and they don't launch the windows in a thread-safe manner); however, it is a good learning reference for the actual 2D graphics system, which hasn't changed.

In this book, it goes into color models in detail, and other low level pixel related items (font hints, antialiasing, transformation, etc). As such it can be a very valuable tool.

The 2D API is part of the Java standard libraries. There is no need for a "lower" image processing library, but depending on your needs, you might want a library to lie above it (and simplify common image processing tasks). Once you have a grasp of the primitives, perhaps you can find one of the previously reviewed libraries to have sufficient documentation to achieve your needs.

Is there a java library for image?

You can use the standard Image class part of Java libraries.
Scaling images should be fairly easy by using Image.getScaledInstance(int width, int height, int hints)

Image processing library for Android and Java

The answers on this page are quite dated as of February 2014. I was searching to find a free Android image processing library and I came across the Stanford lecture notes here: http://www.stanford.edu/class/ee368/Android/index.html

Investigating a bit further, I found out that they are using OpenCV in their course material. It has a Java interface (along with many other languages), but the library is written natively in C++. They state that:

Along with well-established companies like Google, Yahoo, Microsoft,
Intel, IBM, Sony, Honda, Toyota that employ the library, there are
many startups such as Applied Minds, VideoSurf, and Zeitera, that make
extensive use of OpenCV.

I am excited(!) to have found this, looking forward to going home and giving it a go.

Java image manipulation libraries?

  • IMAGEJ: http://rsbweb.nih.gov/ij/
  • BoofCV: http://boofcv.org
  • Fiji: http://fiji.sc/wiki/index.php/Fiji
  • Rapidminer with IMMI: http://www.burgsys.com/image-mining

Java Open Source Image Optimization libraries

Seems like there aren't many open source java libraries dedicated to image optimization. But there are quite many libraries offering image optimization as part of their features.

For example:

im4java is a pure java library offers interfaces to ImageMagick, which can be used to optimize images.

ImageJ, it can be used as a library according to this answer

Java library to compare image similarity

You could take a look at two answers on SO itself: this one is about image comparison itself, offering links to stuff in C++ (if I read correctly) while this one offers links to broader approaches, one being in C.

I would suggest starting with the second link since there's links on that discussion that'll lead to implementation code of some relevant techniques which you might be able to "translate" into Java yourself.

That's the best my google skills could do, no Java though - sorry. I hope it's a good starting point!

EDIT:
Here's someone with your problem who wrote his own comparison class in Java. I didn't read the source code though. He expressly states that he couldn't find Java libraries for that purpose either, so that's why he wrote it himself.

Oh, and this question on SO has probably the best links on this, all regarding Java libraries of image processing. Hopefully there's one amongst them that can compare images for similarity.

Ok, last edit:
The Java Image Processing Cookbook shows a Java implementation of a basic algorithm to determine the difference between two pictures. It also has an email to contact the guy who wrote it as well as a host of references. No library though.

EDIT after reading your comment to your question:
Unless you've already checked all of the above links, since what you want seems to be checking whether two images are equal, I would suggest starting with the Java Image Processing Cookbook (since that has an implementation of an algorithm in Java to check for equal images) and the last link to an SO question. Also, check PerceptualImageDiff and the source code of that project (C++); it sounds really nifty - it's apparently supposed to check whether two images look equal to the human visual system.



Related Topics



Leave a reply



Submit