Ask Your Question

CAlbertson's profile - activity

2018-09-29 13:34:40 -0600 received badge  Notable Question (source)
2017-11-22 12:26:10 -0600 received badge  Notable Question (source)
2016-08-09 14:48:42 -0600 received badge  Popular Question (source)
2016-07-08 08:46:06 -0600 received badge  Popular Question (source)
2014-02-07 15:15:11 -0600 received badge  Student (source)
2014-01-23 02:48:27 -0600 asked a question Using Kalman filter from Java, Is there a working example?

I read the Java API docs, other then the constructor there are only to methods and one of them takes no input. This should be easy because there is not much you CAN do but I don't get results.

A very minimal "hello world" type working example in Java would be great.

Here is what I think you do..

KalmanFilter kf  = new KalmanFilter(3, 4);
Mat state        = new MatOfDouble(3,1);    // (x, y, h)
Mat measurement  = new MatOfDouble(4,1);    // (odoX, odoY, odoH, compassH)    

while(1){
      //stuff new sensor data into "measurements"

      // call these to methods
      kf.correct(measurement);
      state = kf.predict();

      // pull predicted state from "state"
    }

correct() does produce a return value but it's not clear what and correct() take no input

2014-01-01 05:47:59 -0600 received badge  Editor (source)
2014-01-01 05:36:56 -0600 asked a question 2.4.8 Build fails Mac OSX, opencl_kernels.hpp file not found

EDIT: The parent directory where I unpacked the .tar file has a space in the name. Someplace ??? in the build scripts there is a quoting error. likely some place is doing a "mkdir -p". I placed this is "Software Projects" and the 2.4.8 build process created a directory called "Software\ Projects" with an actually backslash in the filename.

This entire tree .../build/modules/ocl in empty except for the files open_kernals.cpp and .hpp This is a bug that I can work around by moving files but it should be fixed.

The message is "opencl_kernels.hpp file not found "

But I do see a file by this name. Here it is cut and pasted from the terminal window.

chris$ pwd /Volumes/LaCie/Chris/Software\ Projects/opencv-2.4.8/build/modules/ocl chris$ ls opencl_kernels.cpp opencl_kernels.hpp chris$

Here are the last few lines printed.

[ 63%] Generating opencl_kernels.cpp, opencl_kernels.hpp -- /Volumes/LaCie/Chris/Software\ Projects/opencv-2.4.8/build/modules/ocl/opencl_kernels.hpp contains same content [ 63%] Building CXX object modules/ocl/CMakeFiles/opencv_ocl.dir/src/arithm.cpp.o /Volumes/LaCie/Chris/Software Projects/opencv-2.4.8/modules/ocl/src/arithm.cpp:54:10: fatal error: 'opencl_kernels.hpp' file not found

include "opencl_kernels.hpp"

     ^

1 error generated. make[2]: * [modules/ocl/CMakeFiles/opencv_ocl.dir/src/arithm.cpp.o] Error 1 make[1]: [modules/ocl/CMakeFiles/opencv_ocl.dir/all] Error 2 make: ** [all] Error 2