| java.lang.Object examples.wavelet.PixelArray
PixelArray | final public class PixelArray implements ImageObserver(Code) | | This is a simple implementation of the PixelGrabber class
to allow for easier image processing.
Basically, it reads a graphic file and allows you to get
integer arrays from it for convenient processing.
The name of the class comes from the fact that the image
is stored as an internal int[][] array.
This might seem inefficient since the JDK stores images
as an int[] array and that we must go back and forth
between the two formats.
It is indeed slower, but as far as image processing is concerned,
it is much simpler to work with an int[][] array.
Moreover, if the processing is moderatly involved,
it won't make much difference.
author: Daniel Lemire |
Method Summary | |
public static int | RGBtoInt(int r, int g, int b, int a) | public PixelArray[][] | blueFWT(Multiresolution m) Fast Wavelet Transform
This method assumes a dyadic multiresolution.
This implementation is temporary, expect it
to be slow. | public static Image | buildImage(int[][] a) | public Object | clone() | public int | getAlpha(int x, int y) | public int[][] | getAlphaArray(int x, int y) | public int[][] | getArray(int x, int y) | public int | getBlue(int x, int y) | public int[][] | getBlueArray() | public int | getGreen(int x, int y) | public int[][] | getGreenArray() | public int | getHeight() | public int | getRed(int x, int y) | public int[][] | getRedArray() | public int | getWidth() | public PixelArray[][] | greenFWT(Multiresolution m) Fast Wavelet Transform
This method assumes a dyadic multiresolution.
This implementation is temporary, expect it
to be slow. | public boolean | imageUpdate(Image img1, int parm2, int parm3, int parm4, int parm5, int parm6) | public void | invert() | public void | makeBlue() | public void | makeGrayFromBlue() | public void | makeGrayFromGreen() | public void | makeGrayFromRed() | public void | makeGreen() | public void | makeRed() | public Image | rebuildImage() | public PixelArray[][] | redFWT(Multiresolution m) Fast Wavelet Transform
This method assumes a dyadic multiresolution.
This implementation is temporary, expect it
to be slow. | public void | setAlphaArray(int[][] I) | public void | setArray(int[][] s) | public void | setBlueArray(int[][] I) | public void | setGreenArray(int[][] I) | public void | setPixel(int x, int y, int r, int g, int b, int a) | public void | setRedArray(int[][] I) | public synchronized void | waitForImage(Image img) |
PixelArray | public PixelArray(String filename)(Code) | | Constructor
Parameters: filename - file containing the image exception: IllegalArgumentException - if the filecan't be open. Either the format is wrong or thefile cannot be found. |
PixelArray | public PixelArray(URL url)(Code) | | Constructor
Parameters: filename - file containing the image exception: IllegalArgumentException - if the filecan't be open. Either the format is wrong or thefile cannot be found. |
PixelArray | public PixelArray(int[][] I)(Code) | | |
PixelArray | public PixelArray(double[][] D)(Code) | | |
RGBtoInt | public static int RGBtoInt(int r, int g, int b, int a)(Code) | | |
blueFWT | public PixelArray[][] blueFWT(Multiresolution m)(Code) | | Fast Wavelet Transform
This method assumes a dyadic multiresolution.
This implementation is temporary, expect it
to be slow. It is meant to be easily
understood.
One good thing about this method is that
it will handle the boundary automatically
(as long as the chosen Multiresolution
handles them).
Also, it will work with any Multiresolution object.
Only the blue component is treated.
|
buildImage | public static Image buildImage(int[][] a)(Code) | | |
getAlpha | public int getAlpha(int x, int y)(Code) | | |
getAlphaArray | public int[][] getAlphaArray(int x, int y)(Code) | | |
getArray | public int[][] getArray(int x, int y)(Code) | | |
getBlue | public int getBlue(int x, int y)(Code) | | |
getBlueArray | public int[][] getBlueArray()(Code) | | |
getGreen | public int getGreen(int x, int y)(Code) | | |
getGreenArray | public int[][] getGreenArray()(Code) | | |
getHeight | public int getHeight()(Code) | | |
getRed | public int getRed(int x, int y)(Code) | | |
getRedArray | public int[][] getRedArray()(Code) | | |
getWidth | public int getWidth()(Code) | | |
greenFWT | public PixelArray[][] greenFWT(Multiresolution m)(Code) | | Fast Wavelet Transform
This method assumes a dyadic multiresolution.
This implementation is temporary, expect it
to be slow. It is meant to be easily
understood.
One good thing about this method is that
it will handle the boundary automatically
(as long as the chosen Multiresolution
handles them).
Also, it will work with any Multiresolution object.
Only the green component is treated.
|
imageUpdate | public boolean imageUpdate(Image img1, int parm2, int parm3, int parm4, int parm5, int parm6)(Code) | | Part of the interface ImageObserver
|
invert | public void invert()(Code) | | |
makeBlue | public void makeBlue()(Code) | | |
makeGrayFromBlue | public void makeGrayFromBlue()(Code) | | |
makeGrayFromGreen | public void makeGrayFromGreen()(Code) | | |
makeGrayFromRed | public void makeGrayFromRed()(Code) | | |
makeGreen | public void makeGreen()(Code) | | |
makeRed | public void makeRed()(Code) | | |
rebuildImage | public Image rebuildImage()(Code) | | Get the image back
|
redFWT | public PixelArray[][] redFWT(Multiresolution m)(Code) | | Fast Wavelet Transform
This method assumes a dyadic multiresolution.
This implementation is temporary, expect it
to be slow. It is meant to be easily
understood.
One good thing about this method is that
it will handle the boundary automatically
(as long as the chosen Multiresolution
handles them).
Also, it will work with any Multiresolution object.
Only the red component is treated.
|
setAlphaArray | public void setAlphaArray(int[][] I)(Code) | | |
setArray | public void setArray(int[][] s)(Code) | | Allow to change the array
representing the image
exception: IllegalArgumentException - if array doesn't make a matrix |
setBlueArray | public void setBlueArray(int[][] I)(Code) | | |
setGreenArray | public void setGreenArray(int[][] I)(Code) | | |
setPixel | public void setPixel(int x, int y, int r, int g, int b, int a)(Code) | | |
setRedArray | public void setRedArray(int[][] I)(Code) | | |
waitForImage | public synchronized void waitForImage(Image img)(Code) | | |
|
|