Ask Your Question

Tommy's profile - activity

2022-01-22 09:38:18 -0600 received badge  Notable Question (source)
2014-06-03 05:52:36 -0600 received badge  Student (source)
2013-02-06 13:43:28 -0600 commented question Wrapping OpenCV with desktop Java: Building for 64-bit x86

Ok, great job guys! However, still no luck.. Anyone actually got the Java bindings compiled under Cygwin on Windows?

2012-12-18 07:38:23 -0600 commented question Wrapping OpenCV with desktop Java: Building for 64-bit x86

Ok, Andrey, sounds great!

I need to demo a program that uses OpenCV by February 2013. I'd rather have it in Java, but have written it in Python for now, since I can't get the Java code to compile.

I'm really looking forward to OpenCV Java!

If its not time to put Java in the main fork yet, perhaps someone would be willing to keep a Java fork on Github?

Thanks!

2012-12-12 08:46:00 -0600 commented question Wrapping OpenCV with desktop Java: Building for 64-bit x86

Yeah, still doesn't work... It doesn't say anywhere that it cant find java, only that it is unavailable. Do you happen to know where in the build process it looks for the java compiler? I can't find it anywhere.

2012-11-30 05:16:04 -0600 commented question Wrapping OpenCV with desktop Java: Building for 64-bit x86

Yes, I have tried all possible paths ;-/ This really makes no sense to me.

Did you do anything special before running cmake?

What does your JAVA_HOME looks like?

2012-11-27 07:03:07 -0600 commented question Wrapping OpenCV with desktop Java: Building for 64-bit x86

Man, this drives me crazy! I do not have Visual Studio, but I tried to compile it on Ubuntu 12.10 as well, but doesn't work! I am obviously doing something very wrong..

It says that java is among the unavailable OpenCV modules:

Unavailable: androidcamera java ocl python

And finally that:

Manually-specified variables were not used by the project: BUILD_opencv_java

I've set my JAVA_HOME to "/usr/lib/jvm/java-7-openjdk-amd64/jre", where my java runtime environment is.

And I used the source from: https://github.com/Itseez/opencv/archive/master.zip

Anyone has any ideas about what needs to be done to get it to compile the java sources for me?

2012-11-08 09:37:35 -0600 commented question Wrapping OpenCV with desktop Java: Building for 64-bit x86

Care to share your steps to compile it?

I used Cygwin to compile it on Windows 7. CMake just didn't recognize the command BUILD_opencv_java....

2012-09-25 08:33:53 -0600 commented question Wrapping OpenCV with desktop Java: Building for 64-bit x86

Hi guys! I tried to compile the OpenCV source (from https://github.com/Itseez/opencv/) and including the Java bindings by invoking: "cmake -DBUILD_opencv_java=ON". However, I get the following message at the end of cmake:

"CMake Warning: Manually-specified variables were not used by the project:

BUILD_opencv_java

"

Is this parameter only used in: "OpenCVLegacyOptions.cmake"? In this file it performs: "ocv_legacy_option(BUILD_JAVA_SUPPORT BUILD_opencv_java)"

This is the only mention of "BUILD_opencv_java" in any file. There is a use of "BUILD_opencv_java_INIT", anyone knows what this is?

Thank you in advance!

2012-09-24 09:32:02 -0600 commented question Wrapping OpenCV with desktop Java: Building for 64-bit x86

This is great! I've also been waiting for this for years!

Though, I'm not good with compilation.. anyone care to give the steps required to compile these Java bindings for e.g. Ubuntu?

2012-09-24 09:28:05 -0600 received badge  Supporter (source)
2012-07-16 20:43:20 -0600 received badge  Popular Question (source)
2012-07-16 08:52:01 -0600 received badge  Teacher (source)
2012-07-16 08:52:01 -0600 received badge  Self-Learner (source)
2012-07-16 08:38:59 -0600 answered a question Python correctMatches

Ok, so I figured it out! ;-)

It wants an array with size (1,n,2). The lines

pt1 = np.reshape(pt1,(1,n,2))
pt2 = np.reshape(pt2,(1,n,2))

did the trick.

This is, however, not abundantly clear from the documentation..

I know the python functions are created automatically at build time, so perhaps the problem is not with python, but that the underlying C functions are ambivalent. A clear and concise style, where related functions take the same arguments, is something to strive for.

2012-07-16 02:06:38 -0600 received badge  Notable Question (source)
2012-07-15 02:51:57 -0600 commented question Python correctMatches

Also, I am aware that the API reference says that the input points are supposed to be: "1xN array containing the first set of points". But that is not helping. In C or C++ an array of cvPoint2f or vector<Point2f> is accepted, but in Python the point structs are replaced by tuples. However, if I give it an array of tuples I get a TypeError: <unknown> is not a numpy array

Ok, so the input needs to be a numpy array. By if I convert the array of tuples to a numpy array by numpy.array end up with a 2d matrix and obtain the error: "Input parameters must be matrices in function cvCorrectMatches"

And if I instead use numpy.matrix I obtain the same "Input parameters must be matrices in function cvCorrectMatches" error.

Anyone knows?

Do you knowhere the python wrappers are in the source?

2012-07-14 02:42:35 -0600 commented question Python findFundamentalMat

Ok. Thanks!

2012-07-14 02:41:48 -0600 received badge  Scholar (source)
2012-07-13 15:19:42 -0600 asked a question Python correctMatches

Hi guys!

Is there anywhere I can look for specifics on the input data requirements for the OpenCV functions for python? I really don't get it. All functions seem to require numpy arrays with different shapes.

For instance. The findFundamentalMat accepts n-by-2 numpy ndarrays of floats, but I fail to figure out what correctMatches wants as input.

Do you guys know? Where can I look this up?

Thanks!

2012-07-13 13:45:39 -0600 commented question Python findFundamentalMat

OMG, what a newbie mistake.. Yeah, you are right! They were int64, when they should have been float64. I assumed that they were float by default, but apparently not.

Thanks!

2012-07-13 13:43:49 -0600 received badge  Popular Question (source)
2012-07-12 06:58:34 -0600 asked a question Python findFundamentalMat

I keep getting the error:

Traceback (most recent call last):
  File "OpenCVTest.py", line 73, in <module>
    (retval,mask) = cv.findFundamentalMat(c1,c2)
cv2.error: /tmp/homebrew-opencv-2.4.2-OdWH/OpenCV-2.4.2/modules/calib3d/src/fundam.cpp:1103: error: (-215) npoints >= 0 && points2.checkVector(2) == npoints && points1.type() == points2.type() in function findFundamentalMat

Where c1 and c2 are 8 by 2 ndarrays.

It works in cv, but not in cv2. Is this a bug or am I doing something wrong?

I am using OpenCV 2.4.2 in Python 2.7.3.

Thanks!