Comments (7)
This is most likely caused by the "auto-synch" feature in JNA, details here
under "Large Structure":
https://jna.dev.java.net/javadoc/overview-summary.html#performance
Unfortunately, functions like cvFindContours() and cvApproxPoly() create CvSeq
objects and the programmer does not get a chance to setAutoSynch(false) before
they get read... I'll think about what could be done to keep things clean. You
may however modify the source code of cxcore.java, as a quick fix, by adding
setAutoSynch(false) to constructors of the CvSeq class.
Samuel
Original comment by [email protected]
on 16 Jul 2010 at 3:01
- Changed state: Accepted
from javacv.
To answer some of the other questions, the number of parameters to the
cvContourArea() method changes with the version of OpenCV, so you need to
import one of the subclasses based on the version of OpenCV you wish to use.
The problem with blobslib is that it's written in C++.. It's quite hard to use
C++ interfaces from other languages. Someone would need to produce an interface
in C first.
Original comment by [email protected]
on 16 Jul 2010 at 3:10
from javacv.
Great,
Thanks, I will try your suggestion.
Additionally, I was wondering why cvContourArea was commented out?
Original comment by [email protected]
on 16 Jul 2010 at 3:18
from javacv.
Sorry, did not see your last reply before I posted my last comment.
Makes sense regarding parameter numbers changing.
I'll experiment with the setAutoSynch too. I'd assume that all the fields would
be null until forcefully read into - not sure how to do that, but I'll look.
Thanks for pointing me in the right direction.
Greg.
Original comment by [email protected]
on 16 Jul 2010 at 8:29
from javacv.
I modified CvSeq slightly in this test package to include a static autoSynch
flag:
http://www.ok.ctrl.titech.ac.jp/~saudet/javacv.jar
With that, something like the following should disable the default auto-synch
behavior of any newly constructed CvSeq objects:
CvSeq.autoSynch = false;
Once "auto-synch" is disabled, you need to call the readField() method to read
the native values of the fields in the Structure. The values of the Java fields
will not be correct..
If that works, I plan to add the flag to all Structures in the next release...
Please let me know if it works, thanks
Original comment by [email protected]
on 12 Aug 2010 at 3:06
- Changed state: Started
from javacv.
I am having the same problem. Blob detection is a pain using javaCV. I have
turned to opencv for processing and it works quite good, but it would be nice
to see a fix or improvement on the javaCV side.
that jar file did not work for me. Did not notice a difference.
Original comment by [email protected]
on 25 Oct 2010 at 12:07
from javacv.
You have to put this line somewhere before your blob detection:
CvSeq.autoSynch = false;
If you did put this line and it did not improve the performance, then please
let me know. Otherwise, I am considering this problem fixed, thank you.
Original comment by [email protected]
on 25 Oct 2010 at 2:03
- Changed state: Fixed
from javacv.
Related Issues (20)
- how to put audio video javacv? HOT 2
- human detecion (color based) HOT 1
- CanvasFrame blank (on mac with java 7) HOT 1
- av_interleaved_write_frame() error -22 while writing interleaved video frame HOT 3
- Android video record using H264 format is to large HOT 1
- Error while createFisher/Eigen/LBPHFaceRecognizer() method is called. HOT 7
- FFmpegFrameGrabber doesn't grab upto the end of the video on Android HOT 5
- RTMP streaming problems HOT 1
- Unable to record with sample code on HOT 4
- Question about the applying the proguard on android HOT 2
- CODEC_ID_MPEG1VIDEO,PIX_FMT_YUV420P cannot be resolved to a variable HOT 4
- While using OpenCV 2.4.9 and JavaCV 0.7 in netbeans windows 7 getting error HOT 3
- Help me Dr.Samuel..(Fatal signal 8 (SIGFPE) at 0x00002835 (code=-6), thread 10293 ) HOT 4
- multi processing with opencv HOT 2
- Problem on train method in face recognition HOT 1
- how to rotate video with javacv on android HOT 1
- Caused by: java.lang.UnsatisfiedLinkError: Couldn't load opencv_core from loader dalvik.system.PathClassLoader HOT 1
- .mp4 video not working in splash screen in htc desire 500 HOT 1
- How to grab the RGB frame instead the gray one? HOT 2
- reconstructImageToNewType Method not Found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javacv.