|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sarcommand.fft.FourierTransform
net.sarcommand.fft.FourierTransform2D
public abstract class FourierTransform2D
Field Summary | |
---|---|
protected ComplexSignal |
image
The complex image data. |
Constructor Summary | |
---|---|
FourierTransform2D()
|
Method Summary | |
---|---|
static java.awt.image.BufferedImage |
fourierSignalToGrayscale(ComplexSignal frequencyImage)
Creates a grayscale BufferdImage of type BufferedImage.TYPE_BYTE_GRAY . |
protected void |
getCol(int u,
ComplexSignal signal)
Returns the contents of the column indexed by u in the complex image being computed. |
protected void |
getRow(int v,
ComplexSignal signal)
Returns row number 'v' from the complex image being computed and stores it's contents in 'rowC'. |
static ComplexSignal |
imageToSignal(java.awt.image.BufferedImage image)
Converts the pixels of an image to a complex signal. |
ComplexSignal |
inverseTransform(java.awt.image.BufferedImage image,
net.sarcommand.util.ProgressNotifier notifier)
Applies an inverse fourier transform to this BufferedImage. |
static boolean |
isPowerOf2(java.awt.Dimension size)
Returns true if the given int is a power of two value. |
static boolean |
isPowerOf2(int length)
Returns true if the given int is a power of two value. |
protected void |
putCol(int u,
ComplexSignal signal)
Stores the contents of the complex vector 'colV' in column number 'u' of the complex image being computed. |
protected void |
putRow(int v,
ComplexSignal signal)
Stores the contents of the complex vector 'rowC' in row number 'v' of the complex image being computed. |
static java.awt.image.BufferedImage |
realToGrayscale(ComplexSignal signal)
Creates a grayscale BufferedImage of type BufferedImage.TYPE_BYTE_GRAY from the given
complex signal. |
static void |
shiftQuadrants(byte[] pixels,
int width,
int height)
Performs a quadrant shift. |
ComplexSignal |
transform(java.awt.image.BufferedImage image,
net.sarcommand.util.ProgressNotifier notifier)
Transforms this BufferedImage to a frequencyImage. |
Methods inherited from class net.sarcommand.fft.FourierTransform |
---|
computeUnityRoot, convertToBytes, inverseTransform, transform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ComplexSignal image
Constructor Detail |
---|
public FourierTransform2D()
Method Detail |
---|
public static void shiftQuadrants(byte[] pixels, int width, int height)
pixels
- Pixels of the image to shift.width
- The image's width.height
- The image's height.public static java.awt.image.BufferedImage fourierSignalToGrayscale(ComplexSignal frequencyImage)
BufferedImage.TYPE_BYTE_GRAY
. Therefore,
the frequency values will be scaled to a range of 0-255 and a quadrant shift
will be applied afterwards.
frequencyImage
- Frequency image to use as source.
public static java.awt.image.BufferedImage realToGrayscale(ComplexSignal signal)
BufferedImage.TYPE_BYTE_GRAY
from the given
complex signal. It will be assumed that the signal only holds real numbers as components.
signal
- Signal to convert
public static ComplexSignal imageToSignal(java.awt.image.BufferedImage image) throws java.lang.IllegalArgumentException
image
- Image to convert.
java.lang.IllegalArgumentException
- If an unknown image type was specified.public ComplexSignal transform(java.awt.image.BufferedImage image, net.sarcommand.util.ProgressNotifier notifier) throws java.lang.IllegalArgumentException
image
- Image to transform.
java.lang.IllegalArgumentException
public ComplexSignal inverseTransform(java.awt.image.BufferedImage image, net.sarcommand.util.ProgressNotifier notifier) throws java.lang.IllegalArgumentException
image
- Image to transform.
java.lang.IllegalArgumentException
protected void getRow(int v, ComplexSignal signal)
v
- Index of row to retrieve.protected void putRow(int v, ComplexSignal signal)
v
- Index of row to store.protected void getCol(int u, ComplexSignal signal)
u
- Index of column to retrieve.protected void putCol(int u, ComplexSignal signal)
u
- Index of column to store.public static boolean isPowerOf2(int length)
length
- Signal width to be checked.
public static boolean isPowerOf2(java.awt.Dimension size)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |