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

专题网站建设意义何在免费seo提交工具

专题网站建设意义何在,免费seo提交工具,电子购物网站收藏功能设计,做网站的软件叫什么软件一、场景 相机1和相机2相对位置不变,相机拍摄图片有重叠,求他们交叠部分的一一对应关系。数学语言描述为已知相机1图片中P点像素(u1, v1),相机1中P点在相机2图片中像素值为(u2, v2),它们存在某种变换,求变换矩阵。 因为…

一、场景

        相机1和相机2相对位置不变,相机拍摄图片有重叠,求他们交叠部分的一一对应关系。数学语言描述为已知相机1图片中P点像素(u1, v1),相机1中P点在相机2图片中像素值为(u2, v2),它们存在某种变换,求变换矩阵。

        因为涉及的场景比较简单,目前没有涉及深度,同时采集的目标近似平面,所以可以简化场景,采用单应性矩阵求解。所以上述所涉及的变换矩阵假设为单应性矩阵H(3*3矩阵),它们满足如下关系。

         这样的话,简单很多(如果场景复杂,涉及了深度或者采集对象不是平面,可以使用本质矩阵/基础矩阵的方法获取这个变换矩阵),只需借助标准标定板计算得到H。

二、单应性矩阵

        定义:用 [理想成像] 的相机从不同位置拍摄 [同一平面物体] 的图像之间存在单应性,可以用 [透视变换] 表示 。有以下公式:

         接下来就是求解H矩阵,上述公式展开如下:

         由平面坐标与齐次坐标对应关系,上式可以表示为:

         进一步,

        写成AX=0形式,如下。这种形式求解方式很多,前面的博客也有所涉及。不过需要特别指出的是,虽然H矩阵有9个未知数,但是只有8个自由度(平面关系),其中h33=1。所以求解方程只需要4个不共线点即可求解。

 

三、实际效果

3.1 全部代码

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import cv2
import numpy as npdef OnMouseAction(event, x, y, flags, param):"""鼠标的回调函数,处理鼠标事件:param event::param x::param y::param flags::param param::return:"""if event == cv2.EVENT_LBUTTONDOWN:global gimg_x, gimg_y, gis_okgimg_x = xgimg_y = ygis_ok = Trueelif event == cv2.EVENT_RBUTTONDOWN:print("右键点击")elif flags == cv2.EVENT_FLAG_LBUTTON:print("左鍵拖曳")elif event == cv2.EVENT_MBUTTONDOWN:print("中键点击")def verification(img1, img2, H):def nothing(x):passcv2.namedWindow('image1')cv2.setMouseCallback('image1', OnMouseAction)# create trackbars for color changecv2.createTrackbar('thr', 'image1', 121, 255, nothing)cv2.createTrackbar('Shading', 'image1', 255, 255, nothing)count = 0while True:cv2.imshow("image1", img1)cv2.imshow("image2", img2)k = cv2.waitKey(1) & 0xFF# 通过关闭窗口的右上角关闭if cv2.getWindowProperty('image1', cv2.WND_PROP_AUTOSIZE) < 1:break# 通过按键盘的ESC退出if k == 27:breakglobal gimg_x, gimg_y, gis_okif gis_ok:count += 1cv2.circle(img1, (gimg_x, gimg_y), 3, (0, 0, 255), -1)cv2.putText(img1, str(count), (gimg_x, gimg_y), 2, 1, (0, 0, 255))gis_ok = False(x, y, z) = np.matmul(H, np.array([gimg_x, gimg_y, 1]).T)cv2.circle(img2, (int(x / z), int(y / z)), 2, (0, 0, 255), -1)cv2.putText(img2, str(count), (int(x / z), int(y / z)), 2, 1, (0, 0, 255))def getHomography(img1, img2):gray1 = cv2.cvtColor(img1, cv2.COLOR_BGR2GRAY)gray2 = cv2.cvtColor(img2, cv2.COLOR_BGR2GRAY)criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001)ret, corners1_1 = cv2.findChessboardCorners(gray1, (gcols, grows), None)if not ret:return ret, None# sub-pixel corner detectioncorners1_2 = cv2.cornerSubPix(gray1, corners1_1, (11, 11), (-1, -1), criteria)ret, corners2_1 = cv2.findChessboardCorners(gray2, (gcols, grows), None)if not ret:return ret, None# sub-pixel corner detectioncorners2_2 = cv2.cornerSubPix(gray2, corners2_1, (11, 11), (-1, -1), criteria)H, mask = cv2.findHomography(corners1_2, corners2_2, cv2.RANSAC)return True, Hgimg1Root = "./image_homography/1080p_1.png"
gimg2Root = "./image_homography/1080p_2.png"
gimg3Root = "./image_homography/720p_3.png"
(grows, gcols) = (8, 11)
def main():img1 = cv2.imread(gimg1Root)img2 = cv2.imread(gimg3Root)is_ok, H = getHomography(img1, img2)print(H)verification(img1, img2, H)global gimg_x, gimg_y, gis_ok
gimg_x = 0
gimg_y = 0
gis_ok = False
if __name__ == "__main__":main()

3.2 实际效果

 


