added a4 result presentation
This commit is contained in:
parent
a289ccee57
commit
d3d7d53a45
@ -6,7 +6,7 @@
|
||||
#include "opencv2/imgproc/imgproc.hpp"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define PATH_FULL_PUZZLE "..\\..\\..\\puzzle_img\\puzzle1.jpg"
|
||||
#define PATH_FULL_PUZZLE "..\\..\\..\\puzzle_img\\puzzle2.jpg"
|
||||
#elif defined __unix__
|
||||
#define PATH_FULL_PUZZLE "..//..//..//puzzle_img//puzzle1.jpg"
|
||||
#elif defined __APPLE__
|
||||
|
@ -65,8 +65,8 @@ void Puzzle::shuffle()
|
||||
//deletes all constraints from all abstractionlayers
|
||||
void Puzzle::removeConstrains(coor removeCoordinates)
|
||||
{
|
||||
// this->a1.RemoveConstraintOnPosition(removeCoordinates);
|
||||
// this->a3.RemoveConstraintOnPosition(removeCoordinates);
|
||||
this->a1.RemoveConstraintOnPosition(removeCoordinates);
|
||||
//this->a3.RemoveConstraintOnPosition(removeCoordinates);
|
||||
this->a4.RemoveConstraintOnPosition(removeCoordinates);
|
||||
//TODO!! Add other layer remove here
|
||||
}
|
||||
@ -78,7 +78,7 @@ void Puzzle::setConstraints(coor setConstraints, Part* constraintPiece)
|
||||
// this->dp.m_constraintMatrix[setConstraints.col][setConstraints.row].DestructionArray.emplace_back(it);
|
||||
|
||||
//a1
|
||||
//this->a1.SetConstraintOnPosition(setConstraints,constraintPiece->m_a1);
|
||||
this->a1.SetConstraintOnPosition(setConstraints,constraintPiece->m_a1);
|
||||
|
||||
//a3
|
||||
//this->a3.SetConstraintOnPosition(setConstraints,constraintPiece->m_a3);
|
||||
@ -192,12 +192,6 @@ Mat Puzzle::resultImage( vector<LogEntry>& log){
|
||||
Mat invert = Mat::ones(img.size(), CV_8UC3); // invert for rotation to work correctly
|
||||
bitwise_not ( img, invert );
|
||||
|
||||
if (it.myCoor.col == 35 && it.myCoor.row == 5)
|
||||
{
|
||||
//imshow("img",img);
|
||||
//waitKey(0);
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
int angle = ((int)it.PieceCollector[0].second->GetNumOfRotations())*-90;
|
||||
|
@ -95,8 +95,6 @@ void solve(vector<LogEntry>& log,Puzzle& puzzleMat)
|
||||
break;
|
||||
}
|
||||
float worth = capLogElements(log);
|
||||
cout << " | " << worth << endl;
|
||||
|
||||
// calculateTrueDestructionPower(log,puzzleMat, worth);
|
||||
CalculateNewCombinedQuality(log, log.back().PieceCollector, puzzleMat.combinedQualityVector);
|
||||
|
||||
@ -120,6 +118,11 @@ void setsolution(vector<LogEntry>& log, Puzzle& puzzleMat)
|
||||
cout << "set:" << log.back().myCoor.col << "," << log.back().myCoor.row << endl;
|
||||
//cout << "ID: " << log.back().PieceCollector[0].second->GetPartID() << endl;
|
||||
cout << "Size of Log: " << log.back().PieceCollector.size() << endl;
|
||||
//if(log.back().myCoor.col==32 && log.back().myCoor.row==16)
|
||||
//{
|
||||
// puzzleMat.resultImage(log);
|
||||
// waitKey(0);
|
||||
// }
|
||||
}
|
||||
|
||||
bool backtrack(vector<LogEntry>& log, Puzzle& puzzleMat)
|
||||
|
Loading…
Reference in New Issue
Block a user