|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoders.Encoder
coders.DifferenceExpansionEncoder
public class DifferenceExpansionEncoder
| Field Summary | |
|---|---|
private int |
currLayer
Indicates current layer being embedded. |
(package private) int |
forcedThreshold
|
private int |
lastCapacity
|
private int |
lastCompLocMapSize
|
private int |
lastCompSelVectorSize
|
private int |
lastSelVectorSize
|
private DifferenceExpansionOptions |
options
|
private BitIterator |
payloadIterator
|
private int[] |
thresholdSet
|
private int |
totalCapacity
|
(package private) int |
XP0
|
(package private) int |
XP1
|
| Fields inherited from class coders.Encoder |
|---|
encoded, encodedBitmap, originalBitmap, payload, psnr, psnrComputed |
| Constructor Summary | |
|---|---|
DifferenceExpansionEncoder(Bitmap originalBitmap,
BitSequence payload,
DifferenceExpansionOptions options)
Parameters should include pixel pair selection method, scanning order, map compression parameter, etc. |
|
| Method Summary | |
|---|---|
private void |
buildMapAndLSBStream(java.util.ArrayList<DEPixelPair> pairs,
BitSequence locationMap,
BitSequence lsbSequence,
int threshold)
Builds the location map by setting the bit at index corresponding to a pair that has been selected for expansion. |
private void |
buildSelectionVector(java.util.ArrayList<DEPixelPair> pairs,
BitSequence selectionVector,
BitSequence locationMap,
int threshold)
Builds the selection vector from the specified pairs, locationMap, and threshold value. |
private void |
embed(java.util.ArrayList<DEPixelPair> pairs,
BitIterator mapIterator,
BitSequence sequence)
Embeds the specified sequence in the specified pixel pairs, moving through the pairs using the iterator to determine the index of embedding and what type of embedding (expansion or simple embedding) to perform for each pair. |
private boolean |
embedBit(java.util.ArrayList<DEPixelPair> pairs,
BitIterator mapIterator,
BitIterator sequenceIterator)
Attempts to embed the next bit in sequenceIterator into pairs. |
private void |
embedPayload(java.util.ArrayList<DEPixelPair> pairs,
BitIterator mapIterator)
Embeds as much of the payload as possible into the remaining pairs, while still fitting the end-of-map sequence in at the end. |
void |
encode()
Encodes the current bitmap. |
void |
encodeLayer(BitSequence payload)
Encodes the specified payload in a layer of the image. |
void |
forceThreshold(int threshold)
Forces the threshold to the specified value, disregards payload content size. |
void |
forceThresholdSet(int[] thresholdSet)
|
int |
getLastCapacity()
|
int |
getLastCompLocMapSize()
|
int |
getLastCompSelVectorSize()
|
int |
getLastSelVectorSize()
|
private java.util.ArrayList<DEPixelPair> |
getPairs()
Returns a complete ordered list of pixel pairs in an order specified by the construction parameters, for the current layer. |
int |
getTotalCapacity()
Returns the total capacity achieved during the last encoding. |
| Methods inherited from class coders.Encoder |
|---|
computePSNR, getEncodedBitmap, getOriginalBitmap, getPayload |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private DifferenceExpansionOptions options
private int totalCapacity
private BitIterator payloadIterator
private int lastCompLocMapSize
private int lastSelVectorSize
private int lastCompSelVectorSize
private int lastCapacity
private int currLayer
int XP0
int XP1
int forcedThreshold
private int[] thresholdSet
| Constructor Detail |
|---|
public DifferenceExpansionEncoder(Bitmap originalBitmap,
BitSequence payload,
DifferenceExpansionOptions options)
| Method Detail |
|---|
public void encode()
encode in class Encoderpublic void encodeLayer(BitSequence payload)
payload - private java.util.ArrayList<DEPixelPair> getPairs()
private void buildMapAndLSBStream(java.util.ArrayList<DEPixelPair> pairs,
BitSequence locationMap,
BitSequence lsbSequence,
int threshold)
pairs - locationMap - c - threshold -
private void buildSelectionVector(java.util.ArrayList<DEPixelPair> pairs,
BitSequence selectionVector,
BitSequence locationMap,
int threshold)
pairs - selectionVector - locationMap - threshold -
private void embed(java.util.ArrayList<DEPixelPair> pairs,
BitIterator mapIterator,
BitSequence sequence)
pairs - mapIterator - sequence -
private void embedPayload(java.util.ArrayList<DEPixelPair> pairs,
BitIterator mapIterator)
pairs - mapIterator -
private boolean embedBit(java.util.ArrayList<DEPixelPair> pairs,
BitIterator mapIterator,
BitIterator sequenceIterator)
pairs - mapIterator - sequenceIterator -
public void forceThreshold(int threshold)
threshold - public int getTotalCapacity()
public int getLastCompLocMapSize()
public int getLastSelVectorSize()
public int getLastCompSelVectorSize()
public int getLastCapacity()
public void forceThresholdSet(int[] thresholdSet)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||