Ask Your Question

emchristiansen's profile - activity

2018-06-03 17:06:27 -0600 received badge  Notable Question (source)
2017-08-04 09:25:26 -0600 received badge  Popular Question (source)
2015-02-26 03:13:03 -0600 received badge  Notable Question (source)
2014-05-12 14:56:15 -0600 received badge  Good Answer (source)
2014-05-12 14:56:15 -0600 received badge  Enlightened (source)
2013-11-10 11:11:59 -0600 received badge  Necromancer (source)
2013-11-10 11:11:59 -0600 received badge  Self-Learner (source)
2013-10-16 13:27:18 -0600 received badge  Self-Learner (source)
2013-10-16 13:23:35 -0600 answered a question Best way to depend on OpenCV master in a Travis CI build-bot instance

It turns out git clone followed by a from-source build is a valid method (Travis CI doesn't time out). See this project for an example. In particular, look at its .travis.yml file.

2013-10-05 12:57:48 -0600 asked a question Best way to depend on OpenCV master in a Travis CI build-bot instance

I'm writing a library which depends on the master branch of itseez/opencv, and I'd like to do continuous integration with Travis CI.

What is the best way to get the current (or something close to it) master on a Travis CI instance? (The simple answer is to just do a git clone and build OpenCV from source on the Travis CI instance. But OpenCV may take longer to build than Travis CI allows.)

For example, OpenCV also does continuous integration; is there some way to download the build artifacts, so I don't need to rebuild everything?

Better yet, is debian package creation part of the continuous integration? If so, is there a PPA I can use to grab them?

2013-04-24 01:27:47 -0600 received badge  Popular Question (source)
2013-04-07 16:31:46 -0600 answered a question how do I generate the Java bindings for the gpu module?

Q1: I haven't tried using the gpu module, but it looks like it's in the header generator list (see modules/java/generator/rst_parser.py).

A decent debug strategy is to track the progress of the CMake build script at modules/java/CMakeLists.txt. For example, you can get a list of headers the system tries to parse by adding the line

message(STATUS "module_headers = ${module_headers}")

immediately after line 58 of modules/java/CMakeLists.txt.

Please let me know if you get stuck or need more explanation.

Q2: I'm not currently working on extending the Java wrapper, but there is ongoing effort by Hilton Bristow to make a Matlab wrapper. Work he does to improve the header parser, eg gpu header parsing, will automatically translate to the Java wrapper.

2013-03-18 12:17:11 -0600 answered a question Wrapping OpenCV with desktop Java: Building for 64-bit x86

In case it's not clear from the comments, the wrapper is now in OpenCV: http://docs.opencv.org/trunk/doc/tutorials/introduction/desktop_java/java_dev_intro.html

2013-02-22 15:32:55 -0600 received badge  Supporter (source)
2013-02-22 15:32:50 -0600 received badge  Scholar (source)
2013-02-22 15:32:29 -0600 commented answer Building OpenCV with C++11
2013-02-22 11:08:11 -0600 asked a question Building OpenCV with C++11

I attempted to build OpenCV master with C++11, by passing "-std=c++11" as one of the CMAKE_CXX_FLAGS. I'm using g++ 4.7.2. The build failed with this error:

opencv/modules/softcascade/src/_random.hpp:70:13: error: ‘uniform_int’ in namespace ‘std’ does not name a type

Is this a bug, or is C++11 not supported?

2012-12-14 02:42:22 -0600 received badge  Nice Answer (source)
2012-11-16 10:37:03 -0600 received badge  Good Question (source)
2012-11-03 12:21:39 -0600 received badge  Teacher (source)
2012-09-18 03:14:21 -0600 received badge  Nice Question (source)
2012-09-17 03:22:19 -0600 received badge  Necromancer (source)
2012-09-14 01:29:29 -0600 commented question Wrapping OpenCV with desktop Java: Building for 64-bit x86

I've got a pull request underway: https://github.com/Itseez/opencv/pull/31

2012-09-12 11:51:59 -0600 answered a question opencv for desktop java

I'm working on this. See this question.

2012-09-11 14:50:43 -0600 received badge  Editor (source)
2012-09-07 12:33:09 -0600 commented question Wrapping OpenCV with desktop Java: Building for 64-bit x86

Thank you :)

2012-09-07 04:51:17 -0600 received badge  Student (source)
2012-09-06 22:02:03 -0600 asked a question Wrapping OpenCV with desktop Java: Building for 64-bit x86

I'm trying to extend the automatically generated Java/JNI wrappers for Android so they work on desktop Java. The ultimate goal is automatic wrapping for Java of all of OpenCV. This should target the same use-case as the manually wrapped JavaCV. Andrey Pavlenko at Itseez has been helping me (much of what I know is thanks to him), but in an effort to minimally pester him, I'm turning to the crowd. This discourse doesn't quite fit the Q/A format, but I'm not sure where else to put it. Let's call it an experiment in assisted development.

First, I'm going to explain what I understand of the problem. Then I'll explain my confusions and ask for help.

What I understand: The Android wrappers are automatically generated, and target the bare-bones JNI interface. To generate the wrappers, a custom C++ parser (!!!) processes the header files in the OpenCV include directories. The C++ parser is at “opencv/modules/python/src2/hdr_parser.py”. Note the source code can be downloaded from github. After parsing, the JNI glue files (they #include jni.h, see this example) and Javadocs are generated, using code in “opencv/modules/java/generator/”. As I understand (I’m new to JNI), the combination of interface .java files, JNI glue files, and the OpenCV source is all we’ll need; the JNI glue files will be compiled against the OpenCV source, producing one or several dynamic libraries (.so). To use the wrapper, we just: 1) Compile our application with the interface .java files, and 2) In our main code, make sure to dynamically load the .so(s) using System.loadLibrary before calling any interface functions.

To generate a Java/JNI wrapper for Android, we can follow the instructions on the wiki. To get the build targets in an Android SDK layout, run “make install” (not as root), which creates the “install” folder. The “install” folder will include a libopencv_java.so, but alas, if you followed the instructions, it won’t be built for a desktop architecture. Following the instructions builds the library using the Android NDK compiler, which only targets mobile platforms.

What I don’t understand: If you don’t pass it any options, a project generated using “opencv/CMakeLists.txt” won’t generate a Java interface. In fact, there’s no mention of Java in the file.

It appears the magic for generating the interface is in “opencv/android/android.toolchain.cmake”, and probably also the three files matching “grep -ri java opencv/cmake”. What I don’t understand is how to modify these files so that we use the system compiler to build for 64-bit x86, or whether modifying these files is even the best solution. This set of CMake scripts is pretty confusing to me, and while unaided I’ll eventually figure it out, I think this could be greatly sped along with the help of someone more familiar with what’s going on. Help, anyone?

Update: I was able ... (more)