1 #include "detectcircleimpl.h" 5 DetectCircle::_DetectCircleImpl::_DetectCircleImpl(
DetectCircle *
const _ptr):
11 int DetectCircle::_DetectCircleImpl::getParam1()
const 16 void DetectCircle::_DetectCircleImpl::setParam1(
int value)
21 int DetectCircle::_DetectCircleImpl::getParam2()
const 26 void DetectCircle::_DetectCircleImpl::setParam2(
int value)
31 int DetectCircle::_DetectCircleImpl::getMinDist()
const 36 void DetectCircle::_DetectCircleImpl::setMinDist(
int value)
41 std::vector<cv::Vec3f> DetectCircle::_DetectCircleImpl::detectCircle()
const 43 cv::Mat temp = ptr ->
getImg();
44 std::vector<cv::Vec3f> circles;
45 if(temp.type() != CV_8UC1)
46 cv::cvtColor(temp, temp, cv::COLOR_BGR2GRAY);
47 cv::HoughCircles(temp, circles, cv::HOUGH_GRADIENT, 1, getMinDist(), getParam1(), getParam2());
51 QVariant DetectCircle::_DetectCircleImpl::processImage()
53 std::vector<cv::Vec3f> circles = detectCircle();
54 emit ptr->circlesDetected(circles);
55 return QVariant::fromValue<std::vector<cv::Vec3f>> (circles);
cv::Mat getImg() const
AbstractImageProcessor::getImg.
this class is used To Detect circles in an image
Common Namespace for all Image Processor Algorithms.