Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / May 2005

Tip: Looking for answers? Try searching our database.

Java2D Image Manipulation!

Thread view: 
JVIajesty - 11 May 2005 19:39 GMT
Hi everybody! I'm actually a new member and I'd like to ask you "some"
questions:

First of all, I'm creating an image manipulation software, for image
analysis, but there is some trouble in the implementation. In fact I
wonder the architecture I need to choose (how to load images
efficiently, how manipulate them, etc).

First some little explanations on how it looks like:

 The main GUI is a JSplitPane including:

 [left  pane] a JPanel holding some info's about the image
 [right pane] a tabbedPane where I put loaded images in its own tab

 and below fits another JPanel for filter propreties. So:

 1.a I need to load an image and to be able to select some portions,
or regions of it. How can I do that?

   ex: I select a rectagular region and I want it to be white and 50%
transparency and to be able to move it.

   Is there a way I can move this object and how?
   Is there some sort of "layers control" in Java2D? Because I can
draw on my BufferedImage but I haven't found how to delete the drawn
rectangle. Does anyone have a sample code?

 1.b I need to create more than one selection regions. And be able to
move them. Any hints how?

 2. I need to get the pixel data from the region I choose. Which
method should for showing images is best? Is BufferedImage enough? Or
is there other ones far better?

 3. I need to be able to filter the image, and for that I found two
ways: either by Convultion Kernels (matrices from 3*3 to 9*9 and
higher) or by manipulation of a byte type array [width*height] holding
a Vector including the 3 colors data (R,G,B) and matrix operations.

    So my question is: is it better (in term of performance) to load
the entire image in memory, or to parse the image with a Kernel. For
bigger images it the first method seems unusable because of the size of
the array. How could I do it?

 4. On the other hand, if I use the Kernel methods, can I choose the
exact location where I want the kernel to apply.

    ex: I choose a 3*3 Kernel, and I want the centre of it to be at
(10px,50px) in my image. And to compute there. Is it possible, and if
yes, how?

 5. How can I get the image information in that case (ex: I want to
count the number of red pixels in that kernel, or I want to count the
number of pixels that are too bright) if the image is not in memory (is
that what BufferReader does?) CropImage?

Well, thanks for reading the whole post. If someone could answer my
questions (not all of course) it would be really great. I will continue
my investigations and keep this post updated. Thanks in advance!

Regards,

Ad
Ted Hill - 12 May 2005 15:20 GMT
I recommend the book:

"Building Imaging Applications with Java Technology"

It deals with Java2D, JAI, and also Swing.

It will answer many of your questions.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.