|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcz.cuni.jagrlib.piece.FractalCompressionQtree.ImageBlock
protected class FractalCompressionQtree.ImageBlock
Decoded image block, acts as Q-tree node as well.
| Field Summary | |
|---|---|
FractalCompressionQtree.ImageBlock[] |
desc
Descendants (can be empty). |
double |
error
Reconstruction error (for adaptive encoder). |
double |
o
Pixel transform coefficients (contrast, brightness). |
int |
order
Block order (descending reconstruction error). |
int |
orientation
Best source orientation (see RasterSearch.ORI_0123, ..). |
double |
s
Pixel transform coefficients (contrast, brightness). |
int |
size
Block size in pixels. |
double |
sourceX
Best source coordinates. |
double |
sourceY
Best source coordinates. |
int |
x0
Upper-left corner coordinates. |
int |
y0
Upper-left corner coordinates. |
| Constructor Summary | |
|---|---|
FractalCompressionQtree.ImageBlock(int x,
int y,
int siz)
Non-initialized (inner) Q-tree node. |
|
FractalCompressionQtree.ImageBlock(int x,
int y,
int siz,
RasterGraphics g)
Initialized (matched) Q-tree node. |
|
| Method Summary | |
|---|---|
int |
compareTo(FractalCompressionQtree.ImageBlock o)
Natural ordering: descending [ error ]. |
void |
encode()
Encoding the sub-tree rooted here. |
void |
logTree(int depth)
Write decomposition diagram into the FractalCompressionQtree.log image. |
boolean |
match(RasterGraphics g)
Computes block match in the prepared reference image. |
void |
setChild(int ord,
FractalCompressionQtree.ImageBlock ch)
Inserts the given child sub-tree, creates desc array if necessary. |
void |
transformImage()
Performs one step of fractal transform (PIFS). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int x0
public int y0
public int size
public double sourceX
public double sourceY
public int orientation
RasterSearch.ORI_0123, ..).
public double s
public double o
public double error
public int order
0 for the best (=final) nodes.
public FractalCompressionQtree.ImageBlock[] desc
| Constructor Detail |
|---|
public FractalCompressionQtree.ImageBlock(int x,
int y,
int siz)
public FractalCompressionQtree.ImageBlock(int x,
int y,
int siz,
RasterGraphics g)
| Method Detail |
|---|
public void setChild(int ord,
FractalCompressionQtree.ImageBlock ch)
desc array if necessary.
public boolean match(RasterGraphics g)
true if succeeded.
public void encode()
throws java.io.IOException
CTX_CTRL: { CTRL_REC | recursive descent (w/o block match)
CTRL_NODE | inner node (contains inferior block match)
CTRL_FAIL | failed leaf node (dead-end)
>= CTRL_ORI0 } leaf node (1st symbol defines its orientation)
[raw-bits: order] block order number (if 'bestCodeOnly' is not set)
CTX_COORD: x, y reference image coordinates
CTX_S: s quantized 's' coef (multiplier)
CTX_O: o quantized 'o' coef (addend)
java.io.IOExceptionpublic void transformImage()
public void logTree(int depth)
FractalCompressionQtree.log image.
public int compareTo(FractalCompressionQtree.ImageBlock o)
compareTo in interface java.lang.Comparable<FractalCompressionQtree.ImageBlock>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||