bijfit
Class Maximum

java.lang.Object
  |
  +--bijfit.Maximum

public class Maximum
extends java.lang.Object

This class implements methods to find the maximum pixel value and the location of the maximum value in vectors and 2D images. Copyright (c) 1999-2003, Michael Abramoff. All rights reserved.


Field Summary
(package private) static float mag
          The magnitude of the peak as found by findSubpixel
 
Constructor Summary
Maximum()
           
 
Method Summary
static int find(float[] v)
          Find the index of the maximum in a vector.
static int[] find(float[] image, int width)
          Find the integer position of the maximum in an image of width pixels, i.e.
static float[] findSubpixel(float[] image, int width)
          Find the location of the maximum value in image relative to the center of the image at 0,0) with subpixel accuracy by fitting a quadratic curve to the peak.
static float peakMag()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mag

static float mag
The magnitude of the peak as found by findSubpixel
Constructor Detail

Maximum

public Maximum()
Method Detail

findSubpixel

public static float[] findSubpixel(float[] image,
                                   int width)
Find the location of the maximum value in image relative to the center of the image at 0,0) with subpixel accuracy by fitting a quadratic curve to the peak.
Parameters:
image - an image vector
width - the width of image.
Returns:
a float[2] with [0] containing the x distance and [1] containing the y distance to the center at 0,0.

find

public static int[] find(float[] image,
                         int width)
Find the integer position of the maximum in an image of width pixels, i.e. the position of the maximum element of the vector image, relative to the upper left corner of the image.
Parameters:
image - a vector of float[]
width - the width of image
Returns:
an int[2] with the x-position of the peak in [0], the y position in [1], relative to 0,0.

find

public static int find(float[] v)
Find the index of the maximum in a vector.
Parameters:
v - a vector of float[]
Returns:
the index of the maximum in v.

peakMag

public static float peakMag()