Skip to content

Commit

Permalink
[sfm] Fix enum binary code. openMVG#1306
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoulon committed Jul 15, 2018
1 parent 2a14db0 commit dca0e6b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
9 changes: 5 additions & 4 deletions src/openMVG/cameras/Camera_Common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ static inline bool isValid( EINTRINSIC eintrinsic )
*/
enum class Intrinsic_Parameter_Type : int
{
NONE = 0x01, // All parameters will be held constant
ADJUST_FOCAL_LENGTH = 0x02,
ADJUST_PRINCIPAL_POINT = 0x04,
ADJUST_DISTORTION = 0x08,
// Note: Use power of two values in order to use bitwise operators.
NONE = 1, // All parameters will be held constant
ADJUST_FOCAL_LENGTH = 2,
ADJUST_PRINCIPAL_POINT = 4,
ADJUST_DISTORTION = 8,
ADJUST_ALL = ADJUST_FOCAL_LENGTH | ADJUST_PRINCIPAL_POINT | ADJUST_DISTORTION
};

Expand Down
7 changes: 4 additions & 3 deletions src/openMVG/sfm/sfm_data_BA.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ struct SfM_Data;
/// Enum to control which parameter(s) of the Camera motion must be refined or not
enum class Extrinsic_Parameter_Type : int
{
NONE = 0x01, // Extrinsic parameters will be considered as FIXED
ADJUST_ROTATION = 0x02,
ADJUST_TRANSLATION = 0x04,
// Note: Use power of two values in order to use bitwise operators.
NONE = 1, // Extrinsic parameters will be considered as FIXED
ADJUST_ROTATION = 2,
ADJUST_TRANSLATION = 4,
ADJUST_ALL = ADJUST_ROTATION | ADJUST_TRANSLATION
};

Expand Down
11 changes: 6 additions & 5 deletions src/openMVG/sfm/sfm_data_io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ struct SfM_Data;

enum ESfM_Data
{
VIEWS = 0x01,
EXTRINSICS = 0x02,
INTRINSICS = 0x04,
STRUCTURE = 0x08,
CONTROL_POINTS = 0x16,
// Note: Use power of two values in order to use bitwise operators.
VIEWS = 1,
EXTRINSICS = 2,
INTRINSICS = 4,
STRUCTURE = 8,
CONTROL_POINTS = 16,
ALL = VIEWS | EXTRINSICS | INTRINSICS | STRUCTURE | CONTROL_POINTS
};

Expand Down

0 comments on commit dca0e6b

Please sign in to comment.