|
|
|
|
|
|
|
|
grayVideo.allocate(VIDEO_WIDTH, VIDEO_HEIGHT); |
|
|
grayVideo.allocate(VIDEO_WIDTH, VIDEO_HEIGHT); |
|
|
|
|
|
|
|
|
learnBackground = true; |
|
|
learnBackground = true; |
|
|
threshhold = 80; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gui.setup("Parameter"); |
|
|
|
|
|
gui.add(threshhold.set("Threshhold", 80, 0, 255)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//-------------------------------------------------------------- |
|
|
//-------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//-------------------------------------------------------------- |
|
|
//-------------------------------------------------------------- |
|
|
void ofApp::draw(){ |
|
|
void ofApp::draw(){ |
|
|
|
|
|
|
|
|
ofSetHexColor(0xffffff); |
|
|
ofSetHexColor(0xffffff); |
|
|
colorVideo.draw(20, 20); |
|
|
colorVideo.draw(20, 20); |
|
|
grayVideo.draw(40 + VIDEO_WIDTH, 20); |
|
|
grayVideo.draw(40 + VIDEO_WIDTH, 20); |
|
|
|
|
|
|
|
|
contourFinder.blobs[i].boundingRect.getCenter().y + 60 + VIDEO_HEIGHT + VIDEO_HEIGHT); |
|
|
contourFinder.blobs[i].boundingRect.getCenter().y + 60 + VIDEO_HEIGHT + VIDEO_HEIGHT); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gui.draw(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//-------------------------------------------------------------- |
|
|
//-------------------------------------------------------------- |