甘孜州住房和城乡规划建设局如何通过青果软件学院教务网络管理系统提升教育管理效率?
摘要:甘孜州住房和城乡规划建设局网站,青果软件学院教务网络管理系统,什么网站时候做伪静态,国内大型软件外包公司opencv 之 外接多边形(矩形、圆、三角形、椭圆、多边形)使用详解 本文
甘孜州住房和城乡规划建设局网站,青果软件学院教务网络管理系统,什么网站时候做伪静态,国内大型软件外包公司opencv 之 外接多边形#xff08;矩形、圆、三角形、椭圆、多边形#xff09;使用详解 本文主要讲述opencv中的外接多边形的使用#xff1a; 多边形近似外接矩形、最小外接矩形最小外接圆外接三角形椭圆拟合凸包 将重点讲述最小外接矩形的使用
1. API介绍
#多边形近似
v…opencv 之 外接多边形矩形、圆、三角形、椭圆、多边形使用详解 本文主要讲述opencv中的外接多边形的使用 多边形近似外接矩形、最小外接矩形最小外接圆外接三角形椭圆拟合凸包 将重点讲述最小外接矩形的使用
1. API介绍
#多边形近似
void cv::approxPolyDP(InputArray curve,OutputArray approxCurve,double epsilon,bool closed )
Python:
cv.approxPolyDP(curve, epsilon, closed[, approxCurve] ) - approxCurve#计算点到多边形的距离或者判断是否在多边形内部
double cv::pointPolygonTest (InputArray contour,Point2f pt,bool measureDist )
Python:
cv.pointPolygonTest(contour, pt, measureDist) - retval#外接矩形
Rect cv::boundingRect(InputArray array) Python:
cv.boundingRect(array) - retval#最小外接矩形
RotatedRect cv::minAreaRect (InputArray points)
Python:
cv.minAreaRect( points) - retval#求矩形交集
int cv::rotatedRectangleIntersection(const RotatedRect rect1,const RotatedRect rect2,OutputArray intersectingRegion )
Python:
cv.rotatedRectangleIntersection(rect1, rect2[, intersectingRegion] ) - retval, intersectingRegion#最小外接圆
void cv::minEnclosingCircle (InputArray points,Point2f center,float radius )
Python:
cv.minEnclosingCircle(points) - center, radius#最小外接三角形
double cv::minEnclosingTriangle (InputArray points,OutputArray triangle)
Python:
cv.minEnclosingTriangle(points[, triangle] ) - retval, triangle#椭圆拟合
void cv::ellipse(InputOutputArray img,Point center,Size axes,double angle,double startAngle,double endAngle,const Scalar color,int thickness 1,int lineType LINE_8,int shift 0 )
Python:
cv.ellipse( img, center, axes, angle, startAngle, endAngle, color[, thickness[, lineType[, shift]]] ) - img
cv.ellipse( img, box, color[, thickness[, lineType]] ) - img2. 例程
给一个opencv官方的例程
#include opencv2/highgui.hpp
#include opencv2/imgproc.hpp
#include iostream
using namespace cv;
using namespace std;
static void help()
{cout This program demonstrates finding the minimum enclosing box, triang
