when i run the code,it will have errors,for example:
and then will be:
Now how could i solve this problems? thank you very much.
the code is:
ofApp.h
#pragma once
#include “ofMain.h”
#include “ofxCv.h”
class ofApp : public ofBaseApp {
public:
void setup();
void update();
void draw();
ofVideoGrabber cam;
ofxCv::ContourFinder contourFinder;
};
ofApp.cpp
#include “ofApp.h”
using namespace ofxCv;
using namespace cv;
void ofApp::setup() {
cam.setup(640, 480);
contourFinder.setMinAreaRadius(10);
contourFinder.setMaxAreaRadius(200);
}
void ofApp::update() {
cam.update();
if(cam.isFrameNew()) {
contourFinder.setThreshold(ofMap(mouseX, 0, ofGetWidth(), 0, 255));
contourFinder.findContours(cam);
}
}
void ofApp::draw() {
ofSetColor(255);
cam.draw(0, 0);
contourFinder.draw();
}