net.grelf.grip
Class AccumulatorInt

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

public class AccumulatorInt
extends ImageInt
implements Accumulator

This is a 32-bits-per-channel integer Accumulator.


Field Summary
 
Fields inherited from class net.grelf.grip.ImageInt
data
 
Constructor Summary
AccumulatorInt(java.awt.image.BufferedImage bim)
          Use the BufferedImage to set the width, height and number of bands (channels) in this Image.
AccumulatorInt(int width, int height, int nBands)
          Creates image without setting any pixels.
AccumulatorInt(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.
NB: Does NOT set this.extremes, so must call getOverallRange () at end of sequence.
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.ImageInt
add, add, add, add, add, add, applyCurve, autoCrop, autoStretch, autoStretch, autoThreshold, averageVertically, averageVertically, checkCompatibility, clone, convertTo16BitImage, convertToAccumulatorDouble, convertToMonochrome, convertToMonochrome, correctBackground, crop, divide, divideByFlatField, drawImage, drawRim, fit, flipHorizontal, flipVertical, getBitsPerChannel, getChannelRanges, getChannelRangesDouble, getHeight, getHorizontalSamples, getMetadata, getNBands, getOverallRange, getOverallRangeDouble, getPixel, getPixelDouble, getPixelDoubleInterpolated, getPixelInterpolated, getRange, getRangeDouble, getVerticalSamples, getWidth, gnomonicProjection, inverseGnomonicProjection, invert, isAccumFile, 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, setRange, 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

AccumulatorInt

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


AccumulatorInt

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


AccumulatorInt

public AccumulatorInt(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

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

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.
NB: Does NOT set this.extremes, so must call getOverallRange () at end of sequence.
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.
NB: Does NOT set this.extremes, so must call getOverallRange () at end of sequence.

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.
NB: Does NOT set this.extremes, so must call getOverallRange () at end of sequence.<

Specified by:
warpAccumulate in interface Accumulator
Throws:
IncompatibleImageException