|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcore.image.ScalarImage
core.image.AccumImage
core.image.Accum2Image
Stores a float image with alpha^2 = < width, height, float-buffer, alpha-buffer, minalpha, coverage >. An Accum2Image extends AccumImage so that the samples contribute in a such a way that the output variance is normalized. The float channel stores the sample sum with the alpha premultiplied, and the alpha channel stores the sum of the squares of the alpha amounts. This way, computing the final sample value is simple: sample = Sum(s[i]*sa[i])/Sqrt(Sum(sa[i]^2)) = f/Sqrt(a) If the samples accumulated have a Gaussian distribution, the final sample will have the same distribution.
Field Summary |
Fields inherited from class core.image.AccumImage |
a, coverage, minalpha |
Fields inherited from class core.image.ScalarImage |
f, height, offset, size, width |
Constructor Summary | |
Accum2Image(int width,
int height)
Constructs a new Accum2Image = < width, height, zero-buffer, zero-buffer, 1.0, 0 > |
Method Summary | |
void |
Accumulate(int x,
int y,
double s,
double sa)
Adds "s" and "sa"^2 to the scalar and alpha values at (x, y) if it is in-bounds. |
void |
Clear()
Clears both the scalar and alpha components in "this" |
double |
get(int x,
int y)
Returns: the value at (x, y) with the alpha divided out. |
void |
Normalize()
Divides out the alpha component in "this", renormalizing it to 1.0. |
void |
Normalize(int x,
int y)
Normalize the alpha value of a particular pixel, dividing out the square root of the alpha channel. |
void |
Set(int x,
int y,
double s,
double sa)
Sets the scalar and alpha value at (x, y) to (s, sa^2). |
void |
SetAlpha()
Sets the scalar component of "this" to the alpha component |
void |
SetZero()
Sets the samples in "this" to zero, with an alpha of 1.0 |
Methods inherited from class core.image.AccumImage |
Accumulate, AccumulateBilinear, AccumulateBilinear, Copy, Copy, getAlpha, hasSingularity |
Methods inherited from class core.image.ScalarImage |
Add, Clamp, Convolve3x3, Copy, Copy, getBilinear, getBilinear, inBounds, inBounds, inBounds, Modulate, Power, Rescale, Set, SetRandom, SetRandom, StretchBilinear, Vec2FieldMagnitude, Vec2FieldZero |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Accum2Image(int width, int height)
Method Detail |
public void SetZero()
SetZero
in class AccumImage
public void Clear()
Clear
in class AccumImage
public void SetAlpha()
SetAlpha
in class AccumImage
public void Normalize()
Normalize
in class AccumImage
public void Normalize(int x, int y)
Normalize
in class AccumImage
public double get(int x, int y)
get
in class AccumImage
public void Set(int x, int y, double s, double sa)
Set
in class AccumImage
public void Accumulate(int x, int y, double s, double sa)
Accumulate
in class AccumImage
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |