manual debugger action
program seems to break debugger. not sure why.
This commit is contained in:
		@@ -1,7 +1,6 @@
 | 
				
			|||||||
//
 | 
					//
 | 
				
			||||||
// Created by Raphael Maenle on 21/12/2017.
 | 
					// Created by Raphael Maenle on 21/12/2017.
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "../../header/solve.h"
 | 
					#include "../../header/solve.h"
 | 
				
			||||||
#include "../../header/input.h"
 | 
					#include "../../header/input.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -148,24 +147,24 @@ Mat Puzzle::resultImage( vector<LogEntry>& log){
 | 
				
			|||||||
    char name[100];
 | 
					    char name[100];
 | 
				
			||||||
    for (auto it:log)
 | 
					    for (auto it:log)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        cout << log.size() << endl;
 | 
					 | 
				
			||||||
        cout << log[0].PieceCollector.size() << endl;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            cout << it.PieceCollector[0].second->GetPartID() << endl;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        cout << "row: " << it.myCoor.row << ", col: " << it.myCoor.col << endl;
 | 
				
			||||||
 | 
					        cout << "ID:" << it.PieceCollector[0].second->GetPartID() << endl;
 | 
				
			||||||
        int imageNumber = it.PieceCollector[0].second->GetPartID();
 | 
					        int imageNumber = it.PieceCollector[0].second->GetPartID();
 | 
				
			||||||
        //cout<<"imageIndex: "<< imageNumber << endl;
 | 
					        //cout<<"imageIndex: "<< imageNumber << endl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        sprintf(name, PATH, imageNumber);
 | 
					        sprintf(name, PATH, imageNumber);
 | 
				
			||||||
        Mat img = imread(name, 1);
 | 
					        Mat img = imread(name, 1);
 | 
				
			||||||
 | 
					        cout << "loc: " << name << endl;
 | 
				
			||||||
 | 
					        cout << "img size: " << img.size() << endl;
 | 
				
			||||||
        int angle = it.PieceCollector[0].second->GetNumOfRotations()*90;
 | 
					        int angle = it.PieceCollector[0].second->GetNumOfRotations()*90;
 | 
				
			||||||
        Point2f center;
 | 
					        Point2f center;
 | 
				
			||||||
        center.x = img.cols/2;
 | 
					        center.x = img.cols/2;
 | 
				
			||||||
        center.y = img.rows/2;
 | 
					        center.y = img.rows/2;
 | 
				
			||||||
        Mat RotMatrix = getRotationMatrix2D(center,angle,1);
 | 
					        Mat RotMatrix = getRotationMatrix2D(center,angle,1);
 | 
				
			||||||
        warpAffine(img,img,RotMatrix, img.size());
 | 
					        warpAffine(img,img,RotMatrix, img.size());
 | 
				
			||||||
//            imshow("readImg",img); // you can comment with Ctrl + / did you know? :D
 | 
					        cout << "warped" << endl;
 | 
				
			||||||
 | 
					//            imshow("readImg",img); // you can comment with Ctrl + / did you know? :D nop, but that's useful, tx
 | 
				
			||||||
//            waitKey(0);
 | 
					//            waitKey(0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        auto ROI_X = int(round(it.myCoor.col*partWidth));
 | 
					        auto ROI_X = int(round(it.myCoor.col*partWidth));
 | 
				
			||||||
@@ -173,11 +172,14 @@ Mat Puzzle::resultImage( vector<LogEntry>& log){
 | 
				
			|||||||
//            cout<<"ROI X: "<< ROI_X<<endl;
 | 
					//            cout<<"ROI X: "<< ROI_X<<endl;
 | 
				
			||||||
//            cout<<"ROI Y: "<< ROI_Y<<endl;
 | 
					//            cout<<"ROI Y: "<< ROI_Y<<endl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        cout << "recing" << endl;
 | 
				
			||||||
        Rect ROI(ROI_X,ROI_Y , partWidth-separator, partHeight-separator); // j is the x coordinate not i!!
 | 
					        Rect ROI(ROI_X,ROI_Y , partWidth-separator, partHeight-separator); // j is the x coordinate not i!!
 | 
				
			||||||
 | 
					        cout << "reced" << endl;
 | 
				
			||||||
        Mat temp; resize(img,temp, Size(ROI.width, ROI.height));
 | 
					        Mat temp; resize(img,temp, Size(ROI.width, ROI.height));
 | 
				
			||||||
 | 
					        cout << "resized" << endl;
 | 
				
			||||||
        temp.copyTo(result(ROI));
 | 
					        temp.copyTo(result(ROI));
 | 
				
			||||||
 | 
					        cout << "copied" << endl;
 | 
				
			||||||
//            imshow("result",result);
 | 
					            imshow("result",result);
 | 
				
			||||||
//            waitKey(0);
 | 
					//            waitKey(0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user