Ask Your Question

Kerry's profile - activity

2017-03-18 02:55:12 -0600 received badge  Enthusiast
2017-03-11 02:40:09 -0600 commented question OpenCV build Error

I was going to suggest using the Maven build process located in platforms\maven however this is tailored for Debian flavours of Linux. If i get chance I will create an OpenSuSE VM and see how to build it there. Possiblity adapt the above to work in OpenSuSE.

2017-03-11 02:35:08 -0600 commented question ARM opencv Linker Error

Just answering an old question so it may no longer be applicable but did you clean before doing the rebuild? Also as an alternative approach to building the OpenCV libraries if you are using a Debian flavour of Linux you could try the Maven build process located in the platforms/maven directory. You will need Java SDK and Maven however these can easily be installed using the aptitude. There is a README in the above directory to help.

2017-03-11 02:17:04 -0600 commented question Why is Python using opencv 2.4.9.1?

opencv_version will be part of a package on Ubuntu though. I only ask because I don't have a similar command on my Mint installation.

2017-03-11 02:16:04 -0600 answered a question Why is Python using opencv 2.4.9.1?

open_cv will be part of a package on Ubuntu though. I only ask because I don't have a similar command on my Mint installation.

2017-03-10 19:29:09 -0600 commented question Linking error when building OpenCV 3.2.0 with Python support

Not sure if this is relevant but what does ldd cv2.so give you, any missing dependencies?

2017-03-10 19:14:32 -0600 commented question Why is Python using opencv 2.4.9.1?

what package is the command opencv_version part of?

2017-03-10 16:54:52 -0600 commented question OpenCV build Error

What platform are you building on?

2017-03-10 15:40:27 -0600 received badge  Critic (source)
2017-03-10 15:34:24 -0600 commented answer How can I solve this error while making OpenCV3.2 on ubuntu16.04?

hls, you should raise your comment as a separate question on here as it's unrelated to the original posting.

2017-03-07 13:50:41 -0600 commented answer How can I solve this error while making OpenCV3.2 on ubuntu16.04?

If it worked, could you mark my answer as correct please? Thanks.

2017-03-05 09:38:50 -0600 commented answer How can I solve this error while making OpenCV3.2 on ubuntu16.04?

You don't need to be write any Java, Maven is a build tool. By default the OpenCV Maven build file (the POM) will build the OpenCV python bindings. You will have to install both the JDK and maven but this can be easily done using aptitude on the commandline : sudo aptitude install default-jdk and sudo aptitude install maven. Once you have those installed go to the maven directory mentioned in my answer and issue the build command to Maven: mvn clean install (no NOT execute this as sudo). I believe the python binding library is cv2.so and it is under the directory build/lib. Please make sure you read the README in that directory too.

2017-03-05 03:57:44 -0600 asked a question Building The Java Libraries With New Class File Fails

Hi,

I want to add an additional Java class under modules/java/generator/src/java which will be compiled and included in the output JAR:

package org.opencv.osgi;

import org.slf4j.Logger;

public class OpenCVNativeLoader {

private static Logger logger;

public void init()
{
    System.loadLibrary("opencv_java320");
    if (logger != null) logger.info("Successfully loaded OpenCV native library.");
}

public void setLogger(final Logger logger)
{
    OpenCVNativeLoader.logger = logger;
}

}

However a problem occurs when I compile because the Java compiler cannot find the 3rd party library pax-logging-api-1.8.5.jar:

[ 93%] Building CXX object modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o [javac] /home/kerry/programming/opencv/build/src/org/opencv/osgi/OpenCVNativeLoader.java:3: error: package org.slf4j does not exist

[javac] import org.slf4j.Logger; [javac] ^ [javac] /home/kerry/programming/opencv/build/src/org/opencv/osgi/OpenCVNativeLoader.java:12: error: cannot find symbol [javac] private static Logger logger;

I am using the Maven build found under platforms\maven and modified the POM to use the CMAKE_JAVA_INCLUDE_PATH and CMAKE_JAVA_COMPILE_FLAGS variables but still get the above problem

<options> <option>-DBUILD_SHARED_LIBS:BOOL=OFF</option> <option>-DCMAKE_JAVA_INCLUDE_PATH:STRING=${project.basedir}/libs/pax-logging-api-1.8.5.jar</option> <option>-DCMAKE_JAVA_COMPILE_FLAGS:STRING=-cp .:${project.basedir}/libs/pax-logging-api-1.8.5.jar</option> <option>-DINCLUDE_JARS:STRING={project.basedir}/libs/pax-logging-api-1.8.5.jar</option> </options>

So it seems that the library is not being specified to the Java compiler for some reason.

I've also noticed that there is a build.xml file under the build directory, should I modify this and where is the original of this file? Is it generated and if so how can I modify it to include the the above 3rd party JAR?

2017-03-05 03:52:32 -0600 answered a question How can I solve this error while making OpenCV3.2 on ubuntu16.04?

Just as an alternative way of building have you tried building the libraries using the Maven build process? This is under the directory <open_CV_root>/platforms/maven.

You will need to first ensure Java and Maven are installed on ubuntu but you can use the repo defaults for that. There is also a ReadMe in the directory too.