added differenct mat read
This commit is contained in:
parent
4701720d3a
commit
835cba33dd
@ -146,6 +146,7 @@ Mat Puzzle::resultImage( vector<LogEntry>& log){
|
|||||||
cout<<"partW "<<partWidth <<endl<<"partH " <<partHeight<<endl<<endl;
|
cout<<"partW "<<partWidth <<endl<<"partH " <<partHeight<<endl<<endl;
|
||||||
Mat result(imageH,imageW,CV_8UC3);
|
Mat result(imageH,imageW,CV_8UC3);
|
||||||
|
|
||||||
|
char name[100];
|
||||||
for (auto it:log)
|
for (auto it:log)
|
||||||
{
|
{
|
||||||
cout << log.size() << endl;
|
cout << log.size() << endl;
|
||||||
@ -156,7 +157,9 @@ Mat Puzzle::resultImage( vector<LogEntry>& log){
|
|||||||
int imageNumber = it.PieceCollector[0].second->GetPartID();
|
int imageNumber = it.PieceCollector[0].second->GetPartID();
|
||||||
//cout<<"imageIndex: "<< imageNumber << endl;
|
//cout<<"imageIndex: "<< imageNumber << endl;
|
||||||
|
|
||||||
Mat img = readImage(imageNumber,PATH);
|
sprintf(name, PATH, imageNumber);
|
||||||
|
Mat img = imread(name, 1);
|
||||||
|
|
||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user