@@ -1011,6 +1011,48 @@ pub mod aruco {
1011
1011
Ok ( ret)
1012
1012
}
1013
1013
1014
+ /// Pose estimation parameters
1015
+ ///
1016
+ /// ## Parameters
1017
+ /// * pattern: Defines center this system and axes direction (default PatternPositionType::ARUCO_CCW_CENTER).
1018
+ /// * useExtrinsicGuess: Parameter used for SOLVEPNP_ITERATIVE. If true (1), the function uses the provided
1019
+ /// rvec and tvec values as initial approximations of the rotation and translation vectors, respectively, and further
1020
+ /// optimizes them (default false).
1021
+ /// * solvePnPMethod: Method for solving a PnP problem: see [calib3d_solvePnP_flags] (default SOLVEPNP_ITERATIVE).
1022
+ ///
1023
+ ///
1024
+ /// **Deprecated**: Use Board::matchImagePoints and cv::solvePnP
1025
+ /// ## See also
1026
+ /// PatternPositionType, solvePnP()
1027
+ #[ deprecated = "Use Board::matchImagePoints and cv::solvePnP" ]
1028
+ pub struct EstimateParameters {
1029
+ ptr : * mut c_void ,
1030
+ }
1031
+
1032
+ opencv_type_boxed ! { EstimateParameters }
1033
+
1034
+ impl Drop for EstimateParameters {
1035
+ #[ inline]
1036
+ fn drop ( & mut self ) {
1037
+ unsafe { sys:: cv_aruco_EstimateParameters_delete ( self . as_raw_mut_EstimateParameters ( ) ) } ;
1038
+ }
1039
+ }
1040
+
1041
+ unsafe impl Send for EstimateParameters { }
1042
+
1043
+ impl EstimateParameters {
1044
+ #[ inline]
1045
+ pub fn default ( ) -> Result < crate :: aruco:: EstimateParameters > {
1046
+ return_send ! ( via ocvrs_return) ;
1047
+ unsafe { sys:: cv_aruco_EstimateParameters_EstimateParameters ( ocvrs_return. as_mut_ptr ( ) ) } ;
1048
+ return_receive ! ( unsafe ocvrs_return => ret) ;
1049
+ let ret = ret. into_result ( ) ?;
1050
+ let ret = unsafe { crate :: aruco:: EstimateParameters :: opencv_from_extern ( ret) } ;
1051
+ Ok ( ret)
1052
+ }
1053
+
1054
+ }
1055
+
1014
1056
/// Constant methods for [crate::aruco::EstimateParameters]
1015
1057
pub trait EstimateParametersTraitConst {
1016
1058
fn as_raw_EstimateParameters ( & self ) -> * const c_void ;
@@ -1061,58 +1103,6 @@ pub mod aruco {
1061
1103
1062
1104
}
1063
1105
1064
- /// Pose estimation parameters
1065
- ///
1066
- /// ## Parameters
1067
- /// * pattern: Defines center this system and axes direction (default PatternPositionType::ARUCO_CCW_CENTER).
1068
- /// * useExtrinsicGuess: Parameter used for SOLVEPNP_ITERATIVE. If true (1), the function uses the provided
1069
- /// rvec and tvec values as initial approximations of the rotation and translation vectors, respectively, and further
1070
- /// optimizes them (default false).
1071
- /// * solvePnPMethod: Method for solving a PnP problem: see [calib3d_solvePnP_flags] (default SOLVEPNP_ITERATIVE).
1072
- ///
1073
- ///
1074
- /// **Deprecated**: Use Board::matchImagePoints and cv::solvePnP
1075
- /// ## See also
1076
- /// PatternPositionType, solvePnP()
1077
- #[ deprecated = "Use Board::matchImagePoints and cv::solvePnP" ]
1078
- pub struct EstimateParameters {
1079
- ptr : * mut c_void ,
1080
- }
1081
-
1082
- opencv_type_boxed ! { EstimateParameters }
1083
-
1084
- impl Drop for EstimateParameters {
1085
- #[ inline]
1086
- fn drop ( & mut self ) {
1087
- unsafe { sys:: cv_aruco_EstimateParameters_delete ( self . as_raw_mut_EstimateParameters ( ) ) } ;
1088
- }
1089
- }
1090
-
1091
- unsafe impl Send for EstimateParameters { }
1092
-
1093
- impl crate :: aruco:: EstimateParametersTraitConst for EstimateParameters {
1094
- #[ inline] fn as_raw_EstimateParameters ( & self ) -> * const c_void { self . as_raw ( ) }
1095
- }
1096
-
1097
- impl crate :: aruco:: EstimateParametersTrait for EstimateParameters {
1098
- #[ inline] fn as_raw_mut_EstimateParameters ( & mut self ) -> * mut c_void { self . as_raw_mut ( ) }
1099
- }
1100
-
1101
- boxed_ref ! { EstimateParameters , crate :: aruco:: EstimateParametersTraitConst , as_raw_EstimateParameters, crate :: aruco:: EstimateParametersTrait , as_raw_mut_EstimateParameters }
1102
-
1103
- impl EstimateParameters {
1104
- #[ inline]
1105
- pub fn default ( ) -> Result < crate :: aruco:: EstimateParameters > {
1106
- return_send ! ( via ocvrs_return) ;
1107
- unsafe { sys:: cv_aruco_EstimateParameters_EstimateParameters ( ocvrs_return. as_mut_ptr ( ) ) } ;
1108
- return_receive ! ( unsafe ocvrs_return => ret) ;
1109
- let ret = ret. into_result ( ) ?;
1110
- let ret = unsafe { crate :: aruco:: EstimateParameters :: opencv_from_extern ( ret) } ;
1111
- Ok ( ret)
1112
- }
1113
-
1114
- }
1115
-
1116
1106
impl Clone for EstimateParameters {
1117
1107
#[ inline]
1118
1108
fn clone ( & self ) -> Self {
@@ -1130,4 +1120,15 @@ pub mod aruco {
1130
1120
. finish ( )
1131
1121
}
1132
1122
}
1123
+
1124
+ impl crate :: aruco:: EstimateParametersTraitConst for EstimateParameters {
1125
+ #[ inline] fn as_raw_EstimateParameters ( & self ) -> * const c_void { self . as_raw ( ) }
1126
+ }
1127
+
1128
+ impl crate :: aruco:: EstimateParametersTrait for EstimateParameters {
1129
+ #[ inline] fn as_raw_mut_EstimateParameters ( & mut self ) -> * mut c_void { self . as_raw_mut ( ) }
1130
+ }
1131
+
1132
+ boxed_ref ! { EstimateParameters , crate :: aruco:: EstimateParametersTraitConst , as_raw_EstimateParameters, crate :: aruco:: EstimateParametersTrait , as_raw_mut_EstimateParameters }
1133
+
1133
1134
}
0 commit comments