97 lines
2.0 KiB
C++
97 lines
2.0 KiB
C++
#include "contours_extractor.hpp"
|
|
#include "contours_extractor_impl.hpp"
|
|
|
|
namespace cvpr
|
|
{
|
|
ContoursExtractor::ContoursExtractor()
|
|
: m_impl(std::make_shared<ContoursExtractorImpl>())
|
|
{
|
|
|
|
}
|
|
|
|
void ContoursExtractor::init()
|
|
{
|
|
m_impl->init();
|
|
}
|
|
|
|
void ContoursExtractor::destroy()
|
|
{
|
|
m_impl->destroy();
|
|
}
|
|
|
|
void ContoursExtractor::setAreaThreshold(double threshold)
|
|
{
|
|
m_impl->setAngelThreshold(threshold);
|
|
}
|
|
|
|
double ContoursExtractor::areaThreshold()
|
|
{
|
|
return m_impl->angelThreshold();
|
|
}
|
|
|
|
void ContoursExtractor::setContourOffset(int32_t offset)
|
|
{
|
|
m_impl->setContourOffset(offset);
|
|
}
|
|
|
|
int32_t ContoursExtractor::contourOffset()
|
|
{
|
|
return m_impl->contourOffset();
|
|
}
|
|
|
|
void ContoursExtractor::setApproxPolyEpsilon(double epsilon)
|
|
{
|
|
m_impl->setApproxPolyEpsilon(epsilon);
|
|
}
|
|
|
|
double ContoursExtractor::approxPolyEpsilon()
|
|
{
|
|
return m_impl->approxPolyEpsilon();
|
|
}
|
|
|
|
void ContoursExtractor::setSmoothMethod(SMOOTH_METHOD method)
|
|
{
|
|
m_impl->setSmoothMethod(method);
|
|
}
|
|
|
|
SMOOTH_METHOD ContoursExtractor::smoothMethod()
|
|
{
|
|
return m_impl->smoothMethod();
|
|
}
|
|
|
|
void ContoursExtractor::setAngelThreshold(double threshold)
|
|
{
|
|
m_impl->setAngelThreshold(threshold);
|
|
}
|
|
|
|
double ContoursExtractor::angelThreshold()
|
|
{
|
|
return m_impl->angelThreshold();
|
|
}
|
|
|
|
void ContoursExtractor::setDefectThreshold(double threshold)
|
|
{
|
|
m_impl->setDefectThreshold(threshold);
|
|
}
|
|
|
|
double ContoursExtractor::defectThreshold()
|
|
{
|
|
return m_impl->defectThreshold();
|
|
}
|
|
|
|
void ContoursExtractor::setSmoothStep(double step)
|
|
{
|
|
m_impl->setSmoothStep(step);
|
|
}
|
|
|
|
double ContoursExtractor::smoothStep()
|
|
{
|
|
return m_impl->smoothStep();
|
|
}
|
|
|
|
void ContoursExtractor::extract(const cv::Mat& alpha, std::vector<std::vector<cv::Point>>& outputContours)
|
|
{
|
|
m_impl->extract(alpha, outputContours);
|
|
}
|
|
}
|