Opencv noise reduction...
in
Contributed Library Questions
•
2 years ago
I have been trying to reduce the opencv noise with the code below, I am roughly getting the idea of how to do it but I think the problem is at the implementation level.
Please somebody help me with the implementation part......
Idea: the idea is the take 3-5 frames and average the position of the rect.
code:
Please somebody help me with the implementation part......
Idea: the idea is the take 3-5 frames and average the position of the rect.
code:
import hypermedia.video.*;
import java.awt.Rectangle;
OpenCV opencv;
void setup() {
size( 320, 240 );
opencv = new OpenCV(this);
opencv.capture( width, height );
opencv.cascade( OpenCV.CASCADE_FRONTALFACE_ALT );
void draw() {
opencv.read();
image( opencv.image(), 0, 0 );
Rectangle[] faces = opencv.detect();
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 );
}
}
1