• Post Reply Bookmark Topic Watch Topic
  • New Topic

Graphics Help  RSS feed

 
AliKuli Khan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do we read a jpeg image in java and retrieve geometric shapes present in the image.e.g if we read an image from some tomb then how will we be able to recognize/identify the pattern or retrieve the geometric shapes present in the image???
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Reading a JPEG image is very easy, you can do that with the ImageIO API (lookup the documentation of the javax.imageio package). You can do that with one line of code.

But a JPEG image is just a rectangle of pixels; recognising geometric shapes from a bitmap is a far from trivial problem, it requires sophisticated image processing techniques. See for example Computer vision.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a somewhat easier start, instead of detecting objects you may want to look into edge detection. Various algorithms for that problem exist that are comparatively easy to implement.
 
AliKuli Khan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a project to do which is:

Analysis of geometric designs of crystal/glass on walls of Monuments and tombs

Requirements are :

# Retrieve geometric shapes with in a jpg image
# Find the symmetry of geometric shapes
# Simulate the missing part within the image

So i need help in this regard as to where should I start and then what path should I follow in order to achieve my objective in time....???
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd start with edge detection, as previously mentioned.
 
AliKuli Khan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Where can i find some edge detection help from???
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know, did you consider searching the web for "edge detection algorithms"?

Note that natural JPEG artifacts can wreak havoc with some of them (maybe all, I don't know).
 
Bert Wilkinson
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The project you describe is a moderately complex computer vision / image processing task. What tools do you have and what are the means by which you are asked to do this project? Within C, there is a good Computer Vision library, called OpenCV that can get you started, but you've got a long road ahead if you haven't used it. I'm not sure which Java libraries do image processing, but I'm sure there are some. MATLAB and a few other products do image processing as well.....all of this presumes you are quite proficient in either java or C.
 
AliKuli Khan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am an intermediate level programmer both in C++ and Java.But i want to use Java as Java is relatively better in terms of its open source technology.I may be wrong but I think Java provides you easy to use APIs in order to accomplish your tasks...!!!
So what should be done now...??? I am just at initial phases, studying the project and gathering all resources and understanding what i have to do.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AliKuli Khan wrote:So what should be done now...???

As already hinted at by the responses above, you should first get a clear idea of the science, algorithms and technology that's involved with what you want to do - image processing, edge detection, object recognition, feature detection etc.

That's all independent of whatever programming language you're going to use.

First think of exactly what your program needs to do and how it's going to do it before even thinking about writing code or what programming language to use.
 
AliKuli Khan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks a lot
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!