We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Pages: 1 2 3 
OpenCV library in Processing? (Read 25875 times)
Re: OpenCV library in Processing?
Reply #15 - Mar 20th, 2008, 5:25pm
 
A simple face detection library is released for the Windows platform using the sample face detection code in OpenCV. A very experimental version is in http://www.bryanchung.net/?p=249

Source and documentation will come later when I fully test it.

Bryan
Re: OpenCV library in Processing?
Reply #16 - Aug 5th, 2008, 10:31pm
 
We now have a public release of our OpenCV library for Processing (v0.1). It works on Macs and PCs and is pretty stable. More functions to be added at a later date:

http://ubaa.net/shared/processing/opencv/
Re: OpenCV library in Processing?
Reply #17 - Aug 14th, 2008, 6:57pm
 
i downloaded OpenCV library, i try to run a sketch but i have this error message :



Exception in thread "Thread-2" java.lang.UnsatisfiedLinkError: capture
at hypermedia.video.OpenCV.capture(Native Method)



someone can help me?
I'm working in my Macbook with OSX 10.4.11
thanks,

Rodrigo
Re: OpenCV library in Processing?
Reply #18 - Aug 15th, 2008, 7:43am
 
Make sure you've downloaded the OpenCV native library, as well as the OpenCV Processing library. We explain this in the online documentation as step 1:

http://www.ubaa.net/shared/processing/opencv/

Remember, there are two libraries: the native Intel libraries (compiled for your OS), and the Processing libraries that connect Processing to those native libraries.

From the root of your hard disk, go into /Libraries/Frameworks/, and you should see "OpenCV.framework". If you don't, re-install with our installer. I you do, then the problem is something else. But usually, based on your error message, it's that.
Re: OpenCV library in Processing?
Reply #19 - Aug 18th, 2008, 8:25pm
 
Thanks!!! it works!! Cheesy
Re: OpenCV library in Processing?
Reply #20 - Sep 11th, 2008, 8:48am
 
OMG thank u guys, best thing ever! had been busting my head off tryng to learn C++ in 5 days for a project, u just saved my life Cheesy
Re: OpenCV library in Processing?
Reply #21 - Sep 11th, 2008, 12:04pm
 
For OpenCv (Processing & Java), Mac, PC & Linux, try here:

http://ubaa.net/shared/processing/opencv/
Re: OpenCV library in Processing?
Reply #22 - Oct 26th, 2008, 12:39pm
 
A note to people who are having trouble with the OpenCV library for Processing on Windows: Use the 1.0 version of OpenCV library, not the 1.1pre1 version available on their Sourceforge page at the moment.
Re: OpenCV library in Processing?
Reply #23 - Oct 30th, 2008, 2:03pm
 
I can't seem to get it to capture video from my webcam (MS Lifecam) so I used the standard video capture from processing and fed each frame into OpenCVs buffer using copy. Unfortunately facedetection doesn't seem to work. I have a suspicion its trying to process the capture memory and not the buffer. I'm not exactly sure how to fix this. Anyone have any ideas?
Re: OpenCV library in Processing?
Reply #24 - Mar 6th, 2009, 11:04pm
 
Hi All,

I am trying to implement the Kalman Filter in my processing code to track an object (e.g. using an Infrared Camera).  

Does any one know if OpenCV for processing supports cvKalman? If not, will there be a release for this feature soon?

Otherwise, can someone kindly point in the right direction for getting the Kalman filter implemented in my code? I have tried looking online for some sample code for the Kalman Filter in Java but have not been very successful. In the past, I've successfully implemented the kalman filter into another project using OpenCV in C++.  

Any suggestions would be greatly appreciated! Thanks.
Re: OpenCV library in Processing?
Reply #25 - Aug 25th, 2009, 2:39am
 
Hi everyone,

I'm trying to run OpenCV lib from inside of NetBeans 6.7 (simpliest example from distibution!!) and after adding all the libraries, paths etc. to NetBeans it runs smoothly till cv.image() is called. At that moment it shows me this error:

Quote:
Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: processing/core/PImage
       at hypermedia.video.OpenCV.image(OpenCV.java:792)
       at hypermedia.video.OpenCV.image(OpenCV.java:772)
       at opencv.Main.draw(Main.java:36)
       at processing.core.PApplet.handleDraw(PApplet.java:1426)
       at processing.core.PApplet.run(PApplet.java:1328)
       at java.lang.Thread.run(Thread.java:613)



PImage is available - i tried it with regular .jpg file. But with cv.image() it doesn't work at all.

Any ideas ??
Re: OpenCV library in Processing?
Reply #26 - Sep 2nd, 2009, 10:18am
 
Hi

When instantiating a new OpenCV object ... like this:
Code:
opencv = new OpenCV( this ); 



What do you pass it? do you use "this"?

I did some stuff in Eclipse a long time ago and I think I had to pass in something like "PApplet" because from Eclipse "this" is a reference to Eclipses environment and in Processing "this" is a reference to the applet.

Am I way of:)
Re: OpenCV library in Processing?
Reply #27 - Sep 3rd, 2009, 4:40am
 
Hi - thanx for your help, but unfortunetally it doesn't solve the problem. I tried to make it:

Code:

openCV = new OpenCV( Main.this );


where Main is the name of the class extending PApplet, but with no result. I tried to send there PApplet as well, but no result.

Funny thing is that the openCV object seems to work as far as it turns the cam on, it even reads from the cam with no problem, but then - while trying to show it with cv.image() - it posts me this crazy error!!

still waiting for help!
Re: OpenCV library in Processing?
Reply #28 - Sep 5th, 2009, 6:09am
 
Hi

Can you post the code? It's a bit hard to figure out if it is only the
image() part that does not work Smiley
Re: OpenCV library in Processing?
Reply #29 - Sep 27th, 2009, 11:53pm
 
I was on vacations for some time, so that's the delay in answer.

The whole code looks like that:

Code:
package opencv;


import processing.core.*;
import hypermedia.video.*;


public class Main extends PApplet
{
OpenCV cv = null; // OpenCV object

       /**
* Initialise Objects.
*/
public void setup()
       {

// PApplet setup
size( 640, 480 );
background(0);

// OpenCV setup
cv = new OpenCV( Main.this );
cv.capture( width, height );
}


/**
* Display the input video stream in invert mode.
*/
public void draw()
       {
cv.read();
cv.invert();

image( cv.image() , 0, 0 );
}


/**
* Call the PApplet main method.
*/
public static void main( String[] args )
       {
PApplet.main( new String[]{"opencv.Main"} );
}


}


As you see it's... just an example from the library. It runs smoothly up till it comes to cv.image() method - no problem with cv.read() and cv.invert().

best,
Krzysztof
Pages: 1 2 3