#include <WaveletTransform.hh>
List of all members.
Public Member Functions |
| | WaveletTransform (Image &img, FilterSet &fil) |
| virtual | ~WaveletTransform (void) |
| virtual void | analysis (int steps) |
| virtual void | synthesis (int steps, int prevSteps=0) |
| void | expandImage (void) |
| void | restoreImage (void) |
| virtual void | where (area what, int subband, int &yoffs, int &xoffs, int &ysize, int &xsize) const |
| virtual void | where (int ypos, int xpos, int &subband, area &channel, int steps=-1) const |
| virtual void | mapPosition (int yOld, int xOld, int toSubband, area toChannel, int &yNew, int &xNew, int &sizeFactor, int steps=-1) const |
| virtual coeff | saverage (int subband, area channel) const |
| virtual coeff | aaverage (int subband, area channel) const |
| virtual coeff | sqvariance (int subband, area channel) const |
| virtual coeff | variance (int subband, area channel, bool abs=false) const |
| virtual coeff | sdeviation (int subband, area channel, bool abs=false) const |
| virtual coeff | ratio (int subband1, int subband2) |
| Image * | ll (int steps=-1) |
| Image * | hl (int steps=-1) |
| Image * | lh (int steps=-1) |
| Image * | hh (int steps=-1) |
| Image * | highMax (int steps=-1) |
| Image & | image (void) const |
| virtual Image * | subband (area what, int steps=-1) |
| virtual int | getSubband (int ypos, int xpos, int steps=-1) |
| int | getSubband (CoeffInformation &c, int steps=-1) |
| virtual area | getArea (int ypos, int xpos, int steps=-1) |
| area | getArea (CoeffInformation &c, int steps=-1) |
| virtual void | import (Image &img, area what, int steps=-1) |
| virtual void | fill (coeff value, area what, int steps=-1) |
| int | steps (void) const |
Protected Member Functions |
| virtual void | doanalysis (int steps)=0 |
| virtual void | dosynthesis (int steps, int prevSteps=0)=0 |
Protected Attributes |
| Wavelet * | m_wavelet |
| Image * | m_image |
| Image * | m_buffer |
| FilterSet * | m_filter |
| int | m_rows |
| int | m_cols |
Private Member Functions |
| void | sanity (void) |
Detailed Description
An abstract Wavelet Transform. The Transform transform is two-dimensional, it thus works on images.
Definition at line 26 of file WaveletTransform.hh.
Constructor & Destructor Documentation
Constructor. Initializes references to Image and Wavelet.
- Parameters:
-
| img | the image |
| fil | the filter set for the wavelet |
Destructor. Releases allocated objects.
Member Function Documentation
Return the average color for a particular area in a subband inside the image. The coefficients' signedness will be discarded. This is a shortcut to the corresponding method in the Image class.
- Parameters:
-
| subband | the subband |
| channel | the area in that subband |
- Returns:
- the average color
Perform a Wavelet transform on the image.
- Exceptions:
-
| invalid_argument | image is not square |
- Parameters:
-
| steps | the number of transform steps |
Perform an inverse Wavelet transform on the image.
- Parameters:
-
| steps | the number of inverse transform steps |
| prevSteps | if greater than 0, the number of previous decomposition steps to assume. This is necessary to reconstruct images that are not square and have side lengths which are not powers of two. |
Implemented in StandardTransform, and PyramidTransform.
Temporarily expand the image (square, side length a power of two) to make a transform possible.
Fill one of the subbands with one particular value.
- Exceptions:
-
| invalid_argument | the imported image does not match the calculated subband size |
- Parameters:
-
| value | the value to be inserted |
| what | the subband, out of LL, HL, LH, HH |
| steps | assume number of transform steps instead of those computed from the previous transforms |
Get the area of a given position in the image. This default method of calculation refers to the Pyramid transform and due to the lack of alternatives also to the Standard transform. Decomposition schemes using a different geometries, like e.g. the Packet transform may have to implement their own version of that method.
- Parameters:
-
| ypos | the position's row |
| xpos | the position's col |
| steps | the number of steps we assume the image to have been transformed |
- Returns:
- the position's subband
Get the area of a given position in the image denoted by a {CoeffInformation} object. This default method of calculation refers to the Pyramid transform and due * to the lack of alternatives also to the Standard transform. Decomposition schemes using a different geometries, like e.g. the Packet transform may have to implement their own version of that method.
- Parameters:
-
| c | a reference the {CoeffInformation} object. |
| steps | the number of steps we assume the image to have been transformed |
- Returns:
- the position's subband
Definition at line 276 of file WaveletTransform.hh.
References CoeffInformation::xpos(), and CoeffInformation::ypos().
Get the subband of a given position in the image. This default method of calculation refers to the Pyramid transform and due to the lack of alternatives also to the Standard transform. Decomposition schemes using a different geometries, like e.g. the Packet transform may have to implement their own version of that method.
- Parameters:
-
| ypos | the position's row |
| xpos | the position's col |
| steps | the number of steps we assume the image to have been transformed |
- Returns:
- the position's subband
Get the subband of a given position in the image denoted by a {CoeffInformation} object. This default method of calculation refers to the Pyramid transform and due * to the lack of alternatives also to the Standard transform. Decomposition schemes using a different geometries, like e.g. the Packet transform may have to implement their own version of that method.
- Parameters:
-
| c | a reference the {CoeffInformation} object. |
| steps | the number of steps we assume the image to have been transformed |
- Returns:
- the position's subband
Definition at line 246 of file WaveletTransform.hh.
References CoeffInformation::xpos(), and CoeffInformation::ypos().
Get a subpicture containing the HH subband.
- Parameters:
-
| steps | assume number of transform steps instead of those computed from the previous transforms |
Definition at line 199 of file WaveletTransform.hh.
References HH.
Get an image consisting of the given subband's highpass components maxima.
- Parameters:
-
| steps | assume number of transform steps instead of those computed from |
- Returns:
- a new image object containing the maxima as coefficients
Get a subpicture containing the HL subband.
- Parameters:
-
| steps | assume number of transform steps instead of those computed from the previous transforms |
Definition at line 189 of file WaveletTransform.hh.
References HL.
Get a reference to the image
- Returns:
- the reference to the image
Definition at line 210 of file WaveletTransform.hh.
Import a subpicture containing one of the subbands.
- Exceptions:
-
| invalid_argument | the imported image does not match the calculated subband size |
- Parameters:
-
| img | the image containing the subband |
| what | the subband, out of LL, HL, LH, HH |
| steps | assume number of transform steps instead of those computed from the previous transforms |
Get a subpicture containing the LH subband.
- Parameters:
-
| steps | assume number of transform steps instead of those computed from the previous transforms |
Definition at line 194 of file WaveletTransform.hh.
References LH.
Get a subpicture containing the LL subband.
- Parameters:
-
| steps | assume number of transform steps instead of those computed from the previous transforms |
Definition at line 184 of file WaveletTransform.hh.
References LL.
| virtual void WaveletTransform::mapPosition |
( |
int |
yOld, |
|
|
int |
xOld, |
|
|
int |
toSubband, |
|
|
area |
toChannel, |
|
|
int & |
yNew, |
|
|
int & |
xNew, |
|
|
int & |
sizeFactor, |
|
|
int |
steps = -1 |
|
) |
| const [virtual] |
Identify channel and subband of a given position in the transformed image and map it to another subband/channel. This default method of calculation refers to the Pyramid transform and due to the lack of alternatives also to the Standard transform. Decomposition schemes using a different geometries, like e.g. the Packet transform may have to implement their own version of that method.
- Parameters:
-
| yOld | the source location's row. |
| xOld | the source location's column. |
| toSubband | the target subband |
| toChannel | the target channel |
| yNew | where the target location's row gets written to. |
| xNew | where the target location's column gets written to. |
| sizeFactor | where the target sizeFactor gets written to. |
| steps | the current number of transform steps to be assumed (-1 for automatic determination) |
Return the ratio resulting from the zerotree relationship between two subbands (e.g. 1:4 from subband 1 to 2). This method depends on the geometry associated with the `Pyramid' decomposition. Decomposition schemes using a different geometries, like e.g. the Packet transform may have to implement their own version of that method.
- Parameters:
-
| subband1 | the first subband |
| subband2 | the second subband |
- Returns:
- the ratio, e.g. 4 for 1:4
Restore the temporarily expanded image back to original size.
Resize m_buffer for transforms if image dimensions have changed
Return the average color for a particular area in a subband inside the image. The coefficients' signedness will be considered. This is a shortcut to the corresponding method in the Image class.
- Parameters:
-
| subband | the subband |
| channel | the area in that subband |
- Returns:
- the average color
Returns the standard deviation for a particular area in a subband inside the image. This is a shortcut to the corresponding method in the Image class.
- Parameters:
-
| subband | the subband |
| channel | the area in that subband |
| abs | true if signs are discarded |
- Returns:
- the standard deviation.
Return the square variance for a particular area in a subband inside the image. This is a shortcut to the corresponding method in the Image class.
- Parameters:
-
| subband | the subband |
| channel | the area in that subband |
- Returns:
- the square variance
Return the current number of decomposition steps
- Returns:
- the number of decomposition steps
Definition at line 306 of file WaveletTransform.hh.
Get a subpicture containing one of the subbands.
- Parameters:
-
| what | the subband, out of LL, HL, LH, HH |
| steps | assume number of transform steps instead of those computed from the previous transforms |
Perform an inverse Wavelet transform on the image.
- Exceptions:
-
| invalid_argument | image is not square |
- Parameters:
-
| steps | the number of inverse transform steps |
| prevSteps | if greater than 0, the number of previous decomposition steps to assume. This is necessary to reconstruct images that are not square and have side lengths which are not powers of two. |
Return the variance for a particular area in a subband inside the image. This is a shortcut to the corresponding method in the Image class.
- Parameters:
-
| subband | the subband |
| channel | the area in that subband |
| abs | true if signs are discarded |
- Returns:
- the square variance
Identify position and size of a given channel in a given subband. This default method of calculation refers to the Pyramid transform and due to the lack of alternatives also to the Standard transform. Decomposition schemes using a different geometries, like e.g. the Packet transform may have to implement their own version of that method.
- Parameters:
-
| what | the channel we want |
| subband | the subband we are looking at |
| yoffs | the returned row |
| xoffs | the returned col |
| ysize | the returned number of rows |
| xsize | the returned number of cols |
Identify channel and subband of a given position in the transformed image. This method depends on the `where' method and thus uses the geometry associated with the `Pyramid' decomposition.
- Parameters:
-
| ypos | the location's row. |
| xpos | the location's column. |
| subband | where the calculated subband gets written to. |
| channel | where the calculated channel gets written to. |
| steps | the current number of transform steps to be assumed (-1 for automatic determination) |
Member Data Documentation
The documentation for this class was generated from the following file: