net.grelf.grip
Class AccumulatorDouble

java.lang.Object
  extended by net.grelf.grip.ImageBase
      extended by net.grelf.grip.ImageDouble
          extended by net.grelf.grip.AccumulatorDouble
All Implemented Interfaces:
java.lang.Cloneable, Accumulator, Image

public class AccumulatorDouble
extends ImageDouble
implements Accumulator

This is a 64-bits-per-channel floating point Accumulator.


Field Summary
 
Fields inherited from class net.grelf.grip.ImageDouble
data
 
Constructor Summary
AccumulatorDouble(java.awt.image.BufferedImage bim)
          Use the BufferedImage to set the width, height and number of bands (channels) in this Image.
AccumulatorDouble(int width, int height, int nBands)
          Creates image without setting any pixels.
AccumulatorDouble(int width, int height, int nBands, boolean fillWithZeroes)
          Creates image with pixels optionally set to zero.
 
Method Summary
 void addWithStarBoost(java.awt.image.BufferedImage bim, int starBoostFactor)
          For accumulating star trails.
 boolean averageShiftAccumulate(java.awt.image.BufferedImage bim, int imNo, int middleImNo, java.util.List<MatchPair> matches, BlobMeas[][] lookup, int nBrightest)
          For image imNo of a sequence, add the pixel values into the accumulator but first shift the image so that matched point pairs are superimposed.
 boolean brightestShiftAccumulate(java.awt.image.BufferedImage bim, int imNo, int middleImNo, java.util.List<PointFloat> centres)
          For image imNo of a sequence, add the pixel values into the accumulator but first shift the image so that brightest objects in this image and the middle image of the sequence are superimposed.
9.11.26: changed last parameter from BlobMeas [][] lookup.
 boolean warpAccumulate(java.awt.image.BufferedImage bim, int imNo, int middleImNo, java.util.List<MatchPair> matches, BlobMeas[][] lookup, int nBrightest)
          For image imNo of a sequence, add the pixel values into the accumulator but first distort the image so that matched point pairs are superimposed.
 
Methods inherited from class net.grelf.grip.ImageDouble
add, add, add, add, add, add, add, applyCurve, applyCurveDouble, applyCurveDouble, applyCurveDouble, autoCrop, autoStretch, autoStretch, autoThreshold, averageVertically, averageVertically, checkCompatibility, clone, convertToImageInt, convertToMonochrome, convertToMonochrome, crop, divide, drawImage, fit, flipHorizontal, flipVertical, getBitsPerChannel, getChannelRanges, getChannelRangesDouble, getHeight, getHorizontalSamplesDouble, getMetadata, getNBands, getOverallRange, getOverallRangeDouble, getPixel, getPixelDouble, getPixelDoubleInterpolated, getPixelInterpolated, getRange, getRangeDouble, getVerticalSamplesDouble, getWidth, gnomonicProjection, inverseGnomonicProjection, invert, meanFilter, medianFilter, multiply, multiply, multiply, nearestExtremeFilter, neutraliseBackground, rankFilter, reapplyColour, rotate, save, save, save, saveAsFITS, scale, scale, scale, scale, scale, set, setMetadata, setPixel, setPixel, setPixelDouble, setPixelDouble, setRangeDouble, splitChannels, subtract, subtract, subtractToZero, threshold, toString, translate, varianceFilter
 
Methods inherited from class net.grelf.grip.ImageBase
padTo, padTo, rJustified20
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.grelf.grip.Image
add, add, add, add, applyCurve, autoCrop, autoStretch, autoStretch, autoThreshold, averageVertically, averageVertically, clone, convertToMonochrome, convertToMonochrome, crop, divide, drawImage, fit, flipHorizontal, flipVertical, getBitsPerChannel, getChannelRanges, getChannelRangesDouble, getHeight, getMetadata, getNBands, getOverallRange, getOverallRangeDouble, getPixel, getPixelDouble, getPixelDoubleInterpolated, getPixelInterpolated, getRange, getRangeDouble, getWidth, gnomonicProjection, inverseGnomonicProjection, invert, meanFilter, medianFilter, multiply, nearestExtremeFilter, neutraliseBackground, rankFilter, reapplyColour, rotate, save, save, save, saveAsFITS, scale, scale, scale, scale, scale, set, setMetadata, setPixel, setPixel, setPixelDouble, setPixelDouble, splitChannels, subtract, threshold, toString, translate, varianceFilter
 

Constructor Detail

AccumulatorDouble

public AccumulatorDouble(int width,
                         int height,
                         int nBands)
Creates image without setting any pixels.


AccumulatorDouble

public AccumulatorDouble(int width,
                         int height,
                         int nBands,
                         boolean fillWithZeroes)
Creates image with pixels optionally set to zero.


AccumulatorDouble

public AccumulatorDouble(java.awt.image.BufferedImage bim)
                  throws IncompatibleImageException
Use the BufferedImage to set the width, height and number of bands (channels) in this Image. Populate the pixel values in the image data array from the BufferedImage also.

Throws:
IncompatibleImageException
Method Detail

brightestShiftAccumulate

public boolean brightestShiftAccumulate(java.awt.image.BufferedImage bim,
                                        int imNo,
                                        int middleImNo,
                                        java.util.List<PointFloat> centres)
                                 throws IncompatibleImageException
For image imNo of a sequence, add the pixel values into the accumulator but first shift the image so that brightest objects in this image and the middle image of the sequence are superimposed.
9.11.26: changed last parameter from BlobMeas [][] lookup. The reason for this is that when matching on single bright objects we may mean the moon, nearly filling the image, in which case we would run out of memory if holding all details of that for every image in a sequence.

Specified by:
brightestShiftAccumulate in interface Accumulator
Throws:
IncompatibleImageException

averageShiftAccumulate

public boolean averageShiftAccumulate(java.awt.image.BufferedImage bim,
                                      int imNo,
                                      int middleImNo,
                                      java.util.List<MatchPair> matches,
                                      BlobMeas[][] lookup,
                                      int nBrightest)
                               throws IncompatibleImageException
For image imNo of a sequence, add the pixel values into the accumulator but first shift the image so that matched point pairs are superimposed. Use the average translation vector from all matched objects.

Specified by:
averageShiftAccumulate in interface Accumulator
Throws:
IncompatibleImageException

warpAccumulate

public boolean warpAccumulate(java.awt.image.BufferedImage bim,
                              int imNo,
                              int middleImNo,
                              java.util.List<MatchPair> matches,
                              BlobMeas[][] lookup,
                              int nBrightest)
                       throws IncompatibleImageException
For image imNo of a sequence, add the pixel values into the accumulator but first distort the image so that matched point pairs are superimposed. Return false if not able to warp the image.

Specified by:
warpAccumulate in interface Accumulator
Throws:
IncompatibleImageException

addWithStarBoost

public void addWithStarBoost(java.awt.image.BufferedImage bim,
                             int starBoostFactor)
                      throws IncompatibleImageException
For accumulating star trails. The starBoostFactor should be something like the number of images being accumulated.

Specified by:
addWithStarBoost in interface Accumulator
Throws:
IncompatibleImageException