|
Wavelet and Image class library
1.3.2
|
#include <ImageInformation.hh>

Public Member Functions | |
| ImageInformation (int size=0) | |
| ImageInformation (Image &img) | |
| ~ImageInformation (void) | |
| int | size (void) const |
| ImageInformation * | head (int n) |
| ImageInformation * | tail (int n) |
| ImageInformation * | append (ImageInformation &ii) |
| ImageInformation * | clone (void) |
| void | shrink (int newsize, bool leavehead=true) |
| bool | equals (ImageInformation &ii) |
| CoeffInformation & | at (int pos) |
| void | to (CoeffInformation &c, int pos) |
| void | to (const CoeffInformation &c, int pos) |
| void | resize (int size) |
| void | swap (int pos1, int pos2) |
| void | gensort (cipredicate isless) |
| void | ssort (void) |
| void | asort (void) |
| void | psort (void) |
| void | yxsort (void) |
| void | xysort (void) |
| void | isort (void) |
| void | shuffle (void) |
| bool | ssorted (void) const |
| bool | asorted (void) const |
| bool | psorted (void) const |
| bool | isorted (void) const |
| bool | isIn (int abs) const |
| bool | isIn (int y, int x) const |
| int | locate (int abs) const |
| int | locate (int y, int x) const |
| coeff | amax (void) |
| coeff | smax (void) |
| coeff | amin (void) |
| coeff | smin (void) |
| void | dump (const char *delim=" ", const char *file="") const |
| coeff | aaverage (void) const |
| coeff | saverage (void) const |
| double | sqvariance (void) const |
| double | variance (bool abs=false) const |
| double | sdeviation (bool abs=false) const |
Protected Member Functions | |
| void | copyCoeffs (CoeffInformation *coeffs, int size, bool head) |
| ImageInformation * | subimage (int size, bool head) |
| int | randint (int from, int to) |
| void | quicksort (int from, int to, cipredicate isless) |
Protected Attributes | |
| CoeffInformation * | m_coeffs |
| int | m_size |
Image information. The information consists coefficient information nodes, so the original image can be reconstructed from this. Tool methods for sorting, shuffleing etc. are used for watermark.
Definition at line 35 of file ImageInformation.hh.
| ImageInformation::ImageInformation | ( | int | size = 0 | ) |
Constructor. Initializes a number of empty components.
| size | the number of components |
| ImageInformation::ImageInformation | ( | Image & | img | ) |
Constructor. Gets information from an image.
| img | the source image |
| ImageInformation::~ImageInformation | ( | void | ) |
Destructor. Frees allocated objects.
| coeff ImageInformation::aaverage | ( | void | ) | const |
Return the average absolute greyscale value.
| coeff ImageInformation::amax | ( | void | ) |
Get the maximum signed value from the selected coefficients.
| coeff ImageInformation::amin | ( | void | ) |
Get the minimum absolute value from the selected coefficients.
Append another ImageInformation object.
| ii | the other ImageInformation object. |
| void ImageInformation::asort | ( | void | ) |
Sort the coeffs according to their absolute values.
| bool ImageInformation::asorted | ( | void | ) | const |
Are the coeffs sorted according to their absolute values?
| CoeffInformation& ImageInformation::at | ( | int | pos | ) | [inline] |
Return a coeff info.
| pos | the info's position in this object (array index) |
Definition at line 103 of file ImageInformation.hh.
| ImageInformation* ImageInformation::clone | ( | void | ) | [inline] |
Get a copy of this.
Definition at line 73 of file ImageInformation.hh.
| void ImageInformation::copyCoeffs | ( | CoeffInformation * | coeffs, |
| int | size, | ||
| bool | head | ||
| ) | [protected] |
Obtain a subset of the coeffs.
| coeffs | the address of the CoeffInformation array to write to |
| size | the new array's size |
| head | if {true} the subset will be taken from the top, else from the bottom |
| void ImageInformation::dump | ( | const char * | delim = " ", |
| const char * | file = "" |
||
| ) | const |
Write the contents to stdout or a file.
| ios_base::failure | if the file could not be opened for writing. |
| delim | what to print between two entries |
| file | the name of the file (empty string for stdout) |
| bool ImageInformation::equals | ( | ImageInformation & | ii | ) |
Equality test.
| ii | other info object |
| void ImageInformation::gensort | ( | cipredicate | isless | ) |
Sort the coeffs according to their values.
| isless | the comparison function to use. |
| ImageInformation* ImageInformation::head | ( | int | n | ) |
Get the first n coeffs.
| n | the number of coeffs |
| bool ImageInformation::isIn | ( | int | abs | ) | const [inline] |
Returns true if a position is in this ImageInformation object.
| abs | the absolute position in the image |
Definition at line 163 of file ImageInformation.hh.
| bool ImageInformation::isIn | ( | int | y, |
| int | x | ||
| ) | const [inline] |
Returns true if a position is in this ImageInformation object.
| y | the row in the image |
| x | the col in the image |
Definition at line 168 of file ImageInformation.hh.
| void ImageInformation::isort | ( | void | ) |
Sort the coeffs according to their IDs.
| bool ImageInformation::isorted | ( | void | ) | const |
Are the coeffs sorted according to their IDs?
| int ImageInformation::locate | ( | int | abs | ) | const |
Returns true a position's index if it is is in this ImageInformation object.
| abs | the absolute position in the image |
| int ImageInformation::locate | ( | int | y, |
| int | x | ||
| ) | const |
Returns true a position's index if it is is in this ImageInformation object.
| y | the row in the image |
| x | the col in the image |
| void ImageInformation::psort | ( | void | ) |
Sort the coeffs according to their absolute positions in the image.
| bool ImageInformation::psorted | ( | void | ) | const |
Are the coeffs sorted according to their position in their image?
| void ImageInformation::quicksort | ( | int | from, |
| int | to, | ||
| cipredicate | isless | ||
| ) | [protected] |
Sort the coefficients. A Quicksort algorithm according to Jon Bentley.
| from | the start index |
| to | the end index (included in sort) |
| isless | the the comparison function, {true} when the left arg is less than the right one |
| int ImageInformation::randint | ( | int | from, |
| int | to | ||
| ) | [protected] |
Obtain positive pseudo-random numbers.
| from | the minimum number |
| to | one more than the maximum number |
| void ImageInformation::resize | ( | int | size | ) |
Resize the object preserving as many old values as possible.
| size | the new size |
| coeff ImageInformation::saverage | ( | void | ) | const |
Return the average (signed) greyscale value.
| double ImageInformation::sdeviation | ( | bool | abs = false | ) | const |
Returns the standard deviation.
| abs | true if signs are discarded. |
| void ImageInformation::shrink | ( | int | newsize, |
| bool | leavehead = true |
||
| ) |
Shrink (discard some of the coeffs).
| newsize | the new number of coeffs, if greater than the actual size, the operation has no effect |
| leavehead | if {true} discard from behind, else discard from the top |
| void ImageInformation::shuffle | ( | void | ) |
Mix coeffs using pseudo-random numbers.
| int ImageInformation::size | ( | void | ) | const [inline] |
Get the number of stored coeffs.
Definition at line 51 of file ImageInformation.hh.
| coeff ImageInformation::smax | ( | void | ) |
Get the maximum absolute value from the selected coefficients.
| coeff ImageInformation::smin | ( | void | ) |
Get the minimum signed value from the selected coefficients.
| double ImageInformation::sqvariance | ( | void | ) | const |
Return the square variance.
| void ImageInformation::ssort | ( | void | ) |
Sort the coeffs according to their values.
| bool ImageInformation::ssorted | ( | void | ) | const |
Are the coeffs sorted according to their values?
| ImageInformation* ImageInformation::subimage | ( | int | size, |
| bool | head | ||
| ) | [protected] |
Obtain a new info object containging a subset of the coeffs.
| size | the number of coeffs to be stored |
| head | if {true} the subset will be taken from the top, else from the bottom |
| void ImageInformation::swap | ( | int | pos1, |
| int | pos2 | ||
| ) |
Swap two coefficients.
| pos1 | the first object's position |
| pos2 | the second object's position |
| ImageInformation* ImageInformation::tail | ( | int | n | ) |
Get the last n coeffs.
| n | the number of coeffs |
| void ImageInformation::to | ( | CoeffInformation & | c, |
| int | pos | ||
| ) | [inline] |
Set a position from a CoeffInformation object.
| c | the CoeffInformation object |
| pos | the info's position in this object (array index) |
Definition at line 109 of file ImageInformation.hh.
| void ImageInformation::to | ( | const CoeffInformation & | c, |
| int | pos | ||
| ) | [inline] |
Set a position from a CoeffInformation object.
| c | the CoeffInformation object |
| pos | the info's position in this object (array index) |
Definition at line 115 of file ImageInformation.hh.
| double ImageInformation::variance | ( | bool | abs = false | ) | const |
Return the variance.
| abs | true if signs are discarded. |
| void ImageInformation::xysort | ( | void | ) |
Sort the coeffs according to their cols/rows positions in the image.
| void ImageInformation::yxsort | ( | void | ) |
Sort the coeffs according to their rows/cols positions in the image.
CoeffInformation* ImageInformation::m_coeffs [protected] |
An array containing the coefficient nodes.
Definition at line 238 of file ImageInformation.hh.
int ImageInformation::m_size [protected] |
The number of coeffs.
Definition at line 240 of file ImageInformation.hh.
1.7.6.1