A script that deciphers the text in the game Fez using computer vision and statical analysis.
The deciphering of the language in Fez is divided in two phases.
With multi-scale template matching, the quantity of each symbol is determined using all screenshots of symbol-text present in the database/ folder.
Then, with statistical analysis, the most common english letters are determined. For the other letters, the help of a human is required.
We have then the mapping between symbols and english letters.
Now, the useful part. Given a picture of a symbol-text, the script produces an image with the symbols replaced by english letters. Additionally, the user may opt for a text output.
- Python 2.7
- Numpy
- Matplotlib
- OpenCV 3.x
Setting up:
$ python setup.py
To generate the mapping:
$ decipher-symbols.py
Then for each image of symbol-text you want to translate:
$ translate [-t|-i] <image>
If you'd like to contribute, please use Flake8 and its pre-commit hook:
$ pip install pep8-naming flake8
$ flake8 --install-hook
$ git config flake8.strict true
- http://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_template_matching/py_template_matching.html
- http://machinelearningmastery.com/using-opencv-python-and-template-matching-to-play-wheres-waldo/
- http://www.pyimagesearch.com/2015/01/26/multi-scale-template-matching-using-python-opencv/
- http://practicalcryptography.com/cryptanalysis/text-characterisation/quadgrams/