unj2
unj2

Reputation: 53551

Count the number of objects in an Image

I am investigating the possibility of image processing to identify certain objects and also count them in an image.

I will be given a picture and I need to identify the number of boxes present in that image.

Does anybody have any experience with any Machine Vision/ Image Processing libraries like ImageJ, Fiji, JAI, jMagick ,Java Vision Toolkit? Which do you think is best suited for the job? What do you guys suggest? If the APIs can be used from Java, it would be better. Thank you.

Edit: I am dealing with warehouse brown boxes. Yes I am talking about regular photos. The source is usually a mobile phone picture.

Edit2: I am sorry the answer got autoselected. : (

Upvotes: 9

Views: 14382

Answers (5)

Adrian Grigore
Adrian Grigore

Reputation: 33318

If you are not talking about real time image processing, you could write an API to Amazon Mechanical Turk.

Upvotes: 5

Ivan
Ivan

Reputation: 20101

Are you willing to develop your own code for that? There are several techniques that can be applied and tuned to your specific problem, but I never used a packaged library, always developed my own code. I can provide references for that if you're interested.

Upvotes: 1

mdma
mdma

Reputation: 57787

In Java, there are several projects that extend the Java Advanced Imaging API to provide computer vision:

  • JavaVis
  • image processing in java + IPJ - computer vision extensions for JAI
  • Java Vision Toolkit - JVT (EDIT: opps, this is mentioned in the question.)

There is a paper for JavaVis which introduces the library, compares and constrasts with these other two libraries mentioned.

JavaVis has these features:

  • handles 2D and 3D images (3D being most relevant in this case)
  • Has a GUI for inspecting potential results
  • Matlab image export

Also for java is NeatVision. Unlike the others, documentation is clearly visible for this project.

None of these projects are going to give you a simple turnkey solution. You will need to understand how computer vision works, and create a sequence of processing steps on the photos to help get the best results from the vision algorithms. To that end, JavaVis maybe most useful, since it is aimed towards teaching computer vision.

Upvotes: 5

George Profenza
George Profenza

Reputation: 51847

If you must stick to Java, you can still use OpenCV.

  1. If it's just boxes you can use Hough Transforms to detect them.
  2. You can use OpenSURF to detect phones based on source images you feed to it.
  3. Don't think this would be feasible in your case: HAAR Cascades. You could create a custom HAAR clasifier, but the training process can be quite time consuming.

HTH, George

Upvotes: 8

Tansir1
Tansir1

Reputation: 1819

I have never used the libraries you listed but I have used OpenCV.

OpenCV is a well supported and proven computer vision library. It has built in features to count the number of primitive shapes in an image. It is written in C++ but you could create a small wrapper to be invoked via JNI.

RoboRealm is another proven computer vision system used by robotic hobbyists. It is a closed source commercial product that uses a socket based control API.

http://opencv.willowgarage.com/wiki/FullOpenCVWiki

http://www.roborealm.com/index.php

Upvotes: 10

Related Questions