I want to draw delaunay with the contours that I’ve got with OpenCv.
The goal is to draw outline by delaunay.
Now I’ve made the project based on the openCvExample.
In ofApp.h , I wrote
vector<ofxCvContourFinder> particles;
Then Xcode says like this.
How can I get contour information from OpenCv and write delaunay with them ?
Are there any alternate instead of update() in ofxCvContourFinder?
Or am I doing completely different?
Hi. I don’t really understand why you have a collection of ofxContourFinders in the particle array? I think what you are trying to do is to loop through all found contours and add their points to the caustics. See this example on how to retrieve them from contourFinder.
Thank you mr.underdoeg !
But still I need more time to understand your hint because my study isn’t enough…
I’m keep trying and I’ll upload what I write
so if you(or someone) give me another hint it will be great help for me.
(when you have time)
Thanks .
For example, this page says like this in ofApp.cpp_update( )
// reset caustics and a re-add all the points
caustics.reset();
for(int i = 0; i < particles.size(); i++) {
particles[i].update();
caustics.addPoint(particles[i]);
}
// this triggers the delaunay
caustics.update();
ofSetWindowTitle(ofToString(ofGetFrameRate(), 0));
Instead of particles[ i ].update() , what should I write to update the contours that I get from openCv?
I’d like to use the contours and their points instead of “particles: the points that the author of the page made by himself.”