Peenoo / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

DoublePointer, FloatPointer, etc. allocate or allocateArray not working properly. #153

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Converting a array into DoublePointer
2. java.lang.UnsatisfiedLinkError: 
com.googlecode.javacpp.DoublePointer.allocateArray(I)V
3. allocateArray not working

What is the expected output? What do you see instead?
a DoublePointer that points to a double[] array.
DoublePointer = new DoublePointer(array). 

What version of the product are you using? On what operating system?
Latest version on Windows 7 64bit but every software is 32bits. 

Please provide any additional information below.
I just want to successfully convert a double[] array into a DoublePointer so I 
can give it to cvSetData(CMat*, void* (problem), int) 

Original issue reported on code.google.com by ayala.ac...@gmail.com on 9 Feb 2012 at 10:08

GoogleCodeExporter commented 9 years ago
Can you try to call Loader.load(opencv_core.class) before trying to create an 
instance of DoublePointer?

Original comment by samuel.a...@gmail.com on 10 Feb 2012 at 4:59

GoogleCodeExporter commented 9 years ago
Oh wow dude you save me from my demo deadline. I am forever in dept with you. I 
apologize if it was a noob question but I literally stay all night awake trying 
to solve this problem. 

Original comment by ayala.ac...@gmail.com on 10 Feb 2012 at 5:28

GoogleCodeExporter commented 9 years ago
It's not a stupid question, don't worry, it's a limitation of JavaCPP... :( I'm 
not sure how to solve it gracefully... will leave this issue open until I 
figure something out.

Original comment by samuel.a...@gmail.com on 10 Feb 2012 at 11:52

GoogleCodeExporter commented 9 years ago
I modified the constructors of these Pointer classes to throw a 
RuntimeException that explains what should be done to resolve the issue, in the 
case of DoublePointer, for example:
http://code.google.com/p/javacpp/source/browse/javacpp/src/main/java/com/googlec
ode/javacpp/DoublePointer.java#43

Let me know if this looks clear enough such that you would have known what to 
do in the first place, thanks!

Original comment by samuel.a...@gmail.com on 12 May 2012 at 12:15