Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Images and Array 1

Status
Not open for further replies.

Chrissirhc

Programmer
May 20, 2000
926
GB
Hello
I want to load an image and then turn it into an array. Java 2D to do this easily but I cannot see how. I need to turn the image into an array or some other type that I can then perform image processing on.
Can anyone help. I will be using black and white or greyscale images.

Thanks in advance
Chris [sig][/sig]
 
turn an image into an array? An array is a static container of data; an image is.. well, an image, a picture. A picture can not be an array. You must mean something completely different. [sig]<p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence."[/sig]
 
Of course a picture can be an array...it is just a set of pixels with x,y co-ordinates and a colour value, in its current form it is a blob of data, but I think that Chris wants to turn it into a set of values so that transformations can be done on it.

The set of data produced will be rather large though.

I think that Java allows image processing direct by extending java.awt.image.ImageFilter, for example CropImageFilter. Better to look at this rather than converting your picture into data values. [sig]<p> <br><a href=mailto: > </a><br><a href= home</a><br> [/sig]
 
Thanks. jnicho02 is right. I have looked about and found buffered image which allows me directly manipulte pixel values. Trying to work out how to make a proper binary image if anyone can help there that would be nice. The binary one that exists looks grey scale when I load it up need some help. I still don't really understand how I am going to perform math morphology or houph transform properly on them so if anyone knows about these things could you please post. [sig][/sig]
 
with Java you can process your images (without converting them to binary arrays)... Lookup the documentation for the following classes ...

RGBImageFilter
RGBColorModel - you 've to customize for your preference
ByteLookupTable etc.,

U can do lots of ImmageProcessing(basic level) using these classes.

:)
[sig]<a href=mailto:pondyprem@yahoo.com>pondyprem@yahoo.com</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top