|
| void | EncodeChunk (const int &start, std::vector< unsigned char >::iterator it, std::vector< unsigned char >::iterator en) |
| |
| void | EncodeChunkLength (const int &start, const unsigned int &chunk_length) |
| |
| void | DecodeChunk (const int start, std::vector< unsigned char >::iterator it, std::vector< unsigned char >::iterator en) |
| |
| unsigned int | DecodeChunkLength (const int &start) |
| |
| void | SwapCoefficients (cv::Mat *block, const int &value) |
| |
|
|
std::vector< cv::Mat > | channels |
| |
| int | persistence |
| |
|
int | image_capacity |
| |
|
| std::vector< unsigned char > | ReadPayload (const boost::filesystem::path &payload_path) |
| |
| void | WritePayload (const boost::filesystem::path &payload_path, const std::vector< unsigned char > &payload) |
| |
| template<class T > |
| void | SetBit (T *target, const int &bit, const int &value) |
| |
| template<class T > |
| int | GetBit (const T &target, const int &bit) |
| |
| boost::filesystem::path | image_path |
| |
| cv::Mat | image |
| |
◆ DiscreteCosineTransform()
| DiscreteCosineTransform::DiscreteCosineTransform |
( |
const boost::filesystem::path & |
image_path, |
|
|
int |
persistence |
|
) |
| |
|
inlineexplicit |
Default constructor for the DiscreteCosineTransform class which overrides the default constructor from the Steganography class.
- Parameters
-
| image_path | The path to the input carrier image. |
| persistence | The persistence value for this instance. |
◆ Decode()
| void DiscreteCosineTransform::Decode |
( |
| ) |
|
|
virtual |
Decode the payload from the steganographic image by comparing DCT coefficients.
Implements Steganography.
◆ DecodeChunk()
| void DiscreteCosineTransform::DecodeChunk |
( |
const int |
start, |
|
|
std::vector< unsigned char >::iterator |
it, |
|
|
std::vector< unsigned char >::iterator |
en |
|
) |
| |
|
private |
Attempt to decode a chunk of information from the steganographic image.
- Parameters
-
| start | The bit index to start decoding at. |
| it | An iterator to a start position in the payload_bytes vector. |
| en | An iterator to an end position in the payload_bytes vector. |
- Exceptions
-
◆ DecodeChunkLength()
| unsigned int DiscreteCosineTransform::DecodeChunkLength |
( |
const int & |
start | ) |
|
|
private |
Attempt to decode the 32bit integer stating the length of the following chunk.
- Parameters
-
| start | The bit index to start decoding at. |
- Returns
- The length of the following chunk.
- Exceptions
-
◆ Encode()
| void DiscreteCosineTransform::Encode |
( |
const boost::filesystem::path & |
payload_path | ) |
|
|
virtual |
Encode the payload file into the carrier image by swapping DCT coefficients.
- Parameters
-
| payload_path | Path to the file we are encoding. |
- Exceptions
-
Implements Steganography.
◆ EncodeChunk()
| void DiscreteCosineTransform::EncodeChunk |
( |
const int & |
start, |
|
|
std::vector< unsigned char >::iterator |
it, |
|
|
std::vector< unsigned char >::iterator |
en |
|
) |
| |
|
private |
Encode a chunk of information into the carrier image.
Before encoding a chunk of information you "should" first encode its length using the EncodeChunkLength function.
- Parameters
-
| start | The bit index to start encoding at. |
| it | The position in the chunk of information to start encoding. |
| en | The position in the chunk of information to stop encoding. |
◆ EncodeChunkLength()
| void DiscreteCosineTransform::EncodeChunkLength |
( |
const int & |
start, |
|
|
const unsigned int & |
chunk_length |
|
) |
| |
|
private |
Encode a 32bit integer stating the length of the following chunk into the carrier image.
- Parameters
-
| start | The bit index to start encoding at. |
| chunk_length | The length of the next chunk in bytes. |
◆ SwapCoefficients()
| void DiscreteCosineTransform::SwapCoefficients |
( |
cv::Mat * |
block, |
|
|
const int & |
value |
|
) |
| |
|
private |
Swap two DCT coefficients.
Swap two DCT coefficients and apply a persistence value to ensure that the data survives the compression process.
- Parameters
-
| block | A pointer to the block which is currently be operated on. |
| value | The value which is being stored, will be 0 or 1. |
◆ persistence
| DiscreteCosineTransform::persistence |
|
private |
Value which will be applied during the DCT coefficient swapping. Higher values ensure that the data persists, however, cause more visual degradation.
The documentation for this class was generated from the following files: