cesine / AndroidOpenCVforHackathons

A hackathon ready project with selfdocumenting OpenCV debugging so you can get programming with OpenCV as soon as possible
4 stars 7 forks source link

Draw contours in color #7

Open cesine opened 12 years ago

cesine commented 12 years ago

Step 1: You can get some contours by applying a threshold on the image (see code in jni/image_processing.cpp)

vector<vector > contours; findContours(thresh, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);//###

Step 2: Draw your contours

/*

For more details on what the parameters are for the drawContours function, see the friendly OpenCV docs: http://opencv.itseez.com/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html?highlight=drawcontours#cv.DrawContours