Skip to content

Commit

Permalink
Fix old dependency problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Rosten committed Apr 6, 2016
1 parent 4de2ccb commit ecabf3c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cvd_src/convolution.cc
@@ -1,5 +1,5 @@
#include "cvd/abs.h"
#include "cvd/convolution.h"
#include <cmath>
using namespace std;

namespace CVD {
Expand Down Expand Up @@ -152,7 +152,7 @@ void compute_van_vliet_scaled_d(double sigma, double d[])
compute_scaling_jacobian(d, sj);
double v = target_var - compute_van_vliet_variance(d, vj);
double step = v / (vj[0]*sj[0] + vj[1]*sj[1] + vj[2]*sj[2]);
if (CVD::abs<double>(step) < 1e-6)
if (abs<double>(step) < 1e-6)
break;
double exp_step = exp(std::min(std::max(step, -1.0), 1.0));
scale_d(d, exp_step);
Expand Down
13 changes: 10 additions & 3 deletions progs/calibrate.cxx
Expand Up @@ -2,6 +2,7 @@
#include <iostream>
#include <fstream>
#include <sstream>
#include <random>

#include <TooN/helpers.h>
#include <TooN/Cholesky.h>
Expand All @@ -15,7 +16,6 @@
#include <cvd/image_io.h>
#include <cvd/image_interpolate.h>
#include <cvd/glwindow.h>
#include <cvd/random.h>
#include <cvd/timer.h>
#include <cvd/colourspaces.h>
#include <cvd/colourspace_convert.h>
Expand Down Expand Up @@ -702,6 +702,15 @@ bool optimiseIntersection(image_interpolate<Interpolate::Bilinear, float> &imgIn
return (fabs(aboveVal - belowVal) < 1 && fabs(leftVal - rightVal) < 1);
}

mt19937 engine;
normal_distribution<double> gaussian;

double rand_g()
{
return gaussian(engine);
}


int main(int argc, char* argv[])
{
getOptions(argc, argv);
Expand Down Expand Up @@ -734,8 +743,6 @@ int main(int argc, char* argv[])
disp.set_title(titlePrefix);

double curr = timer.get_time();
srand48(static_cast<long int>(curr));
srand(static_cast<unsigned int>(curr));
imageSize = videoBuffer->size();

cameraModel.get_parameters() = cameraParameters;
Expand Down

0 comments on commit ecabf3c

Please sign in to comment.