biswajitsc / jigsaw-solver

A jigsaw puzzle solver for randomly shuffled square shaped images.
28 stars 11 forks source link

how about handling non-square images? #2

Open evandrix opened 6 years ago

evandrix commented 6 years ago

can the existing code be modified in some way? e.g. 1280x720 image https://preview.ibb.co/mxGXx7/jigsaw.png

Ri1a commented 6 years ago

You can put this picture into pieces with this tool. Enter the side length of square piece: "40". My problem is that I can't compile the compile_solver.sh with: "./compile_solver.sh".

Error: In file included from ./src/solver.cpp:21:0: ./src/MST_solver.cpp: In member function ‘std::vector MST::get_mst(int, int)’: ./src/MST_solver.cpp:78:2: error: ‘set’ was not declared in this scope set S; ^~~ ./src/MST_solver.cpp:78:2: note: suggested alternative: ‘getw’ set S; ^~~ getw ./src/MST_solver.cpp:78:9: error: expected primary-expression before ‘>’ token set S; ^ ./src/MST_solver.cpp:78:11: error: ‘S’ was not declared in this scope set S;

EDIT: Hacking-lab challenge;)

AtomicGaryBusey commented 5 years ago

@RiccardoLandolfo ok lol this is the darndest thing, but I encountered your same issue on my side and fixed it. You need to open src/MST_solver.h and add the following to the bottom of the #include block at the top:

include "set"

After that it compiles successfully. D'oh.

@biswajitsc is this something you can change directly? Or I can do a PR with the change. Either way.

anmolgulati commented 5 years ago

@AtomicGaryBusey, Sure! Feel free to send a PR :D