001// 002// This file is auto-generated. Please don't modify it! 003// 004package org.opencv.video; 005 006import org.opencv.core.Mat; 007 008// C++: class KalmanFilter 009/** 010 * Kalman filter class. 011 * 012 * The class implements a standard Kalman filter <http://en.wikipedia.org/wiki/Kalman_filter>, 013 * CITE: Welch95 . However, you can modify transitionMatrix, controlMatrix, and measurementMatrix to get 014 * an extended Kalman filter functionality. 015 * <b>Note:</b> In C API when CvKalman\* kalmanFilter structure is not needed anymore, it should be released 016 * with cvReleaseKalman(&kalmanFilter) 017 */ 018public class KalmanFilter { 019 020 protected final long nativeObj; 021 protected KalmanFilter(long addr) { nativeObj = addr; } 022 023 public long getNativeObjAddr() { return nativeObj; } 024 025 // internal usage only 026 public static KalmanFilter __fromPtr__(long addr) { return new KalmanFilter(addr); } 027 028 // 029 // C++: cv::KalmanFilter::KalmanFilter() 030 // 031 032 public KalmanFilter() { 033 nativeObj = KalmanFilter_0(); 034 } 035 036 037 // 038 // C++: cv::KalmanFilter::KalmanFilter(int dynamParams, int measureParams, int controlParams = 0, int type = CV_32F) 039 // 040 041 /** 042 * 043 * @param dynamParams Dimensionality of the state. 044 * @param measureParams Dimensionality of the measurement. 045 * @param controlParams Dimensionality of the control vector. 046 * @param type Type of the created matrices that should be CV_32F or CV_64F. 047 */ 048 public KalmanFilter(int dynamParams, int measureParams, int controlParams, int type) { 049 nativeObj = KalmanFilter_1(dynamParams, measureParams, controlParams, type); 050 } 051 052 /** 053 * 054 * @param dynamParams Dimensionality of the state. 055 * @param measureParams Dimensionality of the measurement. 056 * @param controlParams Dimensionality of the control vector. 057 */ 058 public KalmanFilter(int dynamParams, int measureParams, int controlParams) { 059 nativeObj = KalmanFilter_2(dynamParams, measureParams, controlParams); 060 } 061 062 /** 063 * 064 * @param dynamParams Dimensionality of the state. 065 * @param measureParams Dimensionality of the measurement. 066 */ 067 public KalmanFilter(int dynamParams, int measureParams) { 068 nativeObj = KalmanFilter_3(dynamParams, measureParams); 069 } 070 071 072 // 073 // C++: Mat cv::KalmanFilter::predict(Mat control = Mat()) 074 // 075 076 /** 077 * Computes a predicted state. 078 * 079 * @param control The optional input control 080 * @return automatically generated 081 */ 082 public Mat predict(Mat control) { 083 return new Mat(predict_0(nativeObj, control.nativeObj)); 084 } 085 086 /** 087 * Computes a predicted state. 088 * 089 * @return automatically generated 090 */ 091 public Mat predict() { 092 return new Mat(predict_1(nativeObj)); 093 } 094 095 096 // 097 // C++: Mat cv::KalmanFilter::correct(Mat measurement) 098 // 099 100 /** 101 * Updates the predicted state from the measurement. 102 * 103 * @param measurement The measured system parameters 104 * @return automatically generated 105 */ 106 public Mat correct(Mat measurement) { 107 return new Mat(correct_0(nativeObj, measurement.nativeObj)); 108 } 109 110 111 // 112 // C++: Mat KalmanFilter::statePre 113 // 114 115 public Mat get_statePre() { 116 return new Mat(get_statePre_0(nativeObj)); 117 } 118 119 120 // 121 // C++: void KalmanFilter::statePre 122 // 123 124 public void set_statePre(Mat statePre) { 125 set_statePre_0(nativeObj, statePre.nativeObj); 126 } 127 128 129 // 130 // C++: Mat KalmanFilter::statePost 131 // 132 133 public Mat get_statePost() { 134 return new Mat(get_statePost_0(nativeObj)); 135 } 136 137 138 // 139 // C++: void KalmanFilter::statePost 140 // 141 142 public void set_statePost(Mat statePost) { 143 set_statePost_0(nativeObj, statePost.nativeObj); 144 } 145 146 147 // 148 // C++: Mat KalmanFilter::transitionMatrix 149 // 150 151 public Mat get_transitionMatrix() { 152 return new Mat(get_transitionMatrix_0(nativeObj)); 153 } 154 155 156 // 157 // C++: void KalmanFilter::transitionMatrix 158 // 159 160 public void set_transitionMatrix(Mat transitionMatrix) { 161 set_transitionMatrix_0(nativeObj, transitionMatrix.nativeObj); 162 } 163 164 165 // 166 // C++: Mat KalmanFilter::controlMatrix 167 // 168 169 public Mat get_controlMatrix() { 170 return new Mat(get_controlMatrix_0(nativeObj)); 171 } 172 173 174 // 175 // C++: void KalmanFilter::controlMatrix 176 // 177 178 public void set_controlMatrix(Mat controlMatrix) { 179 set_controlMatrix_0(nativeObj, controlMatrix.nativeObj); 180 } 181 182 183 // 184 // C++: Mat KalmanFilter::measurementMatrix 185 // 186 187 public Mat get_measurementMatrix() { 188 return new Mat(get_measurementMatrix_0(nativeObj)); 189 } 190 191 192 // 193 // C++: void KalmanFilter::measurementMatrix 194 // 195 196 public void set_measurementMatrix(Mat measurementMatrix) { 197 set_measurementMatrix_0(nativeObj, measurementMatrix.nativeObj); 198 } 199 200 201 // 202 // C++: Mat KalmanFilter::processNoiseCov 203 // 204 205 public Mat get_processNoiseCov() { 206 return new Mat(get_processNoiseCov_0(nativeObj)); 207 } 208 209 210 // 211 // C++: void KalmanFilter::processNoiseCov 212 // 213 214 public void set_processNoiseCov(Mat processNoiseCov) { 215 set_processNoiseCov_0(nativeObj, processNoiseCov.nativeObj); 216 } 217 218 219 // 220 // C++: Mat KalmanFilter::measurementNoiseCov 221 // 222 223 public Mat get_measurementNoiseCov() { 224 return new Mat(get_measurementNoiseCov_0(nativeObj)); 225 } 226 227 228 // 229 // C++: void KalmanFilter::measurementNoiseCov 230 // 231 232 public void set_measurementNoiseCov(Mat measurementNoiseCov) { 233 set_measurementNoiseCov_0(nativeObj, measurementNoiseCov.nativeObj); 234 } 235 236 237 // 238 // C++: Mat KalmanFilter::errorCovPre 239 // 240 241 public Mat get_errorCovPre() { 242 return new Mat(get_errorCovPre_0(nativeObj)); 243 } 244 245 246 // 247 // C++: void KalmanFilter::errorCovPre 248 // 249 250 public void set_errorCovPre(Mat errorCovPre) { 251 set_errorCovPre_0(nativeObj, errorCovPre.nativeObj); 252 } 253 254 255 // 256 // C++: Mat KalmanFilter::gain 257 // 258 259 public Mat get_gain() { 260 return new Mat(get_gain_0(nativeObj)); 261 } 262 263 264 // 265 // C++: void KalmanFilter::gain 266 // 267 268 public void set_gain(Mat gain) { 269 set_gain_0(nativeObj, gain.nativeObj); 270 } 271 272 273 // 274 // C++: Mat KalmanFilter::errorCovPost 275 // 276 277 public Mat get_errorCovPost() { 278 return new Mat(get_errorCovPost_0(nativeObj)); 279 } 280 281 282 // 283 // C++: void KalmanFilter::errorCovPost 284 // 285 286 public void set_errorCovPost(Mat errorCovPost) { 287 set_errorCovPost_0(nativeObj, errorCovPost.nativeObj); 288 } 289 290 291 @Override 292 protected void finalize() throws Throwable { 293 delete(nativeObj); 294 } 295 296 297 298 // C++: cv::KalmanFilter::KalmanFilter() 299 private static native long KalmanFilter_0(); 300 301 // C++: cv::KalmanFilter::KalmanFilter(int dynamParams, int measureParams, int controlParams = 0, int type = CV_32F) 302 private static native long KalmanFilter_1(int dynamParams, int measureParams, int controlParams, int type); 303 private static native long KalmanFilter_2(int dynamParams, int measureParams, int controlParams); 304 private static native long KalmanFilter_3(int dynamParams, int measureParams); 305 306 // C++: Mat cv::KalmanFilter::predict(Mat control = Mat()) 307 private static native long predict_0(long nativeObj, long control_nativeObj); 308 private static native long predict_1(long nativeObj); 309 310 // C++: Mat cv::KalmanFilter::correct(Mat measurement) 311 private static native long correct_0(long nativeObj, long measurement_nativeObj); 312 313 // C++: Mat KalmanFilter::statePre 314 private static native long get_statePre_0(long nativeObj); 315 316 // C++: void KalmanFilter::statePre 317 private static native void set_statePre_0(long nativeObj, long statePre_nativeObj); 318 319 // C++: Mat KalmanFilter::statePost 320 private static native long get_statePost_0(long nativeObj); 321 322 // C++: void KalmanFilter::statePost 323 private static native void set_statePost_0(long nativeObj, long statePost_nativeObj); 324 325 // C++: Mat KalmanFilter::transitionMatrix 326 private static native long get_transitionMatrix_0(long nativeObj); 327 328 // C++: void KalmanFilter::transitionMatrix 329 private static native void set_transitionMatrix_0(long nativeObj, long transitionMatrix_nativeObj); 330 331 // C++: Mat KalmanFilter::controlMatrix 332 private static native long get_controlMatrix_0(long nativeObj); 333 334 // C++: void KalmanFilter::controlMatrix 335 private static native void set_controlMatrix_0(long nativeObj, long controlMatrix_nativeObj); 336 337 // C++: Mat KalmanFilter::measurementMatrix 338 private static native long get_measurementMatrix_0(long nativeObj); 339 340 // C++: void KalmanFilter::measurementMatrix 341 private static native void set_measurementMatrix_0(long nativeObj, long measurementMatrix_nativeObj); 342 343 // C++: Mat KalmanFilter::processNoiseCov 344 private static native long get_processNoiseCov_0(long nativeObj); 345 346 // C++: void KalmanFilter::processNoiseCov 347 private static native void set_processNoiseCov_0(long nativeObj, long processNoiseCov_nativeObj); 348 349 // C++: Mat KalmanFilter::measurementNoiseCov 350 private static native long get_measurementNoiseCov_0(long nativeObj); 351 352 // C++: void KalmanFilter::measurementNoiseCov 353 private static native void set_measurementNoiseCov_0(long nativeObj, long measurementNoiseCov_nativeObj); 354 355 // C++: Mat KalmanFilter::errorCovPre 356 private static native long get_errorCovPre_0(long nativeObj); 357 358 // C++: void KalmanFilter::errorCovPre 359 private static native void set_errorCovPre_0(long nativeObj, long errorCovPre_nativeObj); 360 361 // C++: Mat KalmanFilter::gain 362 private static native long get_gain_0(long nativeObj); 363 364 // C++: void KalmanFilter::gain 365 private static native void set_gain_0(long nativeObj, long gain_nativeObj); 366 367 // C++: Mat KalmanFilter::errorCovPost 368 private static native long get_errorCovPost_0(long nativeObj); 369 370 // C++: void KalmanFilter::errorCovPost 371 private static native void set_errorCovPost_0(long nativeObj, long errorCovPost_nativeObj); 372 373 // native support for java finalize() 374 private static native void delete(long nativeObj); 375 376}