This commit is contained in:
Raphael Maenle 2018-01-29 13:41:19 +01:00
parent 79109e1d34
commit 5029044157
3 changed files with 4 additions and 2 deletions

View File

@ -8,7 +8,7 @@ bool AbstractionLayer_ColorMatching::PreProcessing(coor mySize, const vector<Par
InitialiseConstraintMatrixSize(mySize.col, mySize.row); //col row switched in this function InitialiseConstraintMatrixSize(mySize.col, mySize.row); //col row switched in this function
//**Get color for constraint matrix**// //**Get color for constraint matrix**//
Mat puzzle = imread("puzzle1.jpg", IMREAD_COLOR); // Read the picture of the puzzle Mat puzzle = imread(PATH_FULL_PUZZLE, IMREAD_COLOR); // Read the picture of the puzzle
if (puzzle.empty()) // Check for invalid input if (puzzle.empty()) // Check for invalid input
{ {
cout << "Could not open or find the image" << std::endl; cout << "Could not open or find the image" << std::endl;

View File

@ -16,7 +16,7 @@
//#include <cstdlib> //#include <cstdlib>
#include <cmath> #include <cmath>
#define PATH_FULL_PUZZLE "..\\..\\..\\puzzle_img_bb\\puzzle2.jpg"
#ifdef _WIN32 #ifdef _WIN32
//#define PATH "..\\..\\..\\pieces\\%04d.jpg" //#define PATH "..\\..\\..\\pieces\\%04d.jpg"
#elif defined __unix__ #elif defined __unix__

View File

@ -127,6 +127,7 @@ void setsolution(vector<LogEntry>& log, Puzzle& puzzleMat)
bool backtrack(vector<LogEntry>& log, Puzzle& puzzleMat) bool backtrack(vector<LogEntry>& log, Puzzle& puzzleMat)
{ {
puzzleMat.resultImage(log);
cout << "backtrack" << endl; cout << "backtrack" << endl;
if(log.empty()) if(log.empty())
{ {
@ -209,6 +210,7 @@ float capLogElements(vector<LogEntry>& log)
} }
cut(log,id);//for debugging cut(log,id);//for debugging
return 0;//for debugging return 0;//for debugging
int newid=0; int newid=0;
//check if all over //check if all over
if(id==log.back().PieceCollector.size()) if(id==log.back().PieceCollector.size())