Jigsaw-Puzzle-Solver

Jigsaw Puzzle Solver

Introduction

This project is for Huawei Honorcup Marathon 2.
There are a set of images , each has a size of 512×512 pixels. Divide each image into m×m square fragments of p×p (p=64/32/16) pixels (m=512/p) and rearrange them to restore the original image.

Result


64x64

32x32

16x16

Compile

This project is all .h files except main.cpp, so you can build it easily like this

> g++ -O2 -o jigsaw src/main.cpp -std=c++17   

Reference

An Automatic Solver for Very Large Jigsaw Puzzles Using Genetic Algorithms