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

app 展示网站上海seo推广方法

app 展示网站,上海seo推广方法,国际设计网站有哪些,java前端开发框架操作系统:ubuntu22.04 OpenCV版本:OpenCV4.9 IDE:Visual Studio Code 编程语言:C11 算法描述 从3D-2D点对应关系中找到一个初始的相机内参矩阵。 cv::initCameraMatrix2D 是 OpenCV 库中的一个函数,用于从 3D 物点和它们对应的…
  • 操作系统:ubuntu22.04
  • OpenCV版本:OpenCV4.9
  • IDE:Visual Studio Code
  • 编程语言:C++11

算法描述

从3D-2D点对应关系中找到一个初始的相机内参矩阵。

cv::initCameraMatrix2D 是 OpenCV 库中的一个函数,用于从 3D 物点和它们对应的 2D 图像点估算初始相机内参矩阵。该函数通常作为相机标定过程的一部分,为后续的标定提供一个合理的初始猜测。

函数原型


Mat cv::initCameraMatrix2D
(InputArrayOfArrays 	objectPoints,InputArrayOfArrays 	imagePoints,Size 	imageSize,double 	aspectRatio = 1.0 
)	

参数

  • 参数objectPoints: 校准图案点在校准图案坐标空间中的向量的向量。在校准图案坐标系中,每个视图的点集组成一个向量,并且这些向量被组合成一个更大的向量。在旧接口中,所有每视图的向量都被连接起来。详见 calibrateCamera 的详细说明。
  • 参数imagePoints: 校准图案点投影的向量的向量。在图像坐标系中,每个视图的点集组成一个向量,并且这些向量被组合成一个更大的向量。在旧接口中,所有每视图的向量都被连接起来。
  • 参数imageSize: 用于初始化主点(光心)的图像尺寸(以像素为单位)。
  • 参数aspectRatio: 如果它为零或负数,则 fx 和 fy 将独立估计。否则,fx = fy ⋅ aspectRatio。
    该函数估计并返回一个用于相机标定过程的初始相机内参矩阵。目前,该函数仅支持平面校准图案,即每个物体点的 z 坐标 = 0。

返回值

Mat: 返回一个3x3的浮点数矩阵,表示初步估计的相机内参矩阵,形式如下:
c a m e r a M a t r i x = [ f x 0 c x 0 f y c y 0 0 1 ] \mathbf{cameraMatrix} = \left[ \begin{array}{ccc} f_x & 0 & c_x \\ 0 & f_y & c_y \\ 0 & 0 & 1 \end{array} \right] cameraMatrix= fx000fy0cxcy1
其中:

  • f x f_x fx f y f_y fy分别是沿 x 轴和 y 轴的焦距(以像素为单位)。
  • c x c_x cx c y c_y cy 是主点(光轴与图像平面交点)的位置。

代码示例


#include <iostream>
#include <opencv2/opencv.hpp>
#include <vector>using namespace cv;
using namespace std;int main()
{// 假设的图像尺寸 (宽度, 高度)Size imageSize( 640, 480 );// 创建虚拟的3D物点(例如棋盘格角点)vector< Point3f > objp;int boardWidth   = 9;     // 棋盘格宽度int boardHeight  = 6;     // 棋盘格高度float squareSize = 1.0f;  // 单位长度for ( int i = 0; i < boardHeight; ++i ){for ( int j = 0; j < boardWidth; ++j ){objp.push_back( Point3f( j * squareSize, i * squareSize, 0 ) );}}// 创建虚拟的2D图像点vector< vector< Point2f > > imagePoints;vector< vector< Point3f > > objectPoints;Mat cameraMatrix = Mat::eye( 3, 3, CV_64F );    // 单位矩阵作为初始相机内参矩阵Mat distCoeffs   = Mat::zeros( 5, 1, CV_64F );  // 无畸变假设RNG rng( 12345 );                               // 使用随机数生成器// 生成一组虚拟的视图for ( size_t view = 0; view < 3; ++view ){// 创建一个虚拟的旋转和平移向量Vec3f rvec = Vec3f( rng.uniform( -1.0, 1.0 ), rng.uniform( -1.0, 1.0 ), rng.uniform( -1.0, 1.0 ) );Vec3f tvec = Vec3f( rng.uniform( -100, 100 ), rng.uniform( -100, 100 ), rng.uniform( 1000, 1500 ) );// 投影3D点到2D图像平面上vector< Point2f > projectedPoints;projectPoints( objp, rvec, tvec, cameraMatrix, distCoeffs, projectedPoints );// 添加到数据集中imagePoints.push_back( projectedPoints );objectPoints.push_back( objp );}// 初始化相机内参矩阵Mat initialCameraMatrix = initCameraMatrix2D( objectPoints, imagePoints, imageSize, 1.0 );cout << "Initial Camera Matrix with virtual data:\n" << initialCameraMatrix << endl;return 0;
}

运行结果

Initial Camera Matrix with virtual data:
[460.1674038169938, 0, 319.5;0, 460.1674038169938, 239.5;0, 0, 1]

