Java2D Image Manipulation!



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
.



Relevant Pages

  • Re: Filtering kernel width
    ... , how wide should the window be, ... function leaves a realizable filter of finite size: ... However it doesn't seem to really explain how many pixels you ... Assume a 1D binomial kernel ...
    (comp.graphics.algorithms)
  • Re: need some help with custom filter in Photoshop
    ... the coefficients the weighting of the corresponding pixels in the input image, ... summing follwoed by a scaling operation implicit in the kernel. ... input image, and creating an output image from the input pixels. ... For instance, corner pixels may get weight 1, orthogonal pixels weight ...
    (sci.astro.amateur)
  • Re: what is the Nyuist rate of an image?
    ... Do you mean to shift by 0.5 of the diagonal distance between pixels in a ... Use the 1D kernel only in the diagonal direction to directly shift. ...
    (sci.image.processing)
  • Re: HDD-Verschluesselung: Bootcode verifizieren?
    ... Der modifizierte Kernel fängt dann z.B. meine Passphrase ab und ... ... Wie sichert ihr also das Bootmedium gegen Manipulation? ...
    (de.org.ccc)
  • Re: Magic kernel for image zoom resampling?
    ... with filters and sinc functions, didn't do a good job of it, and went ... pixels in the upsampled image, or in other words that the kernel, from ... the upsampled image's point of view, is 3m pixels wide. ... The parabolas on either end reduce to zero at the extremes. ...
    (sci.image.processing)