stereo_text.py is a proof of concept designed to generate blocks of text with a hidden 3d message in the form of an autostereogram.
Currently it can generate 2 different types of autostereogram:
- Panel: Takes text input from a file or stdin. Any text in /forward slashes/ will appear in the foreground, while any text in \backslashes\ will drop into the background. All other text will be in between. See panel_example.txt
- SIRT (Single Image Random Text): Takes a depthmap input from a file or stdin. The depthmap consists of multiple lines, which must all be the same length. Each line is a series of numbers from 0 to 9, with 0 representing the lowest depth (farthest away) and 9 representing the highest depth (closest). All depths are relative to the depth before it, so any number on the depth map cannot be more than 1 higher or lower than the number before or after it. See sirt_example.txt
Installation:
~/ $ git clone https://github.com/kf5grd/stereo_text.git
~/ $ cd ./stereo_text
~/stereo_text/ $ pip install .
Usage and examples:
~/stereo_text/ $ stereo_text --help
Usage: cli.py [OPTIONS] COMMAND [ARGS]...
Generate autostereograms with text.
Be sure to read over the readme to get a good idea of what input is
expected.
Options:
--help Show this message and exit.
Commands:
panel Generates 2 panels, each with a slightly...
sirt Generates a single block of seemingly random...
~/stereo_text/ $ cat ./sirt_example.txt
00000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000
00000000011111111110000011111111110000000000000000000000000000000
00000000001111111100000001111111100000000000000000000000000000000
00000000001111111100000001111111100000111111100000000000000000000
00000000001111111100000001111111100000111111100000000000000000000
00000000001111111100000001111111100000111111100000000000000000000
00000000001111111100000001111111100000000000000000000000000000000
00000000001111111111111111111111100001111111100000000000000000000
00000000001111111100000001111111100000111111100000000000000000000
00000000001111111100000001111111100000111111100000000000000000000
00000000001111111100000001111111100000111111100000000000000000000
00000000001111111100000001111111100000111111100000000000000000000
00000000001111111100000001111111100000111111100001111000000000000
00000000011111111110000011111111110001111111110001111000000000000
00000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000
22222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222
22222222211111111112222211111111112222222222222222222222222222222
22222222221111111122222221111111122222222222222222222222222222222
22222222221111111122222221111111122222111111122222222222222222222
22222222221111111122222221111111122222111111122222222222222222222
22222222221111111122222221111111122222111111122222222222222222222
22222222221111111122222221111111122222222222222222222222222222222
22222222221111111111111111111111122221111111122222222222222222222
22222222221111111122222221111111122222111111122222222222222222222
22222222221111111122222221111111122222111111122222222222222222222
22222222221111111122222221111111122222111111122222222222222222222
22222222221111111122222221111111122222111111122222222222222222222
22222222221111111122222221111111122222111111122221111222222222222
22222222211111111112222211111111112221111111112221111222222222222
22222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222
~/stereo_text/ $ stereo_text sirt ./sirt_example.txt
CEOIA810Z4MH3NKCEOIA810Z4MH3NKCEOIA810Z4MH3NKCEOIA810Z4MH3NKCEOIA810Z4MH3NKCEOI
NSEI2FP5U1HJA3RNSEI2FP5U1HJA3RNSEI2FP5U1HJA3RNSEI2FP5U1HJA3RNSEI2FP5U1HJA3RNSEI
0ED9N24C61RZGXS0ED9N24C61RZGXS0ED9N24C61RZGXS0ED9N24C61RZGXS0ED9N24C61RZGXS0ED9
L9FV4WZXR1CMBS6L9FV4WZXR1CMBS6L9FV4WZXR1CMBS6L9FV4WZXR1CMBS6L9FV4WZXR1CMBS6L9FV
LQN0IVEAJC59KR8LQN0IVEAC59KR8LQN04IVEA59KR8LQN04PIVEA59KR8LQN04PIVEA59KR8LQN04P
SY6D79O5CUQ0PE2SY6D79O5CQ0PE2SY6AD79O5C0PE2SY6AQD79O5C0PE2SY6AQD79O5C0PE2SY6AQD
170J5LHKNPXVWAI170J5LHKNXVWAI170CJ5LHKNVWAI170CZJ5LHNVWAI17S0CZJ5LHNVWA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