|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmath.Mat2
public abstract class Mat2
Constructor Summary | |
---|---|
Mat2()
|
Method Summary | |
---|---|
static void |
add(float[][] c,
int i)
|
static void |
add(short[][] c,
int i)
c = c + i |
static short[][] |
cat(short[][] a,
short[][] b)
Concatenate a and b to obtain a new matrix. |
static short |
clip(short i)
|
static short[][] |
clip(short[][] i)
|
static int[][] |
copy(int[][] r)
|
static short[][] |
copy(short[][] r)
|
static short[][] |
copyArray(short[][] a)
|
static boolean |
equal(short[][] a,
short[][] b)
|
static float[] |
get1d(float[][] f)
Convert a 2D array into a 1D array |
static float[][] |
get2d(float[] f,
int width,
int height)
Convert a 1D array into a 2D array |
static double |
getAverage(double[][] a)
Compute the avg value of the array. |
static double[] |
getAverage(double[] a,
double[] b,
double[] c)
|
static double |
getAverage(float[][] a)
Compute the avg value of the array. |
static double |
getAverage(short[][] a)
Compute the avg value of the array. |
static float[][] |
getAverageFloat(int r,
int c)
|
static double |
getGeometricMean(short[][] a)
|
static short[][] |
getIdentity(int r,
int c)
|
static double[][] |
getIdentityDouble(int r,
int c)
|
static float[][] |
getIdentityFloat(int r,
int c)
|
static int[][] |
getInt2(int[] pels,
int width,
int height)
|
static float[][] |
getLocalImage(float[][] r,
int uu,
int vv,
int w,
int h)
|
static float |
getMax(float[][] array)
|
static float |
getMax(float[][] rcorr,
float[][] gcorr,
float[][] bcorr)
|
static short |
getMax(short[][] a)
|
static short |
getMin(short[][] k)
|
static short[][] |
getSampleSquareMatrix(int n)
|
static short[][] |
getShort(byte[][] a)
|
static short[][] |
getShort(short[][] a)
|
static double |
getStandardDeviation(float[][] a)
|
static double |
getStandardDeviation(short[][] a)
Compute the Standard Deviation of the array. |
static double |
getSum(double[][] a)
|
static double |
getSum(float[][] a)
|
static double |
getSum(short[][] a)
|
static double |
getVariance(float[][] a)
|
static double |
getVariance(short[][] a)
|
static short[][] |
grow(short[][] in,
java.awt.Dimension dimension,
int borderType)
|
static void |
main(java.lang.String[] args)
|
static double |
mean(short[][] a)
|
static short |
median(java.util.Vector v)
|
static float[][] |
multiply(float[][] f,
float r1)
|
static void |
multiply(short[][] r,
short[][] r1)
r = r * r1; This is a 4x4X4x4 giving a 4x4. |
static void |
normalize(double[][] a)
|
static void |
normalize(float[][] a)
|
static float[][] |
normalize(short[][] a)
|
static int |
numberOfNonZeros(short[][] k)
|
static void |
print(double[][] a)
|
static void |
print(float[][] a)
|
static void |
print(int[][] a)
|
static void |
print(short[][] a)
|
static void |
printArray(double[][] k,
java.lang.String name)
|
static void |
printKernel(double[][] k,
java.lang.String name)
|
static void |
printKernel(float[][] k,
java.lang.String name)
|
static void |
printKernel(short[][] k,
java.lang.String name)
|
static void |
printMaple(float[][] a)
|
static void |
printMaple(short[][] a)
|
static void |
printMedian(int[][] k,
java.lang.String name)
|
static void |
printMedian(short[][] k,
java.lang.String name)
|
static void |
printStats(float[][] a)
|
static void |
printStats(java.lang.String title,
float[][] a)
|
static short[][] |
quadSwap(short[][] r)
Centers the image by translating the image to the center. |
static void |
removeTheDcComponent(float[][] r)
Compute the average and remove it from the input 2D mat. |
static void |
removeTheDcComponent(short[][] r)
Compute the average and remove it from the input 2D mat. |
static short[][] |
resample(short[][] a,
int ratio)
|
static void |
scale(double[][] a,
double k)
|
static void |
scale(float[][] a,
double k)
|
static void |
scale(float[][] a,
float k)
|
static float[][] |
scale(short[][] a,
float k)
|
static short[][] |
scale(short[][] a,
short k)
|
static float[][] |
shortMatrixToFloat(short[][] sm)
|
static float[][] |
shortToFloat(short[][] a)
|
static short[][] |
subtract(short[][] a,
short[][] b)
c = a - b |
static float[][] |
subtractMean(float[][] r,
int uu,
int vv,
int w,
int h)
|
static void |
testQuickSort()
|
static void |
threshold(short[][] a)
|
static void |
threshold(short[][] a,
short thresh)
|
static boolean[][] |
transpose(boolean[][] src)
|
static byte[][] |
transpose(byte[][] src)
returns the Transposition of a 2-D byte matrix of any size. |
static char[][] |
transpose(char[][] src)
returns the Transposition of a 2-D char matrix of any size. |
static double[][] |
transpose(double[][] src)
returns the Transposition of a 2-D double matrix of any size. |
static float[][] |
transpose(float[][] src)
returns the Transposition of a 2-D float matrix of any size. |
static int[][] |
transpose(int[][] src)
returns the Transposition of a 2-D int matrix of any size. |
static long[][] |
transpose(long[][] src)
returns the Transposition of a 2-D long matrix of any size. |
static java.lang.Object[][] |
transpose(java.lang.Object[][] src)
returns the Transposition of a 2-D Object matrix of any size. |
static short[][] |
transpose(short[][] src)
returns the Transposition of a 2-D short matrix of any size. |
static java.lang.String[][] |
transpose(java.lang.String[][] src)
returns the Transposition of a 2-D String matrix of any size. |
static double |
variance(short[][] a)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Mat2()
Method Detail |
---|
public static boolean equal(short[][] a, short[][] b)
a
- must be the same size as bb
- must be the same size as a
public static short[][] getSampleSquareMatrix(int n)
public static double getGeometricMean(short[][] a)
public static void print(double[][] a)
public static void printStats(java.lang.String title, float[][] a)
public static void printStats(float[][] a)
public static void print(float[][] a)
public static void print(int[][] a)
public static short getMin(short[][] k)
public static short getMax(short[][] a)
public static void print(short[][] a)
public static double getSum(double[][] a)
public static double getSum(float[][] a)
a
- 2D array of float
a
.public static double getSum(short[][] a)
a
- two dim array of shorts
a
.public static short[][] getShort(byte[][] a)
public static short[][] getShort(short[][] a)
public static short clip(short i)
public static short[][] clip(short[][] i)
public static void normalize(double[][] a)
public static float[][] normalize(short[][] a)
public static void normalize(float[][] a)
public static double getAverage(double[][] a)
a
- rectangular array
public static double getAverage(float[][] a)
a
- rectangular array
public static double getAverage(short[][] a)
a
- rectangular array
public static double getStandardDeviation(short[][] a)
a
- rectangular array
public static void threshold(short[][] a, short thresh)
public static void threshold(short[][] a)
public static void printKernel(float[][] k, java.lang.String name)
public static void printArray(double[][] k, java.lang.String name)
public static void printKernel(double[][] k, java.lang.String name)
public static void printKernel(short[][] k, java.lang.String name)
public static double[][] transpose(double[][] src)
src
- : the source array
public static float[][] scale(short[][] a, float k)
public static short[][] scale(short[][] a, short k)
public static void scale(double[][] a, double k)
public static void scale(float[][] a, float k)
public static void scale(float[][] a, double k)
public static float[][] shortToFloat(short[][] a)
public static short[][] copyArray(short[][] a)
public static double getStandardDeviation(float[][] a)
public static double getVariance(float[][] a)
public static double getVariance(short[][] a)
public static double[] getAverage(double[] a, double[] b, double[] c)
public static short[][] copy(short[][] r)
public static short median(java.util.Vector v)
public static void testQuickSort()
public static int numberOfNonZeros(short[][] k)
public static void printMedian(short[][] k, java.lang.String name)
public static void printMaple(short[][] a)
public static void printMaple(float[][] a)
public static short[][] subtract(short[][] a, short[][] b)
a
- a 2d array of short, possibly from a shortImageBeanb
- another 2d array of short
public static short[][] resample(short[][] a, int ratio)
public static boolean[][] transpose(boolean[][] src)
public static byte[][] transpose(byte[][] src)
src
- : the source array
transpose(Object[][])
public static short[][] transpose(short[][] src)
src
- : the source array
transpose(Object[][])
public static int[][] transpose(int[][] src)
src
- : the source array
transpose(Object[][])
public static long[][] transpose(long[][] src)
src
- : the source array
transpose(Object[][])
public static float[][] transpose(float[][] src)
src
- : the source array
transpose(Object[][])
public static char[][] transpose(char[][] src)
src
- : the source array
transpose(Object[][])
,
transpose(String[][])
public static java.lang.String[][] transpose(java.lang.String[][] src)
src
- : the source array
transpose(Object[][])
,
transpose(char[][])
public static java.lang.Object[][] transpose(java.lang.Object[][] src)
src
- : the source array
public static short[][] grow(short[][] in, java.awt.Dimension dimension, int borderType)
public static short[][] getIdentity(int r, int c)
public static double[][] getIdentityDouble(int r, int c)
public static float[][] getIdentityFloat(int r, int c)
public static float[][] getAverageFloat(int r, int c)
public static int[][] getInt2(int[] pels, int width, int height)
public static short[][] quadSwap(short[][] r)
q1 q2
q3 q4
becomes:
q4 q3
q2 q1
QuadSwap destroys its argument.
- Parameters:
r
- 2D array of short, perhaps the output of an fft needing a quad swap
- Returns:
- new 2D array of short with the quads swaped
public static void removeTheDcComponent(short[][] r)
r
- non-negative array of shorts.public static void removeTheDcComponent(float[][] r)
r
- non-negative array of shorts.public static void multiply(short[][] r, short[][] r1)
r
- 2d short array, changed as a side effect of the invocationr1
- 2d short array, used as the object of the multiply.public static void add(float[][] c, int i)
public static void add(short[][] c, int i)
c
- is altered as a side effecti
- is the offsetpublic static double mean(short[][] a)
public static double variance(short[][] a)
public static int[][] copy(int[][] r)
public static void printMedian(int[][] k, java.lang.String name)
public static float[][] shortMatrixToFloat(short[][] sm)
public static float getMax(float[][] array)
public static float getMax(float[][] rcorr, float[][] gcorr, float[][] bcorr)
public static float[][] subtractMean(float[][] r, int uu, int vv, int w, int h)
public static float[][] getLocalImage(float[][] r, int uu, int vv, int w, int h)
public static float[][] multiply(float[][] f, float r1)
public static float[] get1d(float[][] f)
f
- an array of width and height dimension
public static float[][] get2d(float[] f, int width, int height)
f
- the input 1D arraywidth
- width of the output arrayheight
- height of the output array
public static short[][] cat(short[][] a, short[][] b)
a
- is the same number of rows in each columnb
- is the same number of rows in each column
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |