Quantcast
Channel: Kinect - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 530

Processing and OpenCV / Class don't match

$
0
0

hi,

I am a noob of java and one error i don't understand is java.awt.Rectangle[]" does not match with "Rectangle[]"

my all code is here :

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 fil

}

void draw() {
     class Rectangle {
        };

    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 );
    }
}

I want include why don't match.


Viewing all articles
Browse latest Browse all 530

Trending Articles