Extracting image pixel values in google appengine - java

I am working on google appengine to create a tool for comparing image similarity.
I need to extract the pixel values of each image to perform this.
Unfortunately appengine does not support the java image libs.So I am unable to proceed.
Is there any appengine safe image library in java capable of extracting image data?
I saw some techniques in python but dont want to switch to python if I can do it in java somehow...

GAEJ has its own graphic library with fairly limited features and java.awt.image.BufferedImage is a restricted class (ie, java.awt.Image is not supported and still not present in the Jre Class White List ).
There's an open issue here, that you might want to star.
EDIT:
Somebody has patched pngj to work with InputStream.(You could use it to read a PNG pixel by pixel)

The new version of pngj now an alternative pngj-sandbox.jar that only references whitelisted classes, it should run in google-app-engine.

can https://github.com/witwall/appengine-awt help to you? i believe it willbe enough to add theis lib as dependency to the project to make BufferedImage working (but havent' tried this yet)

Related

Basic image manipulation (open, copy, crop, paste) in Java or Android

I'm creating an android apps that use basic image manipulation (open image,copy, crop, paste).
Basically, the program will have multiple image input and it will be manipulated(copy, crop, paste). Then, an output image will be saved. I had done this in python using PIL library and would like to do the same using Java.
So, how do i do this in? Can someone point me a good library that have all the features? Thanks.
Hope this makes your work on this easy. I was going through some links and found this.
Let me know if you need anything else. Thanks.Image Manipulation in Java

Read Character Value from image through java program

Hi All,
As showing i have an image with fields Username & City & Work as in the image. I just want to read these Character fields value from this image with java program.
If any one have any idea about this please let me know
thanks
You can google with Java Character recognition through image and there is also good way to do this with this example. this jar you can use as for testing
Tess4J, a Java wrapper of Tesseract engine, can recognize such images (after rescaling to 300 DPI).
You should start looking into character recognizing libraries like shown here. also, look at this question here
To read the image you can use BufferedImage: http://docs.oracle.com/javase/tutorial/2d/images/loadimage.html
Once you have loaded the image you can run an OCR module to get its text. Here are some examples of OCR software sorted from better to worst: ABBYY (but it is not free), Tesseract, Java OCR, Asprise...
And that is all !!

Merging images in Java FX

I want to merge two JPGs (from the class javafx.scene.image.Image) using JavaFX 2.0.
I think one way should be to convert them somehow into BufferedImage (not sure how to do that), and then make it in the old Java way.
Is there any solution available for this in JavaFX?
Thanks!
I solved the problem. It seems there is no built-in function for this in FX (it should be available soon). I found this post:
http://blog.ngopal.com.np/2011/10/26/save-node-to-image-in-javafx-2-0/
With this class, you can save your node to an image file. I could use the output image as the merged one.
If anyone have a better solution, pease share it.

How can I find where a specific string is on an image?

I was wondering if anyone knew of a way that I could feed an image file to a Python, C or Java program and get back the coordinates of where a specific string appears on the image?
What you're talking about is called Optical Character Recognition, or OCR.
OCR isn't easy to implement from scratch, but there are libraries out there. OpenCV can be used for OCR.
I looked into this a bit more. It turns out that sikuli does exactly what I needed.

What are some good java image processing tools or APIs?

I want to build an upload applet / desktop client that can resize - trim and then send an image to my amazon s3 bucket.
Trimming my images has proven to take the longest and be the most cpu intensive. On my server when a user uploads a image using an html form I use imagemagick command line tools to do the trim and resize.
What tools would you guys recommend using?
Edit: I need to be able to automatically crop images. Something similar to the imagemagick trim function.
I would recommend that you check out JAI.
Specifically check out the classes CropDescriptor, ScaleDescriptor and their static methods.
Also, take a look at the subclasses of OperationDescriptorImpl, they will give you an idea of the types of operations JAI is capable of.

Categories