Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
waynewing
waynewing's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
help! Null Pointer Exception error
[0 Replies]
12-Nov-2011 10:39 PM
Forum:
Contributed Library Questions
Hey everyone. I'm getting this error after running my code:
import java.awt.*;
import hypermedia.video.*;
OpenCV opencv;
void setup() {
size( 320, 240 );
opencv = new OpenCV( this );
opencv.capture( width, height );
opencv.cascade( "haarcascades/haarcascade_frontalface_alt.xml" );
}
void draw() {
opencv.read();
Rectangle[] faces =
opencv.detect( 1.2, 2, OpenCV.HAAR_DO_CANNY_PRUNING, 40, 40 );
image( opencv.image(), 0, 0 );
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 );
}
}
public void stop() {
opencv.stop();
super.stop();
}
I've checked the webcam and it just works and I have added the bin folder to PATH.
Could anyone please help me out? Thx!
I'm running Processing 1.5.1 on windows 7 using virtual PC XP mode
«Prev
Next »
Moderate user : waynewing
Forum