From: <bl...@us...> - 2008-11-13 21:27:24
|
Revision: 3550 http://hugin.svn.sourceforge.net/hugin/?rev=3550&view=rev Author: blimbo Date: 2008-11-13 21:27:21 +0000 (Thu, 13 Nov 2008) Log Message: ----------- celeste progress dialogue in AssistantPanel improvement Modified Paths: -------------- hugin/trunk/src/hugin1/hugin/AssistantPanel.cpp hugin/trunk/src/hugin1/hugin/ImagesPanel.cpp Modified: hugin/trunk/src/hugin1/hugin/AssistantPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/AssistantPanel.cpp 2008-11-13 21:05:34 UTC (rev 3549) +++ hugin/trunk/src/hugin1/hugin/AssistantPanel.cpp 2008-11-13 21:27:21 UTC (rev 3550) @@ -394,7 +394,7 @@ bool createCtrlP = m_pano->getNrOfCtrlPoints() == 0; - ProgressReporterDialog progress(5, _("Aligning images"), _("Finding corresponding points"),this); + ProgressReporterDialog progress(6, _("Aligning images"), _("Finding corresponding points"),this); wxString alignMsg; if (createCtrlP) { AutoCtrlPointCreator matcher; @@ -433,11 +433,12 @@ // SVM model file if ( wxFile::Exists(wxString::FromAscii(buf)) ) { - - progress.increaseProgress(1.0, std::string(wxString(_("Running Celeste")).mb_str(wxConvLocal))); - + for (unsigned int imgNr = 0; imgNr < m_pano->getNrOfImages() - 1; imgNr++){ + double progress_amount = (double)1/m_pano->getNrOfImages(); + progress.increaseProgress(progress_amount, std::string(wxString(_("Running Celeste")).mb_str(wxConvLocal))); + const CPVector & controlPoints = m_pano->getCtrlPoints(); unsigned int removed = 0; @@ -446,6 +447,9 @@ PT::ControlPoint point = *it; if (imgNr == point.image1Nr){ gNumLocs++; + } + if (imgNr == point.image2Nr){ + gNumLocs++; } } @@ -463,6 +467,12 @@ global_cp_nr.push_back(cp_counter); glocation_counter++; } + if (imgNr == point.image2Nr){ + gLocations[glocation_counter][0] = (int)point.x2; + gLocations[glocation_counter][1] = (int)point.y2; + global_cp_nr.push_back(cp_counter); + glocation_counter++; + } cp_counter++; } Modified: hugin/trunk/src/hugin1/hugin/ImagesPanel.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/ImagesPanel.cpp 2008-11-13 21:05:34 UTC (rev 3549) +++ hugin/trunk/src/hugin1/hugin/ImagesPanel.cpp 2008-11-13 21:27:21 UTC (rev 3550) @@ -782,13 +782,6 @@ if (imgNr == point.image2Nr){ gNumLocs++; } - - //if (imgNr == pano->getNrOfImages()-1){ - // if (imgNr == point.image2Nr){ - // //cout << "Loading CPs for image " << imgNr << endl; - // gNumLocs++; - // } - //} } // Create the storage matrix @@ -814,15 +807,6 @@ global_cp_nr.push_back(cp_counter); glocation_counter++; } - - //if ((imgNr == pano->getNrOfImages()-1) && (imgNr == point.image2Nr)){ - //cout << "---imgNr = " << imgNr << " point.image2Nr = " << point.image2Nr << endl; - // gLocations[glocation_counter][0] = (int)point.x2; - // gLocations[glocation_counter][1] = (int)point.y2; - // global_cp_nr.push_back(cp_counter); - //cout << "CP " << (int)point.x2 << "," << (int)point.y2 << endl; - // glocation_counter++; - //} cp_counter++; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |