Skip to content

Commit

Permalink
Removed using namespace std; decklaration since that's dangerous in a
Browse files Browse the repository at this point in the history
header, and added std:: specifiers to iostream functions.
  • Loading branch information
ljexplore committed Feb 5, 2007
1 parent 557324e commit a8116d4
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/vw/InterestPoint/ImageOctave.h
Expand Up @@ -11,7 +11,6 @@
// STL
#include <vector>
#include <iostream>
using namespace std;

// A magic number, this value used by Lowe. Learn this parameter?
#define INITIAL_SIGMA (1.6)
Expand All @@ -37,8 +36,8 @@ class ImageOctave {
int num_planes; // Number of planes (P+2) for ratio of 2^(1/P)
float init_sigma; // Initial sigma to apply to base level image
float sigma_ratio; // Ratio of sigmas between levels:
vector<float> sigma; // sigmas corresponding to scales
vector< ImageView<PixelT> > scales; // Scaled images in the octave
std::vector<float> sigma; // sigmas corresponding to scales
std::vector< ImageView<PixelT> > scales; // Scaled images in the octave

// This constructor is intended for building the first octave from a
// source image.
Expand Down Expand Up @@ -102,7 +101,8 @@ class ImageOctave {

// Blur images. Assume some sigma for the first one.
vw::vw_out(DebugMessage) << "assuming camera_sigma " << CAMERA_SIGMA
<< ", can we devise a way to find it?" << endl;
<< ", can we devise a way to find it?"
<< std::endl;
float camera_sigma = CAMERA_SIGMA;

// Sigma to use for blurring step to achieve a final sigma in each
Expand All @@ -113,15 +113,17 @@ class ImageOctave {
if (sigma[0]>camera_sigma){
use_sigma = sqrt( sigma[0]*sigma[0] - camera_sigma*camera_sigma );
vw::vw_out(DebugMessage) << "making plane " << 0 << " using sigma "
<< use_sigma << " so final sigma is " << sigma[0] << endl;
<< use_sigma << " so final sigma is "
<< sigma[0] << std::endl;
scales[0] = vw::gaussian_filter(scales[0], use_sigma);
}

// Each next plane is blurred version of the previous
for (int i=1; i<num_planes; i++){
use_sigma = sqrt( sigma[i]*sigma[i] - sigma[i-1]*sigma[i-1] );
vw::vw_out(DebugMessage) << "making plane " << i << " using sigma "
<< use_sigma << " so final sigma is " << sigma[i] << endl;
<< use_sigma << " so final sigma is "
<< sigma[i] << std::endl;
scales[i] = vw::gaussian_filter(scales[i-1], use_sigma);
}

Expand Down Expand Up @@ -161,7 +163,8 @@ class ImageOctave {
for (int k=2; k<num_planes; k++){
use_sigma = sqrt( sigma[k]*sigma[k] - sigma[k-1]*sigma[k-1] );
vw::vw_out(DebugMessage) << "making plane " << k << " using sigma "
<< use_sigma << " so final sigma is " << sigma[k] << endl;
<< use_sigma << " so final sigma is "
<< sigma[k] << std::endl;
scales[k] = vw::gaussian_filter(scales[k-1], use_sigma);
}

Expand Down

0 comments on commit a8116d4

Please sign in to comment.