2

Any suggestions for Java image manipulation libraries? I want to find a way of getting the coordinates of say, a line.

Thanks.

Jack H
  • 2,440
  • 4
  • 40
  • 63
  • 1
    I am not clear on question.. you want to scan an image and find line shape in it? – Dileep Jun 17 '11 at 12:11
  • Yeah, basically, take an image that has just a line, and find each coordinate of that line. – Jack H Jun 17 '11 at 12:15
  • So you want to find the endpoints of a line embedded in an image? Is there noise in the image? Is this a vector graphics image or a bitmap image? – Pace Jun 17 '11 at 12:19
  • I want to find the coordinates of each pixel in the line. Also, I will be working with Vectors. Thanks. – Jack H Jun 17 '11 at 12:24
  • This [post](http://stackoverflow.com/questions/3932618/java-image-analysis-counting-vertical-lines/17839000#17839000) discusses and present a solution for the same problem. – Gabriel Archanjo Jul 25 '13 at 15:05

5 Answers5

2

Haven't used it myself, but ImageJ seems to be a pretty good choice for image analysis and processing.

vehk
  • 926
  • 7
  • 7
2
Radim Burget
  • 1,456
  • 2
  • 20
  • 39
Radim Burget
  • 232
  • 2
  • 5
1

After reading your comments it seems you need Vector manipulation stuff.

JTS is very popular in this field. Take a look at it - http://www.vividsolutions.com/jts/jtshome.htm . JTS Topology Suite is an API of 2D spatial predicates and functions. Also its Free and Open Source.

Your question is bit confusing. When you say "Image Manipulation" many people will think of scalars.

Chetan Gole
  • 703
  • 2
  • 14
  • 26
0

Java is fine for vector calculations on modern hardware. Unfortunately, raster libraries written purely in Java (e.g. ImageJ) is much slower compared to their native counterparts. From what I can see, this happens because:

  • It's impossible to use vector CPU instructions;
  • Extra bounds checks when iterating over pixel arrays;
  • Garbage Collector that may start working in the middle of your algorithm.

After trying several approaches, we ended with a native library based on FreeImage and TurboJPEG that does processing for us. Our java app (Visual Watermark) calls it via JNI interface.

Ivan Nikitin
  • 3,578
  • 27
  • 39
0

see following website for more info

http://www.jhlabs.com/

fmucar
  • 14,361
  • 2
  • 45
  • 50