- Timestamp:
- 03/16/06 15:31:20 (19 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h
r704 r705 146 146 float &pvsEnlargement) 147 147 { 148 pvsReduction = 0.0f; 149 pvsEnlargement = 0.0f; 148 150 // Uses sum of log differences, which corresponds to entropy 149 151 std::map<T, PvsData<T>, LtSample<T> >::iterator it; -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r704 r705 553 553 int GetBestViewCellIdx(ViewCell *root, const ViewCellContainer &neighborhood) 554 554 { 555 int bestViewCellIdx = -1;;555 int bestViewCellIdx = 0; 556 556 557 557 float mergeCost = Limits::Infinity; … … 563 563 { 564 564 const float mc = EvalMergeCost(root, *it); 565 566 if (mc >mergeCost)565 566 if (mc < mergeCost) 567 567 { 568 568 mergeCost = mc; … … 586 586 //-- use priority queue to merge leaf pairs 587 587 588 588 //cout << "neighborhood: " << neighborhood.size() << endl; 589 589 //const float maxAvgCost = 350; 590 590 for (int nMergedViewCells = 0; nMergedViewCells < n; ++ nMergedViewCells) … … 593 593 594 594 ViewCell *bestViewCell = neighborhood[bestViewCellIdx]; 595 595 cout << "here2" << endl; 596 596 // remove from vector 597 597 swap(neighborhood[bestViewCellIdx], neighborhood.back()); 598 598 neighborhood.pop_back(); 599 599 600 cout << "vc idx: " << bestViewCellIdx << endl; 600 601 if (!bestViewCell || !root) 601 602 cout << "warning!!" << endl; 603 604 cout << "here4" << endl; 605 602 606 // create new root of the hierarchy 603 607 root = MergeViewCells(root, bestViewCell); 608 cout << "here5" << endl; 604 609 } 605 610 … … 939 944 // generate parent view cell 940 945 ViewCellInterior *vc = new ViewCellInterior();//GenerateViewCell(); 941 946 cout << "here66" << endl; 942 947 vc->GetPvs() = left->GetPvs(); 948 cout << "here44" << endl; 943 949 // merge pvs 944 950 vc->GetPvs().Merge(right->GetPvs()); … … 955 961 } 956 962 957 963 cout << "here77" << endl; 958 964 vc->SetupChildLink(left); 965 cout << "here88" << endl; 959 966 vc->SetupChildLink(right); 960 967 cout << "here99" << endl; 961 968 962 969 return vc; … … 4020 4027 4021 4028 exporter->SetFilled(); 4022 exporter->ResetForcedMaterial(); 4023 4029 4030 exporter->SetForcedMaterial(RgbColor(0,1,0)); 4031 ExportViewCellGeometry(exporter, GetViewCell(viewPoint)); 4032 4033 //exporter->ResetForcedMaterial(); 4034 exporter->SetForcedMaterial(RgbColor(0,0,1)); 4024 4035 ExportViewCellGeometry(exporter, testPrVs.mViewCell); 4025 4036
Note: See TracChangeset
for help on using the changeset viewer.