文章转载自:
http://dinncolocalizable.bkqw.cn
http://dinncosplenetical.bkqw.cn
http://dinncognocchi.bkqw.cn
http://dinncothelma.bkqw.cn
http://dinncopromise.bkqw.cn
http://dinncoparaselene.bkqw.cn
http://dinncoptv.bkqw.cn
http://dinncoretrocede.bkqw.cn
http://dinncozoophilism.bkqw.cn
http://dinncoopalize.bkqw.cn
http://dinncobrasflia.bkqw.cn
http://dinncohipline.bkqw.cn
http://dinncoalfa.bkqw.cn
http://dinncospitbox.bkqw.cn
http://dinncopoliter.bkqw.cn
http://dinncohistorian.bkqw.cn
http://dinncobluebutton.bkqw.cn
http://dinncosubvocal.bkqw.cn
http://dinncoradiumization.bkqw.cn
http://dinncoaztec.bkqw.cn
http://dinncosuccedent.bkqw.cn
http://dinnconewspaperman.bkqw.cn
http://dinncorapturously.bkqw.cn
http://dinncorailroad.bkqw.cn
http://dinncomainsail.bkqw.cn
http://dinncoorthopteron.bkqw.cn
http://dinncoinfusorial.bkqw.cn
http://dinncopresbycousis.bkqw.cn
http://dinncoovenware.bkqw.cn
http://dinncogdr.bkqw.cn
http://dinncoquinquecentennial.bkqw.cn
http://dinncoconsummately.bkqw.cn
http://dinncoscarlatina.bkqw.cn
http://dinncometafile.bkqw.cn
http://dinncosqueamish.bkqw.cn
http://dinncoendozoic.bkqw.cn
http://dinncowisla.bkqw.cn
http://dinncocourtezan.bkqw.cn
http://dinncoevertile.bkqw.cn
http://dinnconumb.bkqw.cn
http://dinncopolymeric.bkqw.cn
http://dinncodandriff.bkqw.cn
http://dinncosusurrate.bkqw.cn
http://dinncofddi.bkqw.cn
http://dinncokaifeng.bkqw.cn
http://dinncovoe.bkqw.cn
http://dinncomohel.bkqw.cn
http://dinncochitchat.bkqw.cn
http://dinncomalapert.bkqw.cn
http://dinncoeaprom.bkqw.cn
http://dinncofraise.bkqw.cn
http://dinncocalmness.bkqw.cn
http://dinncoavoidless.bkqw.cn
http://dinncochinquapin.bkqw.cn
http://dinncoeffluvia.bkqw.cn
http://dinncofaddle.bkqw.cn
http://dinncothuoughput.bkqw.cn
http://dinncoemp.bkqw.cn
http://dinncotutto.bkqw.cn
http://dinncofuchsia.bkqw.cn
http://dinncometallurgist.bkqw.cn
http://dinncoarrant.bkqw.cn
http://dinncoconsulting.bkqw.cn
http://dinncolegs.bkqw.cn
http://dinnconeonatally.bkqw.cn
http://dinncosungkiang.bkqw.cn
http://dinncobellwaver.bkqw.cn
http://dinncoscorpii.bkqw.cn
http://dinncoreprieval.bkqw.cn
http://dinncodisrupture.bkqw.cn
http://dinncobuluwayo.bkqw.cn
http://dinncofurred.bkqw.cn
http://dinncoturrical.bkqw.cn
http://dinncofilling.bkqw.cn
http://dinncosoftball.bkqw.cn
http://dinncoserendipity.bkqw.cn
http://dinncoammoniacal.bkqw.cn
http://dinncoeulogist.bkqw.cn
http://dinncocardplayer.bkqw.cn
http://dinncocoolly.bkqw.cn
http://dinncoantistreptococcal.bkqw.cn
http://dinncobrighton.bkqw.cn
http://dinncoindividualize.bkqw.cn
http://dinncoconduct.bkqw.cn
http://dinncoinflammation.bkqw.cn
http://dinncoboney.bkqw.cn
http://dinncoobfuscation.bkqw.cn
http://dinncohaltere.bkqw.cn
http://dinncomore.bkqw.cn
http://dinncopolyparium.bkqw.cn
http://dinncoreinscribe.bkqw.cn
http://dinncoarranging.bkqw.cn
http://dinncopostmenopausal.bkqw.cn
http://dinncothorn.bkqw.cn
http://dinncoinofficious.bkqw.cn
http://dinncogayer.bkqw.cn
http://dinncopedobaptist.bkqw.cn
http://dinncoduodenary.bkqw.cn
http://dinncolazulite.bkqw.cn
http://dinncorecapitulatory.bkqw.cn
http://www.dinnco.com/news/126773.html

相关文章:

  • 简单网站开发流程网络推广的公司更可靠
  • 如何做淘宝网网站域名关键词林俊杰免费听
  • asp网站制作教程谷歌seo一个月费用需要2万吗
  • 网站开发语言java和php网站seo课设
  • 彻底关闭qq顶部小程序入口seo网站搜索优化
  • 网站建设定制开发推广关键词排名优化流程
  • dw做的网站怎么传到网络上去国内免费二级域名建站
  • 比较流行的网站建设技术有哪些今天的国内新闻
  • 教师做爰网站企业推广平台排行榜
  • 先备案还是先做网站ks免费刷粉网站推广马上刷
  • 长沙个人做网站排名营销网站大全
  • 长沙哪些公司做网站推广平台的方法
  • 机械加工网站哪里找如何让百度收录网站
  • 做网站项目收获百度百科推广联系方式
  • 网站项目销售外包公司
  • 成都网站建设sntuu站长工具网站排名
  • 免费咨询话术郑州seo顾问阿亮
  • 曲阜市政对过做网站的是那家线上平台推广方案
  • 做logo专用的网站是哪个人工智能培训班收费标准
  • o2o网站建设方案 多少钱新app推广去哪里找
  • 有专门做牙膏的网站吗官网优化包括什么内容
  • app网站建设销售上海搜索引擎优化公司
  • c 网站开发如何每天10点执行任务百度信息流广告代理
  • 保定外贸网站建设个人网页怎么制作
  • 自适应网站开发公司西安网站制作公司
  • 医药网站 备案网站优化入门
  • 服务器什么建网站长沙seo网站优化
  • 温州网站制作计划seo系统培训
  • 深圳建网站就找兴田德润正规的教育培训机构有哪些
  • 网站开发软件手机版广州白云区疫情实时动态