The program is executed by running the file 'main-nonogram.m'. Place the image that you want to have a puzzle for it in the same directory and change variable, filename (line 7), to the name of your image file. Since I wanted to keep the code as general as possible you have to tweak the scaling based on your input image. You might have an image which has 1000-by-1000 pixels. The generated puzzle will still be accurate but as you can imagine not that easy to solve (unless you are up to an extreme challange!). So change the variable, scale (line 13), to a value that makes sense to you. This can be a bit tricky because you might lose your image's resolution, so my advice is to input a simple image ;)
main-nonogram.m will call the functions countcell.m and maketext.m and save a spreadsheet in your directory with the same name as filename.
I hope you enjoy the code!
Hengameh Noshahri (2021). Nonogram puzzle creator based on input images (https://www.mathworks.com/matlabcentral/fileexchange/81968-nonogram-puzzle-creator-based-on-input-images), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!