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.
IndexProgramming Questions & HelpOther Libraries › OpenCV not working on Windows!
Page Index Toggle Pages: 1
OpenCV not working on Windows! (Read 5040 times)
OpenCV not working on Windows!
Apr 29th, 2010, 1:16am
 
Hi

I can't get openCV to work on Windows, my friends are having the same problems on Windows PCs. I followed the exact instructions on their website, but I still can't get it to work. I tried the latest version as well as the old version, but I keep getting errors when I try to run sample code from their website.

Is anyone else experiencing the problem? Please help me solve it.

Thanks a lot.
Re: OpenCV not working on Windows!
Reply #1 - Apr 29th, 2010, 4:58am
 
HHH wrote on Apr 29th, 2010, 1:16am:
I keep getting errors when I try to run sample code from their website.

We are not psychic, so maybe you should show the kind of error you get...

Although perhaps I am a bit psychic, after all... Is the error about Rectangle
Look at cannot find a class or type named "rectangle" (and some other similar threads...).
Re: OpenCV not working on Windows!
Reply #2 - Apr 29th, 2010, 5:07am
 
Hi

When I try the following code:
Code:
import hypermedia.video.*;

OpenCV opencv;

void setup() {

size( 320, 240 );

opencv = new OpenCV(this);
opencv.capture( width, height );
opencv.cascade( OpenCV.CASCADE_FRONTALFACE_ALT ); // load the FRONTALFACE description file
}

void draw() {

opencv.read();
image( opencv.image(), 0, 0 );

// detect anything ressembling a FRONTALFACE
Rectangle[] faces = opencv.detect();

// draw detected face area(s)
noFill();
stroke(255,0,0);
for( int i=0; i<faces.length; i++ ) {
rect( faces[i].x, faces[i].y, faces[i].width, faces[i].height );
}
}


It highlights the following line:
Code:
opencv.capture( width, height ); 



and gives me this error:

Code:
!!! required library not found : E:\program files\processing-1.0.9\processing-1.0.9\OpenCV.dll: Can't find dependent libraries
Verify that the java.library.path property is correctly set and the '\path\to\OpenCV\bin' exists in your system PATH

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: hypermedia.video.OpenCV.capture(III)V
at hypermedia.video.OpenCV.capture(Native Method)
at hypermedia.video.OpenCV.capture(OpenCV.java:945)
at sketch_apr29a.setup(sketch_apr29a.java:28)
at processing.core.PApplet.handleDraw(PApplet.java:1402)
at processing.core.PApplet.run(PApplet.java:1327)
at java.lang.Thread.run(Thread.java:619)


I made sure I followed all instructions exactly as stated on their website:
http://ubaa.net/shared/processing/opencv/

Any ideas how to fix this problem?
Re: OpenCV not working on Windows!
Reply #3 - Apr 29th, 2010, 6:51am
 
I finally managed to get it working.
It seems that the setup application did not actually update the system PATH. So I did that manually. I also used version 1 [not 2] of openCV. I now hope it works with my other PC.
Thanks for helping.
Re: OpenCV not working on Windows!
Reply #4 - Jun 17th, 2010, 11:04am
 
Hi!

I think i have the same problem that HHH, but i can't solve it.

I installed opencv1.0 on windows, I configure the path to the bin directory, i moved the openCV.dll, openCV.so, openCV.jnilib to the bin directory and i have on my building path the library openCV.jar.

The error is shown when i instantiate a new OpenCV object ( cv = new OpenCV(); ) and the error is:

!!! required library not found : no OpenCV in java.library.path
Verify that the java.library.path property is correctly set and the '\path\to\OpenCV\bin' exists in your system PATH

I'm totally novice on this technology. Can anyone help me?

Thanks.

Page Index Toggle Pages: 1