I'm trying to use the SURF Feature Detector in features2d. Essentially I'm
doing this tutorial:
http://opencv.itseez.com/doc/tutorials/features2d/feature_flann_matcher/feature_
flann_matcher.html
but in java, using javacv.
I found the scala SURF example in javacv-examples that is essentially identical
to the first part of the tutorial.
However whenever I call the .detect() method (in scala or in java) I get a "bad
allocation" error (stack trace below).
What steps will reproduce the problem?
1. Create a SurfFeatureDetector.
2. Call the .detect() method.
What is the expected output? What do you see instead?
I would expect it not to crash. Instead it crashes.
What version of the product are you using? On what operating system?
I'm on Windows 7 64, using 64 bit everything (jdk, opencv, javacv).
Please provide any additional information below.
Here's the stack trace from the scala example:
java.lang.RuntimeException: bad allocation
at com.googlecode.javacv.cpp.opencv_features2d$FeatureDetector.detect(Native Method)
at SURF$delayedInit$body.apply(<console>:46)
at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:60)
at scala.App$$anonfun$main$1.apply(App.scala:60)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:30)
at scala.App$class.main(App.scala:60)
at SURF$.main(<console>:39)
at .<init>(<console>:41)
at .<clinit>(<console>)
at .<init>(<console>:11)
at .<clinit>(<console>)
at $print(<console>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:704)
at scala.tools.nsc.interpreter.IMain$Request$$anonfun$14.apply(IMain.scala:920)
at scala.tools.nsc.interpreter.Line$$anonfun$1.apply$mcV$sp(Line.scala:43)
at scala.tools.nsc.io.package$$anon$2.run(package.scala:25)
at java.lang.Thread.run(Thread.java:662)
Original issue reported on code.google.com by jacob.ge...@gmail.com on 26 Oct 2011 at 4:16
Original issue reported on code.google.com by
jacob.ge...@gmail.com
on 26 Oct 2011 at 4:16