Ask Your Question

Revision history [back]

You should be able to use findcontour followed by drawcontour to achieve your objective.

You should be able to use findcontour followed by drawcontour to achieve your objective. Here are the exact commands:

std::vector<std::vector<cv::Point>> contours;
std::vector<cv::Vec4i> hierarchy;
cv::findContours ( dst, contours, hierarchy, cv::RETR_EXTERNAL, cv::CHAIN_APPROX_SIMPLE );
cv::drawContours ( dst, contours, -1, cv::Scalar(255), 1, CV_AA );