Skip to content

Commit

Permalink
Updated many headers to enforce better inclusions and forward declara…
Browse files Browse the repository at this point in the history
…tions

Change-Id: I4189c31faa17610607b828a8d416be2013fbb49b
  • Loading branch information
sweeneychris committed Oct 29, 2016
1 parent f405951 commit 608b026
Show file tree
Hide file tree
Showing 83 changed files with 165 additions and 166 deletions.
4 changes: 1 addition & 3 deletions applications/convert_sift_key_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@
#include <Eigen/Core>
#include <glog/logging.h>
#include <gflags/gflags.h>
#include <theia/theia.h>
#include <string>
#include <vector>

#include "theia/io/sift_text_file.h"
#include "theia/io/sift_binary_file.h"

DEFINE_string(input_sift_key_file, "",
"Input sift key text file to convert. Should end in .key");

Expand Down
1 change: 0 additions & 1 deletion src/theia/image/descriptor/akaze_descriptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include "glog/logging.h"

#include "theia/image/image.h"
#include "theia/image/descriptor/descriptor_extractor.h"
#include "theia/image/keypoint_detector/keypoint.h"

namespace theia {
Expand Down
2 changes: 1 addition & 1 deletion src/theia/image/descriptor/akaze_descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
#include <vector>

#include "theia/image/descriptor/descriptor_extractor.h"
#include "theia/image/keypoint_detector/keypoint.h"
#include "theia/util/util.h"

namespace theia {

class FloatImage;
class Keypoint;

// Parameters for the akaze feature extractor.
struct AkazeParameters {
Expand Down
1 change: 1 addition & 0 deletions src/theia/image/descriptor/akaze_descriptor_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#include "theia/image/image.h"
#include "theia/image/descriptor/akaze_descriptor.h"
#include "theia/image/keypoint_detector/keypoint.h"

DEFINE_string(test_img, "image/descriptor/img1.png",
"Name of test image file.");
Expand Down
5 changes: 1 addition & 4 deletions src/theia/image/descriptor/create_descriptor_extractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@

#include <memory>

#include "theia/image/descriptor/akaze_descriptor.h"
#include "theia/image/descriptor/descriptor_extractor.h"
#include "theia/image/keypoint_detector/sift_parameters.h"

namespace theia {
class DescriptorExtractor;

// The various types of feature descriptors you can choose. We use the default
// keypoint extractor for each feature type. Since this is a convenience class
Expand Down
4 changes: 1 addition & 3 deletions src/theia/image/descriptor/descriptor_extractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,14 @@
#ifndef THEIA_IMAGE_DESCRIPTOR_DESCRIPTOR_EXTRACTOR_H_
#define THEIA_IMAGE_DESCRIPTOR_DESCRIPTOR_EXTRACTOR_H_

#include <glog/logging.h>
#include <Eigen/Core>
#include <algorithm>
#include <vector>

#include "theia/image/keypoint_detector/keypoint.h"
#include "theia/util/util.h"

namespace theia {
class FloatImage;
class Keypoint;

// This interface class is meant to define all descriptor extractors. Different
// descriptor types may be easily implemented by deriving from this class.
Expand Down
2 changes: 1 addition & 1 deletion src/theia/image/descriptor/sift_descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ extern "C" {
#include <vector>

#include "theia/image/descriptor/descriptor_extractor.h"
#include "theia/image/keypoint_detector/keypoint.h"
#include "theia/image/keypoint_detector/sift_parameters.h"
#include "theia/util/util.h"

namespace theia {

class FloatImage;
class Keypoint;

class SiftDescriptorExtractor : public DescriptorExtractor {
public:
Expand Down
9 changes: 0 additions & 9 deletions src/theia/image/image.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,8 @@
#define THEIA_IMAGE_IMAGE_H_

#include <Eigen/Core>
#include <glog/logging.h>
#include <OpenImageIO/imagebuf.h>

#include <algorithm>
#include <cmath>
#include <limits>
#include <memory>
#include <string>
#include <vector>

#include "theia/util/util.h"

namespace theia {

Expand Down
2 changes: 1 addition & 1 deletion src/theia/image/image_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
#include <memory>
#include <string>

#include "theia/image/image.h"
#include "theia/util/lru_cache.h"

namespace theia {
class FloatImage;

// An LRU cache for retreiving images from disk. It is assumed that all images
// are held in the same directory and are referenced by their filename
Expand Down
2 changes: 1 addition & 1 deletion src/theia/image/keypoint_detector/sift_detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ extern "C" {
#include <vector>

#include "theia/image/keypoint_detector/keypoint_detector.h"
#include "theia/image/keypoint_detector/keypoint.h"
#include "theia/image/keypoint_detector/sift_parameters.h"
#include "theia/util/util.h"

namespace theia {
class FloatImage;
class Keypoint;

// SIFT detector as originally proposed by David Lowe. This relies on the open
// source software VLFeat (www.vlfeat.org) to detect keypoints.
Expand Down
3 changes: 3 additions & 0 deletions src/theia/io/import_nvm_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
#include <vector>

#include "theia/io/import_nvm_file.h"
#include "theia/sfm/camera/camera.h"
#include "theia/sfm/reconstruction.h"
#include "theia/sfm/track.h"
#include "theia/sfm/view.h"
#include "theia/util/filesystem.h"
#include "theia/util/map_util.h"

Expand Down
3 changes: 1 addition & 2 deletions src/theia/io/read_calibration.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@
#include <string>
#include <unordered_map>

#include "theia/sfm/camera_intrinsics_prior.h"

namespace theia {
class CameraIntrinsicsPrior;

// Reads calibration data for images that are to be reconstructed. The
// calibration file should be a text file where each line is in the form of:
Expand Down
4 changes: 1 addition & 3 deletions src/theia/io/read_keypoints_and_descriptors.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@
#include <string>
#include <vector>

#include "theia/alignment/alignment.h"
#include "theia/image/keypoint_detector/keypoint.h"

namespace theia {
class Keypoint;

// Reads the features from a single file.
bool ReadKeypointsAndDescriptors(const std::string& features_file,
Expand Down
4 changes: 2 additions & 2 deletions src/theia/io/read_matches.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
#include <string>
#include <vector>

#include "theia/matching/image_pair_match.h"
#include "theia/sfm/camera_intrinsics_prior.h"

namespace theia {
struct CameraIntrinsicsPrior;
struct ImagePairMatch;

// Reads the feature matches between view pairs as well as the two view geometry
// (i.e., TwoViewInfo) that describes the relative pose between the two
Expand Down
3 changes: 1 addition & 2 deletions src/theia/io/sift_binary_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@
#include <string>
#include <vector>

#include "theia/image/keypoint_detector/keypoint.h"

namespace theia {
class Keypoint;

// Reads a SIFT key files as computed by Lowe's SIFT software:
// http://www.cs.ubc.ca/~lowe/keypoints/
Expand Down
2 changes: 2 additions & 0 deletions src/theia/io/sift_text_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
#include <string>
#include <vector>

#include "theia/image/keypoint_detector/keypoint.h"

namespace theia {

// The sift key file has the following format:
Expand Down
3 changes: 1 addition & 2 deletions src/theia/io/sift_text_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@
#include <string>
#include <vector>

#include "theia/image/keypoint_detector/keypoint.h"

namespace theia {
class Keypoint;

// Reads a SIFT key files as computed by Lowe's SIFT software:
// http://www.cs.ubc.ca/~lowe/keypoints/
Expand Down
4 changes: 1 addition & 3 deletions src/theia/io/write_keypoints_and_descriptors.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@
#include <string>
#include <vector>

#include "theia/alignment/alignment.h"
#include "theia/image/keypoint_detector/keypoint.h"

namespace theia {
class Keypoint;

// Writes the features to a single file.
bool WriteKeypointsAndDescriptors(
Expand Down
5 changes: 2 additions & 3 deletions src/theia/io/write_matches.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@
#include <string>
#include <vector>

#include "theia/matching/image_pair_match.h"
#include "theia/sfm/camera_intrinsics_prior.h"

namespace theia {
struct CameraIntrinsicsPrior;
struct ImagePairMatch;

// Writes the feature matches between view pairs as well as the two view
// geometry (i.e., TwoViewInfo) that describes the relative pose between the two
Expand Down
6 changes: 5 additions & 1 deletion src/theia/matching/brute_force_feature_matcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@
#include <vector>

#include "theia/matching/feature_matcher.h"
#include "theia/matching/indexed_feature_match.h"
#include "theia/util/util.h"

namespace theia {

struct FeatureMatcherOptions;
struct IndexedFeatureMatch;
struct KeypointsAndDescriptors;

// Performs features matching between two sets of features using a brute force
// matching method.
class BruteForceFeatureMatcher : public FeatureMatcher{
Expand Down
6 changes: 4 additions & 2 deletions src/theia/matching/cascade_hashing_feature_matcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@
#include <vector>

#include "theia/matching/cascade_hasher.h"
#include "theia/matching/distance.h"
#include "theia/matching/feature_matcher.h"
#include "theia/matching/indexed_feature_match.h"
#include "theia/util/hash.h"

namespace theia {
class Keypoint;
struct CameraIntrinsicsPrior;
struct IndexedFeatureMatch;
struct KeypointsAndDescriptors;

// Performs features matching between two sets of features using a cascade
// hashing approach. This hashing does not require any training and is extremely
Expand Down
5 changes: 2 additions & 3 deletions src/theia/matching/create_feature_matcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@

#include <memory>

#include "theia/matching/feature_matcher.h"
#include "theia/matching/feature_matcher_options.h"

namespace theia {
class FeatureMatcher;
struct FeatureMatcherOptions;

// The type of matching to perform.
enum class MatchingStrategy {
Expand Down
14 changes: 6 additions & 8 deletions src/theia/matching/feature_matcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,25 @@
#ifndef THEIA_MATCHING_FEATURE_MATCHER_H_
#define THEIA_MATCHING_FEATURE_MATCHER_H_

#include <glog/logging.h>
#include <Eigen/Core>

#include <algorithm>
#include <limits>
#include <memory>
#include <mutex> // NOLINT
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>

#include "theia/matching/feature_correspondence.h"
#include "theia/matching/feature_matcher_options.h"
#include "theia/matching/image_pair_match.h"
#include "theia/matching/keypoints_and_descriptors.h"
#include "theia/sfm/camera_intrinsics_prior.h"
#include "theia/sfm/two_view_match_geometric_verification.h"
#include "theia/util/lru_cache.h"
#include "theia/util/util.h"

namespace theia {
class Keypoint;
struct CameraIntrinsicsPrior;
struct ImagePairMatch;
struct IndexedFeatureMatche;
struct KeypointsAndDescriptors;

// Class for matching features between images. The intended use for these
// classes is for matching photos in image collections, so all pairwise matches
Expand Down
3 changes: 1 addition & 2 deletions src/theia/matching/feature_matcher_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@

#include <vector>

#include "theia/matching/indexed_feature_match.h"

namespace theia {
struct IndexedFeatureMatch;

// Modifies forward matches so that it removes all matches that are not
// contained in the backwards matches.
Expand Down
9 changes: 5 additions & 4 deletions src/theia/matching/guided_epipolar_matcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,20 @@
#define THEIA_MATCHING_GUIDED_EPIPOLAR_MATCHER_H_

#include <Eigen/Core>
#include <functional>
#include <memory>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#include "theia/matching/indexed_feature_match.h"
#include "theia/alignment/alignment.h"
#include "theia/matching/keypoints_and_descriptors.h"
#include "theia/sfm/camera/camera.h"
#include "theia/util/hash.h"
#include "theia/util/random.h"

namespace theia {
class RandomNumberGenerator;
struct IndexedFeatureMatch;

class GuidedEpipolarMatcher {
public:
Expand Down
2 changes: 0 additions & 2 deletions src/theia/math/polynomial.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@
#define THEIA_MATH_POLYNOMIAL_H_

#include <Eigen/Core>
#include <complex>
#include <vector>

namespace theia {

Expand Down
5 changes: 3 additions & 2 deletions src/theia/sfm/bundle_adjustment/bundle_adjust_two_views.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@
#include <Eigen/Core>
#include <vector>

#include "theia/matching/feature_correspondence.h"
#include "theia/sfm/bundle_adjustment/bundle_adjustment.h"
#include "theia/sfm/camera/camera.h"

namespace theia {
class Camera;
struct FeatureCorrespondence;
struct TwoViewInfo;

struct TwoViewInfo;

Expand Down
2 changes: 1 addition & 1 deletion src/theia/sfm/bundle_adjustment/bundle_adjustment.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifndef THEIA_SFM_BUNDLE_ADJUSTMENT_BUNDLE_ADJUSTMENT_H_
#define THEIA_SFM_BUNDLE_ADJUSTMENT_BUNDLE_ADJUSTMENT_H_

#include <ceres/ceres.h>
#include <ceres/types.h>
#include <unordered_set>

#include "theia/sfm/bundle_adjustment/create_loss_function.h"
Expand Down
5 changes: 4 additions & 1 deletion src/theia/sfm/bundle_adjustment/create_loss_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@
#ifndef THEIA_SFM_BUNDLE_ADJUSTMENT_CREATE_LOSS_FUNCTION_H_
#define THEIA_SFM_BUNDLE_ADJUSTMENT_CREATE_LOSS_FUNCTION_H_

#include <ceres/ceres.h>
#include <memory>

namespace ceres {
class LossFunction;
} // namespace ceres

namespace theia {

// For bundle adjustment we can use a robust cost function to maintain
Expand Down
Loading

0 comments on commit 608b026

Please sign in to comment.