Image manipulation - java

I am just wondering what kind of computing/programming language/frameworks are needed to produce images such as the one in http://www.erdas.com/ ?
Programmatically, how does one produce the general spatial analysis images ?
ps: I use java most of the time.
Thanks

First of all, uDIG, OpenJUMP (not sure about this) cannot process images in a way that ERDAS can. These softwares are great, but they do not have extensive raster funcionality.
You need to take a look at GDAL, which covers a bunch of languages and can manipulate imagery.
http://www.gdal.org/
As we speak the PostGIS team is building most of PostGIS WKT Raster funcionality on top of GDAL. It is a fantastic tool and consolidated library.

I'm not sure which image do you mean, but geospatial images can be manipulated by software called GIS. Examples in Java are:
OpenJUMP
uDig
and a spatial manipulation library:
GeoTools

You need to obtain the imagery from a provider and then you analyze it with various tools. For raster you could also look at sextante as a raster analysis library written in Java.
The tools mentioned above are the two best Java Desktop options unless you speak spanish and then I would reccomend gvSIG.

Related

video Image processing , how can i?

So Here is the situation.
I have a video that contain some objects that moves (contract to be more accurate),
I'm trying to write a code to calculate these movements in matter of
Frequency of movements (how many contractions per minute)
How far does the contraction goes in mm.
How can this be done ?? :D!
I use Matlab now to to blot amplitude difference between each frame but its not giving very nice results so far.. (very buggy)
Any tips ? language i should use best, or is there already something exist that can compare different images and plot difference ?
Thanks
You should try Processing using one of these libraries.
Keywords to search for: Blob detection, Computer Vision
The best library for tracking moving objects is OpenCV, which can be used from within Processing, too. Tracking faces for example works like a charm there, but for more abstract shapes you should try another library like BlobDetection!
OpenCV is a great library if you plan to write into C/C++ (or wrapped into JavaCV if you prefer Java). Matlab is a great tool too, especially if you are working on a proof of concept you may want to work with something more friendly and "lighthearted" than C.
If you plan to measure positions or distances I suggest you to use some calibration toolbox to consider intrinsic/extrinsic parameters and eventually camera defects, it will give you more precise results. It is builtin into OpenCV, or take a look here if you plan to use Matlab.
so i'm not expert on this but if you want write something in php you probably would use gd library or imagemagick library also imagemagick utility on linux contains some comparing tool according this http://www.imagemagick.org/script/compare.php

Image Processing on Java

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.
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.
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
You might want to take a look at the following classes:
java.awt.image.BufferedImage
java.awt.image.Raster
javax.imageio.ImageIO
Depending on the image formats you might also have to look (I hope not) at JAI and JAI-imageio.
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/
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.

Getting an image from a game model

So I'm not 100% sure if it's possible, but what I'd like to do is take a model that someone has created for a game, say in Blender or something similar, in various formats, and from that create an image to show on a website.
Are there any Java libraries around that could help me with that? Java3D maybe? Or even something in Flash? Ideally you'd be able to rotate the model in some embedded flash app, but I'd settle for a plain old image.
It depends on how far you want to go. Most models are going to be in a standard format- or can easily be converted to be - and most 3D Apis are able to load these formats in.
It would be a little unusual to do this on a server - you may even need to have OpenGL installed on it - but it should be quite easy to load a model in to a 3D environment and take a snapshot or a series of snapshots quite easily. Possibly even use these to create a short video clip of a complete turn around the model. If you're using Java take a look at some of the things people are working on over at http://www.javagaming.org/ - I don't know that Java3D is in use much still but there are other good 3D java environments around. JMonkeyEngine looked most interesting last time I was exploring that area.
Alternatively you probably can set up a way of loading the model into a clientside environment - I don't know if Flash can do 3D stuff now, but Shockwave certainly can ( although it's horrible to work with ) and I believe the Silverlight stuff likewise. Of course unless you are pregenerating your animations you are likely to be passing the model to your display logic on the client and a savvy user could intercept that, but the risk is probably reasonably low and from your question it's not clear whether that would be a problem to you.
Take a look into this post:
http://techblog.floorplanner.com/2010/01/25/introducing-asblender/
"Enter ASBlender, a library I slapped together in a few days to read Blender’s .blend file format and parse it to AS3."
lucky you! ;)
EDIT: added link for the project:
http://github.com/timknip/asblender
EDIT2: With the asblender library you can parse directly the .blend file (this is the working file, not a exported file format). Once you have the file inside the flash application you can use Papervision (I believe you do the same with other 3d libraries) to render the model, this way you can do a single image of the model or you can let user to see the model rotating. Beware that any of this libraries won't give the same render quality that a 3D application like blender is capable of. The good thing about this library is the capability of reading all the info in the scene, so you can match cameras and lights to be as close as possible to the original .blend file.
Alternatively there are also other parsers like Ase, Collada , DAE, KMZ, Max3DS, MD2, Sketchup, SketchupCollada... all of this inside papervision library.

Is there an API to draw a B-TREE?

That's a simple question: is there an API to draw a B-tree in Java? I just dont want to spend much time reinventing the wheel. I am not having trouble with the algorithm per si, mine works perfectly fine after a lot of reading (specially Lafore's Data Structures & Algorithms in Java), I just dont know how to print a B-tree in a good way.
Thanks in advance.
You've got a couple of options to "render" a graph to screen -
Graphviz has a Java API (Edit: an addon called LJV which gives the API).
I think you ought to be able to use the free version of JGraph to do the same.
I know people have had success with daVinci (now uDraw). I haven't used it since 2003, but from what I remember, you have to generate a bracketed text file for your tree and the program parses it. You should be able to output your text by doing a simple tree traversal.
Have a look at yEd. I'm pretty sure, licensing yFiles just for an API to display tree structures is a bit exaggerated, but the graph editor is free of license costs and you can use it to render your trees. I usually dump my raw graph data in one of the supported file formats, open the output file with yEd and let it do the layout.

Generating and visualising a decision tree

I wonder if anyone is able to help or advise with the following; I have to be able to take data from a data source and to be able to visualise that data as a decision trees on a web page all. This will be a single process which is seamless to an end user.
This will be done using JSPs and Java servlets but what concerns me are the underlying products. I'm thinking of passing the data to a Weka classifier and then doing something with the .dot file it creates, i.e. maybe feeding it to GraphViz or trying to use the Google Visualization API to present an interactive display.
But, can anyone tell me if this is a viable approach or suggest alternatives?
Thanks
Martin O'Shea.
I've had a lot of success creating data flow graphs with graphviz (I uploaded them with a script to a MoinMoin wiki and used the graphviz plugin). That plugin even allowed to have links in the graphs, so we could keep the individual graphs small.
For the UI we have added the JS stuff from http://www.mxgraph.com/ to display larger graphs to the user.
Your approach is viable however. GraphViz is a good tool.

Categories

Resources