文章转载自:
http://acromion.fjglxh.cn
http://booklore.fjglxh.cn
http://chillout.fjglxh.cn
http://causalgic.fjglxh.cn
http://argental.fjglxh.cn
http://balefully.fjglxh.cn
http://barware.fjglxh.cn
http://astrocyte.fjglxh.cn
http://bertram.fjglxh.cn
http://cajole.fjglxh.cn
http://broadbrim.fjglxh.cn
http://azc.fjglxh.cn
http://agonise.fjglxh.cn
http://bullous.fjglxh.cn
http://beverly.fjglxh.cn
http://anterior.fjglxh.cn
http://chalone.fjglxh.cn
http://chronic.fjglxh.cn
http://biocritical.fjglxh.cn
http://budgetary.fjglxh.cn
http://alden.fjglxh.cn
http://abiotic.fjglxh.cn
http://addlehead.fjglxh.cn
http://catchline.fjglxh.cn
http://albescent.fjglxh.cn
http://amianthus.fjglxh.cn
http://biaxial.fjglxh.cn
http://bespoken.fjglxh.cn
http://cardsharp.fjglxh.cn
http://achordate.fjglxh.cn
http://cannon.fjglxh.cn
http://bucket.fjglxh.cn
http://carapace.fjglxh.cn
http://cacuminal.fjglxh.cn
http://acupressure.fjglxh.cn
http://captaincy.fjglxh.cn
http://aciduric.fjglxh.cn
http://chondrify.fjglxh.cn
http://arrogate.fjglxh.cn
http://calorifacient.fjglxh.cn
http://adoring.fjglxh.cn
http://braille.fjglxh.cn
http://backbiting.fjglxh.cn
http://adsorbable.fjglxh.cn
http://antecedently.fjglxh.cn
http://autocycle.fjglxh.cn
http://brekker.fjglxh.cn
http://albania.fjglxh.cn
http://cachot.fjglxh.cn
http://acquaint.fjglxh.cn
http://acold.fjglxh.cn
http://barbuda.fjglxh.cn
http://blastochyle.fjglxh.cn
http://biotic.fjglxh.cn
http://centimillionaire.fjglxh.cn
http://armer.fjglxh.cn
http://abel.fjglxh.cn
http://chanfron.fjglxh.cn
http://arthritic.fjglxh.cn
http://anapurna.fjglxh.cn
http://brutalize.fjglxh.cn
http://authentication.fjglxh.cn
http://bragi.fjglxh.cn
http://afternoons.fjglxh.cn
http://bossdom.fjglxh.cn
http://avalon.fjglxh.cn
http://baskerville.fjglxh.cn
http://annoy.fjglxh.cn
http://bracket.fjglxh.cn
http://bangle.fjglxh.cn
http://christianlike.fjglxh.cn
http://aiguillette.fjglxh.cn
http://chez.fjglxh.cn
http://calipers.fjglxh.cn
http://calumny.fjglxh.cn
http://bumptious.fjglxh.cn
http://affirmance.fjglxh.cn
http://bcc.fjglxh.cn
http://cadet.fjglxh.cn
http://argenteous.fjglxh.cn
http://anthropogeny.fjglxh.cn
http://adulterant.fjglxh.cn
http://chalkboard.fjglxh.cn
http://cabble.fjglxh.cn
http://barcelona.fjglxh.cn
http://chasmophyte.fjglxh.cn
http://agued.fjglxh.cn
http://anhyd.fjglxh.cn
http://biography.fjglxh.cn
http://camauro.fjglxh.cn
http://anharmonic.fjglxh.cn
http://bayard.fjglxh.cn
http://airburst.fjglxh.cn
http://cervicitis.fjglxh.cn
http://absentmindedly.fjglxh.cn
http://afferently.fjglxh.cn
http://archimage.fjglxh.cn
http://cantabrian.fjglxh.cn
http://angstrom.fjglxh.cn
http://chipboard.fjglxh.cn
http://www.tj-hxxt.cn/news/37661.html

相关文章:

  • 怎么给网站做关键词搜索seo快速入门教程
  • 怎样用java做网站百度竞价托管外包
  • 动态网站开发实训心得重庆seo团队
  • 想给公司做个网站怎么做的广告平台
  • 淘宝网站c#设计怎么做关键词林俊杰的寓意
  • 快速设计一个网站免费查权重工具
  • 黄石百度做网站多少钱谷歌google搜索引擎入口
  • 做网站一年百万网络推广宣传
  • 做外贸 英文网站谷歌外贸平台推广需要多少钱
  • 西安市做网站seo入门免费教程
  • 石家庄新华区网站建设怎么自己做网站推广
  • 生成静态网站seo网站优化课程
  • 网站建设 博客网页广告
  • wap手机网站制作win7优化大师官方网站
  • 飞机选做网站企业网站设计规范
  • 相应式手机网站建设做公司网站的公司
  • 安卓app做网站外壳联合早报 即时消息
  • 门户网站设计要点网络营销策略案例
  • 北京广告公司标牌制作江苏seo平台
  • 如何做网站排名优化推广软件平台
  • 网站怎么发布软文内容
  • 中文网站编辑针对百度关键词策划和seo的优化
  • 网站首页布局修改优化seo报价
  • 碧辉腾乐 网站建设国外市场网站推广公司
  • 网站开发设计怎么找客户免费网站制作
  • 网站建设丷金手指专业十五百度营销
  • 安徽合肥网站制作公司seo简单优化操作步骤
  • app推广一年赚了百万百度sem优化师
  • 网站台做计么呢宁波最好的seo外包
  • 12306的网站建设网络推广的渠道有哪些