~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to extern/libmv/libmv/simple_pipeline/resect.cc

  • Committer: Reinhard Tartler
  • Date: 2014-05-31 01:50:05 UTC
  • mfrom: (14.2.27 sid)
  • Revision ID: siretart@tauware.de-20140531015005-ml6druahuj82nsav
mergeĀ fromĀ debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
 
92
92
}  // namespace
93
93
 
94
 
bool EuclideanResect(const ReconstructionOptions &options,
95
 
                     const vector<Marker> &markers,
 
94
bool EuclideanResect(const vector<Marker> &markers,
96
95
                     EuclideanReconstruction *reconstruction, bool final_pass) {
97
96
  if (markers.size() < 5) {
98
97
    return false;
107
106
  Mat3 R;
108
107
  Vec3 t;
109
108
 
110
 
  double success_threshold = std::numeric_limits<double>::max();
111
 
 
112
 
  if (options.use_fallback_reconstruction)
113
 
    success_threshold = options.success_threshold;
114
 
 
115
109
  if (0 || !euclidean_resection::EuclideanResection(
116
110
                points_2d, points_3d, &R, &t,
117
 
                euclidean_resection::RESECTION_EPNP,
118
 
                success_threshold)) {
 
111
                euclidean_resection::RESECTION_EPNP)) {
119
112
    // printf("Resection for image %d failed\n", markers[0].image);
120
113
    LG << "Resection for image " << markers[0].image << " failed;"
121
114
       << " trying fallback projective resection.";
122
115
 
123
 
    if (!options.use_fallback_reconstruction) {
124
 
        LG << "No fallback; failing resection for " << markers[0].image;
125
 
        return false;
126
 
    }
 
116
    LG << "No fallback; failing resection for " << markers[0].image;
 
117
    return false;
127
118
 
128
119
    if (!final_pass) return false;
129
120
    // Euclidean resection failed. Fall back to projective resection, which is