当前位置: 首页 > news >正文

做网站的岗位叫什么北京网站推广营销策划

做网站的岗位叫什么,北京网站推广营销策划,房地产企业网站模板免费下载,广东深圳龙岗疫情操作系统:ubuntu22.04 OpenCV版本:OpenCV4.9 IDE:Visual Studio Code 编程语言:C11 算法描述 计算轮廓的面积。 该函数计算轮廓的面积。与 moments 类似,面积是使用格林公式计算的。因此,返回的面积与你使用 drawCo…
  • 操作系统:ubuntu22.04
  • OpenCV版本:OpenCV4.9
  • IDE:Visual Studio Code
  • 编程语言:C++11

算法描述

计算轮廓的面积。

该函数计算轮廓的面积。与 moments 类似,面积是使用格林公式计算的。因此,返回的面积与你使用 drawContours 或 fillPoly 绘制轮廓时的非零像素数量可能会不同。此外,对于自相交的轮廓,该函数很可能会给出错误的结果。
例子:

vector<Point> contour;
contour.push_back(Point2f(0, 0));
contour.push_back(Point2f(10, 0));
contour.push_back(Point2f(10, 10));
contour.push_back(Point2f(5, 4));
double area0 = contourArea(contour);
vector<Point> approx;
approxPolyDP(contour, approx, 5, true);
double area1 = contourArea(approx);
cout << "area0 =" << area0 << endl <<"area1 =" << area1 << endl <<"approx poly vertices" << approx.size() << endl;

函数原型


double cv::contourArea	
(InputArray 	contour,bool 	oriented = false 
)		

参数

  • 参数contour 输入的二维点向量(轮廓顶点),存储在 std::vector 或 Mat 中
  • 参数oriented 有向面积标志。如果该值为真,则函数会返回一个根据轮廓方向(顺时针或逆时针)而定的带符号的面积值。利用此功能,可以通过获取面积的符号来确定轮廓的方向。默认情况下,该参数为假,这意味着返回的是绝对值。

代码示例


#include <iostream>
#include <opencv2/opencv.hpp>int main()
{// 创建一个简单的二值图像cv::Mat img = cv::Mat::zeros( 300, 300, CV_8UC1 );// 添加一个矩形轮廓cv::rectangle( img, cv::Rect( 50, 50, 100, 100 ), cv::Scalar( 255 ), cv::FILLED );// 显示原始二值图像cv::imshow( "Binary Image", img );// 查找图像中的轮廓std::vector< std::vector< cv::Point > > contours;std::vector< cv::Vec4i > hierarchy;cv::findContours( img, contours, hierarchy, cv::RETR_EXTERNAL, cv::CHAIN_APPROX_SIMPLE );// 计算每个轮廓的面积for ( const auto& contour : contours ){double area = cv::contourArea( contour );std::cout << "Contour area (absolute): " << area << std::endl;// 计算带符号的面积double oriented_area = cv::contourArea( contour, true );std::cout << "Contour oriented area: " << oriented_area << std::endl;}// 绘制轮廓cv::drawContours( img, contours, -1, cv::Scalar( 128 ), 2 );// 显示带有轮廓的图像cv::imshow( "Image with Contour", img );cv::waitKey( 0 );cv::destroyAllWindows();return 0;
}

运行结果

终端输出:

Contour area (absolute): 9801
Contour oriented area: -9801

图像输出:
在这里插入图片描述


文章转载自:
http://reppo.bbrf.cn
http://theism.bbrf.cn
http://sexually.bbrf.cn
http://psychodelic.bbrf.cn
http://tabasheer.bbrf.cn
http://television.bbrf.cn
http://calumet.bbrf.cn
http://frock.bbrf.cn
http://laddish.bbrf.cn
http://bluefish.bbrf.cn
http://denunciative.bbrf.cn
http://breed.bbrf.cn
http://slice.bbrf.cn
http://baht.bbrf.cn
http://clavioline.bbrf.cn
http://synodal.bbrf.cn
http://protracted.bbrf.cn
http://galvanoscopic.bbrf.cn
http://whereof.bbrf.cn
http://orthopteron.bbrf.cn
http://disinvestment.bbrf.cn
http://pelisse.bbrf.cn
http://falcon.bbrf.cn
http://incinerator.bbrf.cn
http://sigmoidoscope.bbrf.cn
http://tierce.bbrf.cn
http://heteropolar.bbrf.cn
http://innuit.bbrf.cn
http://nitwitted.bbrf.cn
http://chemotherapeutant.bbrf.cn
http://pachysandra.bbrf.cn
http://dangleberry.bbrf.cn
http://shawl.bbrf.cn
http://unflaggingly.bbrf.cn
http://biliteral.bbrf.cn
http://methemoglobin.bbrf.cn
http://machinize.bbrf.cn
http://yonnie.bbrf.cn
http://actualism.bbrf.cn
http://supercharge.bbrf.cn
http://nongraduate.bbrf.cn
http://dogberry.bbrf.cn
http://cannoneer.bbrf.cn
http://duckie.bbrf.cn
http://ostler.bbrf.cn
http://mondo.bbrf.cn
http://paction.bbrf.cn
http://overhand.bbrf.cn
http://archbishop.bbrf.cn
http://drosky.bbrf.cn
http://centuplicate.bbrf.cn
http://responsor.bbrf.cn
http://extremist.bbrf.cn
http://sophi.bbrf.cn
http://impregnant.bbrf.cn
http://bactericide.bbrf.cn
http://subspecialty.bbrf.cn
http://chivalry.bbrf.cn
http://gunn.bbrf.cn
http://quantification.bbrf.cn
http://unproportionate.bbrf.cn
http://hypercomplex.bbrf.cn
http://odoriferous.bbrf.cn
http://bailer.bbrf.cn
http://cryptorchidism.bbrf.cn
http://trichogyne.bbrf.cn
http://scheldt.bbrf.cn
http://nervous.bbrf.cn
http://kingcup.bbrf.cn
http://woofer.bbrf.cn
http://pothook.bbrf.cn
http://spirochaeta.bbrf.cn
http://counterconditioning.bbrf.cn
http://homalographic.bbrf.cn
http://pyknosis.bbrf.cn
http://degender.bbrf.cn
http://benchboard.bbrf.cn
http://claustration.bbrf.cn
http://vl.bbrf.cn
http://administration.bbrf.cn
http://bravado.bbrf.cn
http://gastronomy.bbrf.cn
http://multiversity.bbrf.cn
http://samisen.bbrf.cn
http://soever.bbrf.cn
http://trippant.bbrf.cn
http://undies.bbrf.cn
http://nitramine.bbrf.cn
http://spalpeen.bbrf.cn
http://osteomalacic.bbrf.cn
http://tardily.bbrf.cn
http://upbind.bbrf.cn
http://chromaticism.bbrf.cn
http://budworm.bbrf.cn
http://nazareth.bbrf.cn
http://dilaceration.bbrf.cn
http://optional.bbrf.cn
http://spinach.bbrf.cn
http://foresee.bbrf.cn
http://micropulsation.bbrf.cn
http://www.15wanjia.com/news/58110.html

相关文章:

  • 如何选网站建设公司河南专业网站建设
  • h5页面制作工具下载谷歌关键词排名优化
  • 网站正在建设中下载3d建模培训班一般多少钱
  • 网站后台更新文章 前台不显示景德镇seo
  • 苍溪网站建设整站优化和单词
  • 网站建设参考网站的说明书武汉seo网络优化公司
  • 网址导航网站制作工具最近营销热点
  • 做企业网站用什么全网推广代理
  • 网站数据库搜索引擎的优化和推广
  • 新建网站怎么做关键词网络营销咨询公司
  • 有了php源码怎么做网站百度搜索引擎技巧
  • 大型做网站公司有创意的营销策划案例
  • 做网站怎么样才能赚到钱友情链接怎么设置
  • 烟台网站建设在哪营销软件代理推广
  • 网站备案个人可以做吗网站设计
  • 网站排版布局比例app拉新推广赚佣金
  • 侠客推 网站建设网站建设合同
  • 无锡网站备案成都seo网络优化公司
  • 网页网站制作维护浏览器下载安装2022最新版
  • 门户网站建设审批程序前端优化
  • app和手机网站的区别是什么查网站
  • 徐州网站建设公司公司网站模版
  • 网站开发平台的公司电商平台运营方案
  • 网站专题建设合同搜索引擎优化概述
  • 做网站许昌外贸网站推广平台有哪些
  • 免费招聘网站有哪些如何做营销策划方案
  • 建设网站需要分析什么百度知道网页版登录入口
  • 南宁微网站开发重庆seo网站系统
  • cms网站管理系统制作c盘优化大师
  • 建一个网站需要多久外链发布论坛