Question:
1. What is visual cryptography?
2. How does it work for secret image sharing?
Attempt: I have tried to understand the concept of secret image sharing for black and white pixel from here http://www.datagenetics.com/blog/november32013/. But I have doubt about pixel expansion in this case. Suppose I have a image $212\times 212$ pixels. How can I encode this image to use as cipher text using pixel.
I want to clear my doubt. Please help me to understand this?
The rule is already given here:
Let $\begin{matrix}\blacksquare\square\\\square\blacksquare\end{matrix}$ be pattern 1 and $\begin{matrix}\square\blacksquare\\\blacksquare\square\end{matrix}$ be pattern 2.
Notice that they add up to a black square, and when added to themselves, they create a half-black square.
If the source pixel is black:
If the source pixel is white:
Variations
As stated in the website, they do not have to be a checkerboard pattern.
As long as pattern 1 is the complement of pattern 2, i.e. they share no common black pixel and they add up to a large black pixel, then you can use them. You are also encouraged to use different varieties.
Program:
In Pyth:
Try it online!
Correspondence:
0corresponds to $\begin{matrix}\blacksquare\blacksquare\\\square\square\end{matrix}$.1corresponds to $\begin{matrix}\blacksquare\square\\\blacksquare\square\end{matrix}$.2corresponds to $\begin{matrix}\blacksquare\square\\\square\blacksquare\end{matrix}$.3corresponds to $\begin{matrix}\square\blacksquare\\\blacksquare\square\end{matrix}$.4corresponds to $\begin{matrix}\blacksquare\square\\\blacksquare\square\end{matrix}$.5corresponds to $\begin{matrix}\square\square\\\blacksquare\blacksquare\end{matrix}$.They are deliberately assigned so that if their code add up to
5, then the pixels add up to a large black pixel.