Skip to content

Commit

Permalink
Code cleanup and C++11. openMVG#527
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoulon committed Apr 22, 2016
1 parent 35c81ca commit cddad06
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/openMVG/cameras/Camera_Pinhole.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Pinhole_Intrinsic : public IntrinsicBase
* @brief Get the intrinsic matrix
* @return 3x3 intrinsic matrix
*/
const Mat3& K() const
const Mat3& K() const
{
return K_;
}
Expand Down Expand Up @@ -177,7 +177,7 @@ class Pinhole_Intrinsic : public IntrinsicBase
* @param value Error in image plane
* @return error of passing from the image plane to the camera plane
*/
double imagePlane_toCameraPlaneError( double value ) const
double imagePlane_toCameraPlaneError( double value ) const override
{
return value / focal();
}
Expand Down
4 changes: 2 additions & 2 deletions src/openMVG/cameras/Camera_Pinhole_Brown.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class Pinhole_Intrinsic_Brown_T2 : public Pinhole_Intrinsic
* @param p Input distorted pixel
* @return Point without distortion
*/
virtual Vec2 get_ud_pixel( const Vec2& p ) const override
Vec2 get_ud_pixel( const Vec2& p ) const override
{
return cam2ima( remove_disto( ima2cam( p ) ) );
}
Expand All @@ -192,7 +192,7 @@ class Pinhole_Intrinsic_Brown_T2 : public Pinhole_Intrinsic
* @param p Input pixel
* @return Distorted pixel
*/
virtual Vec2 get_d_pixel( const Vec2& p ) const
Vec2 get_d_pixel( const Vec2& p ) const override
{
return cam2ima( add_disto( ima2cam( p ) ) );
}
Expand Down
18 changes: 9 additions & 9 deletions src/openMVG/features/regions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Regions
{
public:

virtual ~Regions() = default ;
virtual ~Regions() = default ;

//--
// IO - one file for region features, one file for region descriptors
Expand Down Expand Up @@ -107,7 +107,7 @@ class Scalar_Regions : public Regions
/// Read from files the regions and their corresponding descriptors.
bool Load(
const std::string& sfileNameFeats,
const std::string& sfileNameDescs) override
const std::string& sfileNameDescs) override
{
return loadFeatsFromFile(sfileNameFeats, vec_feats_)
& loadDescsFromBinFile(sfileNameDescs, vec_descs_);
Expand All @@ -116,23 +116,23 @@ class Scalar_Regions : public Regions
/// Export in two separate files the regions and their corresponding descriptors.
bool Save(
const std::string& sfileNameFeats,
const std::string& sfileNameDescs) const override
const std::string& sfileNameDescs) const override
{
return saveFeatsToFile(sfileNameFeats, vec_feats_)
& saveDescsToBinFile(sfileNameDescs, vec_descs_);
}

bool LoadFeatures(const std::string& sfileNameFeats) override
bool LoadFeatures(const std::string& sfileNameFeats) override
{
return loadFeatsFromFile(sfileNameFeats, vec_feats_);
}

PointFeatures GetRegionsPositions() const override
PointFeatures GetRegionsPositions() const override
{
return PointFeatures(vec_feats_.begin(), vec_feats_.end());
}

Vec2 GetRegionPosition(size_t i) const override
Vec2 GetRegionPosition(size_t i) const override
{
return Vec2f(vec_feats_[i].coords()).cast<double>();
}
Expand All @@ -157,7 +157,7 @@ class Scalar_Regions : public Regions
ar(vec_descs_);
}

Regions * EmptyClone() const override
Regions * EmptyClone() const override
{
return new Scalar_Regions();
}
Expand All @@ -175,7 +175,7 @@ class Scalar_Regions : public Regions
}

/// Add the Inth region to another Region container
void CopyRegion(size_t i, Regions * region_container) const
void CopyRegion(size_t i, Regions * region_container) const override
{
assert(i < vec_feats_.size() && i < vec_descs_.size());
static_cast<Scalar_Regions<FeatT, T, L> *>(region_container)->vec_feats_.push_back(vec_feats_[i]);
Expand Down Expand Up @@ -291,7 +291,7 @@ class Binary_Regions : public Regions
}

/// Add the Inth region to another Region container
void CopyRegion(size_t i, Regions * region_container) const
void CopyRegion(size_t i, Regions * region_container) const override
{
assert(i < vec_feats_.size() && i < vec_descs_.size());
static_cast<Binary_Regions<FeatT, L> *>(region_container)->vec_feats_.push_back(vec_feats_[i]);
Expand Down

0 comments on commit cddad06

Please sign in to comment.