|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--bijnum.BIJfht
This class implements the fast Hartley transform on images (real float matrices). It also includes some utility functions for dealing with Hartley transforms, especially for correlation. This class implements the commands in the Process/FFT submenu. It 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-2003, Michael Abramoff. All rights reserved.
Field Summary | |
protected int[] |
bitrev
|
protected float[] |
C
Static variables used in BIJfht algorithms. |
protected int |
maxN
|
protected float[] |
S
|
protected float[] |
tempArr
|
Constructor Summary | |
BIJfht(int length)
Set up a BIJfht for matrices of size length = maxNxmaxN |
Method Summary | |
(package private) void |
BitRevRArr(float[] x,
int base,
int bitlen,
int maxN)
|
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. |
(package private) void |
dfht3(float[] x,
int base,
boolean inverse,
int maxN)
|
protected void |
fhtps(int row,
int maxN,
float[] BIJfht,
float[] ps)
Calculate the Power Spectrum of one row from 2D Hartley Transform. |
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. |
(package private) int |
log2(int x)
|
protected void |
makeBitReverseTable(int maxN)
|
protected void |
makeSinCosTables(int maxN)
|
protected void |
progress(double percent)
Can be used to show progress in other programs. |
(package private) void |
rc2DFHT(float[] x,
boolean inverse,
int maxN)
Row-column Fast Hartley Transform |
(package private) void |
transposeR(float[] x,
int maxN)
|
Methods inherited from class java.lang.Object |
|
Field Detail |
protected float[] C
protected float[] S
protected int[] bitrev
protected int maxN
protected float[] tempArr
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 |
protected void progress(double percent)
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.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.protected void makeSinCosTables(int maxN)
protected void makeBitReverseTable(int maxN)
void rc2DFHT(float[] x, boolean inverse, int maxN)
void dfht3(float[] x, int base, boolean inverse, int maxN)
void transposeR(float[] x, int maxN)
int log2(int x)
void BitRevRArr(float[] x, int base, int bitlen, int maxN)
public byte[] getPowerSpectrum(float[] BIJfht)
protected void fhtps(int row, int maxN, float[] BIJfht, float[] ps)
|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |