|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbijnum.BIJfht
public class BIJfht
This class implements the fast Hartley transform on matrices and vectors (real float matrices). It also includes some utility functions for dealing with Hartley transforms, especially for correlation. This class is based on Arlso Reeves' Pascal implementation of the Fast Hartley Transform from NIH Image (http://rsb.info.nih.gov/ij/docs/ImageFFT/). The Fast Hartley Transform was restricted by U.S. Patent No. 4,646,256, but was placed in the public domain by Stanford University in 1995 and is now freely available. This implementation based in part on the implementation by Wyane Rasband in ImageJ. Copyright (c) 1999-2004, Michael Abramoff. All rights reserved.
| Constructor Summary | |
|---|---|
BIJfht(int length)
Set up a BIJfht for matrices of size length = maxNxmaxN |
|
| Method Summary | |
|---|---|
void |
compute(float[] m,
boolean inverse)
Perform a Fast Hartley Transform on an image BIJfht of maxN x maxN pixels. |
float[] |
crossPowerSpectrum(float[] im1,
float[] im2)
Compute the conjugate product R = IM1* IM2 for real matrices (Hartley transformed) im1 and im2. |
float[] |
crossPowerSpectrum2(float[] im1,
float[] im2,
int maxN)
Alternative method to compute the cross power spectrum (im1* im2) / | im1 im2 | for Hartley (as opposed to Fourier) opposed matrices im1 and im2. |
float[] |
flipquad(float[] m)
Flip quadrants 1 and 3 and quadrants 2 and 4 of an image column vector. |
byte[] |
getPowerSpectrum(float[] BIJfht)
Get the power spectrum of the hartley transform (maxN x maxN pixels) and return as a byte array. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BIJfht(int length)
length: - the square of the size of the matrices (the length of the vector used for storing the matrix).| Method Detail |
|---|
public void compute(float[] m,
boolean inverse)
throws java.lang.IllegalArgumentException
m - the matrix of the image, an array of floatsmaxN - the size of the matrixinverse - a flag whether to perform the forward or inverse transform.
java.lang.IllegalArgumentException
public float[] crossPowerSpectrum(float[] im1,
float[] im2)
im1 - a real Hartley transform of an imageim2 - a real Hartley transform of another imagemaxN - the size of im1 and im2 in pixels. im1 and im2 should be maxN x maxN.
public float[] crossPowerSpectrum2(float[] im1,
float[] im2,
int maxN)
public float[] flipquad(float[] m)
m - an image vector.
public byte[] getPowerSpectrum(float[] BIJfht)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||