|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectEVCS
Implements a 2 out of 2 threshold Extended Visual Cryptography Scheme
Constructor Summary | |
EVCS(java.lang.String si,
java.lang.String im1,
java.lang.String im2)
Constructor method throws a NotComplianSizeException if the input images don't have the same size. |
Method Summary | |
int |
color2index(java.awt.Color c,
java.awt.Color c1,
java.awt.Color c2)
Let 3 colors generate the index for matrix by this law: let 1=black, 0=white index = c1*4+c2*2+c*1 that is as a binary number. |
void |
encode(int i,
int j,
java.awt.Color c,
java.awt.Color c1,
java.awt.Color c2)
Generate the share pixels and save them in the appropriated images |
int[] |
getPermutation()
Evalueate a vector of length m with a random permutation of {1...m}. |
java.awt.image.BufferedImage[] |
getShares()
|
void |
populateBasisMatrices()
Load basis matrices for the 2 out of 2 threshold EVCS The collection C(c,c1,c2) are obtained by permutating the columns of the respective matrix S(c,c1,c2). |
void |
process()
Encode every pixel of innocent images to generate the share images. |
void |
save(java.io.File f1,
java.io.File f2)
Write the share images into the file f1, f2 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EVCS(java.lang.String si, java.lang.String im1, java.lang.String im2) throws NotCompliantSizeException
si
- the secret image file nameim1
- user 1's innocent imageim2
- user 2's innocent imageMethod Detail |
public void process()
public void encode(int i, int j, java.awt.Color c, java.awt.Color c1, java.awt.Color c2)
i
- y-coordinatej
- x-coordinatec
- pixel color in the secret imagec1
- pixel color in the first imagec2
- pixel color in the second imagepublic int[] getPermutation()
public int color2index(java.awt.Color c, java.awt.Color c1, java.awt.Color c2)
public void populateBasisMatrices()
public void save(java.io.File f1, java.io.File f2)
f1
- file in wich save the 1st share imagef2
- file in wich save the 2nd share imagepublic java.awt.image.BufferedImage[] getShares()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |