views:

388

answers:

2

Hey Guys,

Long time reader never posted until now. Im having some trouble with Android, im implementing a library called JJIL its an open source imaging library.

My problem is this i need to run some analysis on an image and to do so i need to have it in jjil.core.image format and once those processes are complete i need to convert the changed image from jjil.core.image to java.awt.image. I cant seem to find a method of doing this does anyone have any ideas or have any experience with this?

I would be grateful of any help.

Danny

A: 

Hey guys,

I have done some serious research into this and i have found that i can extract the rgb values of a bitmap image with a similar method. But the threshold that i was using the previous library for is now not possible because i have had to abandon the use of this library.

Is there a way to use colour matrix's to threshold the image? Or better still is there an inbuilt method that would do this automatically?

Thank you for any help. Danny

Danny_E
A: 

You should let others know what you found... probably you found that android.graphics.Bitmap has a getPixel(x,y) method that returns an int representing the ARGB value?

http://developer.android.com/reference/android/graphics/Bitmap.html

bigrockshow
Correct, that is exactly what I found.I then compared every argb value to the one I wanted and seperated the background from the foreground.I also used this algorithmMath.cosh(Math.sqrt((((red-green)+(red - blue))/2)* (((red-green)*(red-green))/*squared*/ + ((red-blue)*(green-blue))) ))Which I found in a book that will take rgb values and return them as a degree on the colour wheel.Hope this is useful to someone else
Danny_E