热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Blob分析之Board_Segmentation_Uncalib懒树懒

Blob分析之Board_Segmentation_Uncalib*********************************************************

Blob分析之Board_Segmentation_Uncalib

* **************************************************************************************************
*  电路板投影矫正
*Projective rectification of a circuit board
* **************************************************************************************************
* 关闭窗体
dev_close_window ()
*设置窗体更新为off
dev_update_window (\'off\')
*读取左右窗体图片
read_image (Image1, \'/stereo/uncalib/board_l\')
read_image (Image2, \'/stereo/uncalib/board_r\')
*计算像素的最大和最小值,按照最大值比例化各个像素
scale_image_max (Image1, Image1)
scale_image_max (Image2, Image2)
*获取图像指针
get_image_pointer1 (Image1, Pointer, Type, Width, Height)
ScaleImage := 0.4
*打开窗体
dev_open_window (0, 0, Width * ScaleImage, Height * ScaleImage, \'black\', Window1)
*设置显示字体
set_display_font (Window1, 14, \'mono\', \'true\', \'false\')
*显示图像1
dev_display (Image1)
*打开窗体
dev_open_window (0, Width * ScaleImage + 8, Width * ScaleImage, Height * ScaleImage, \'black\', Window2)
*显示图像2
dev_display (Image2)
*聚焦窗体1
dev_set_window (Window1)
*显示信息
disp_message (Window1, \'Uncalibrated Stereo Image Pair\', \'window\', 12, 12, \'black\', \'true\')
* Compute Fundamental Matrix
* 用harris算子计算兴趣点也就是基础矩阵
points_harris (Image1, 3, 1, 0.2, 1e5, Row1, Col1)
points_harris (Image2, 3, 1, 0.2, 1e5, Row2, Col2)
*通过两个图像之间的对应的点对来自动计算两个图像之间的基本转换矩阵,
match_fundamental_matrix_ransac (Image1, Image2, Row1, Col1, Row2, Col2, \'ncc\', 21, 0, 200, 20, 50, 0, 0.9, \'gold_standard\', 0.3, 1, FMatrix, CovFMat, Error, Points1, Points2)
Row1 := subset(Row1,Points1)
Col1 := subset(Col1,Points1)
Row2 := subset(Row2,Points2)
Col2 := subset(Col2,Points2)
* 投影矫正开始
* Projective Rectification
* 执行立体投影矫正
gen_binocular_proj_rectification (Map1, Map2, FMatrix, [], Width, Height, Width, Height, 1, \'bilinear_map\', CovFMatRect, H1, H2)
*投影图像
map_image (Image1, Map1, Image1)
map_image (Image2, Map2, Image2)
*投影变换
projective_trans_pixel (H1, Row1, Col1, Row1, Col1)
projective_trans_pixel (H2, Row2, Col2, Row2, Col2)
*
*
* Find the dominant plane in the images by computing the 2D homography.
* Then, the left image is transformed such that points lying in this dominant plane do coincide in both images.
* *通过两个图像之间的对应的点对来自动计算两个图像之间的基本投影变换
proj_match_points_ransac (Image1, Image2, Row1, Col1, Row2, Col2, \'ncc\', 11, 0, 200, 100, 100, 0, 0.6, \'normalized_dlt\', 2, 1, HomMat, Points1, Points2)
*投影变换图像
projective_trans_image (Image1, Image1, HomMat, \'bilinear\', \'false\', \'true\')
* 1. image (cyan) and the 2. image (red) overlaid:
* Regions close to the dominant plane are gray, whereas regions distant to this plane are red or cyan.
  *右下角显示 \'Press Run (F5) to continue\' 这个信息
disp_continue_message (Window1, \'black\', \'true\')
stop ()
*把三个图像转换为一个三通道图像
compose3 (Image1, Image2, Image2, Image)
*湖区图像指针
get_image_pointer1 (Image, Pointer, Type, Width, Height)
*聚焦到窗体2
dev_set_window (Window2)
*关闭窗体
dev_close_window ()
*聚焦窗体1
dev_set_window (Window1)
*清楚窗体
dev_clear_window ()
ScaleImage := 0.4
*放大窗体
dev_set_window_extents (-1, -1, Width * ScaleImage, Height * ScaleImage)
dev_display (Image)
*显示信息
disp_message (Window1, \'Images rectified relative to the dominant plane\', \'window\', 12, 12, \'black\', \'true\')
* The difference between corresponding points, also called parallax, is reciprocal to the 3D distance
* from the space point the reference plane.
* 利用关联技术来计算矫正图像对之间的差别
binocular_disparity (Image1, Image2, Disparity, Score, \'ncc\', 15, 15, 5, -5, 5, 1, 0.8, \'left_right_check\', \'interpolation\')
  *右下角显示 \'Press Run (F5) to continue\' 这个信息
disp_continue_message (Window1, \'black\', \'true\')
stop ()
dev_clear_window ()
dev_display (Disparity)
disp_message (Window1, \'Disparity map\', \'window\', 12, 12, \'black\', \'true\')
*
disp_continue_message (Window1, \'black\', \'true\')
stop ()
*清楚窗体
dev_clear_window ()
*阈值分割
threshold (Disparity, Region, 0.5, 3)
*生成一个圆
gen_circle (StructElem, 10, 10, 3)
*开运算:开运算的目的是先腐蚀后膨胀;目的是把细微连在一起的两块目标分开了,而闭运算则相反
opening (Region, StructElem, Region)
*设置显示颜色
dev_set_color (\'slate blue\')
*吓死你好i图像
dev_display (Image1)
*显示区域
dev_display (Region)
*显示信息
disp_message (Window1, \'Segmentation of components with large height\', \'window\', 12, 12, \'black\', \'true\')

posted on

2020-07-30 15:08 

懒树懒 

阅读(135

评论(0

编辑 

收藏 

举报



推荐阅读
  • CSS3选择器的使用方法详解,提高Web开发效率和精准度
    本文详细介绍了CSS3新增的选择器方法,包括属性选择器的使用。通过CSS3选择器,可以提高Web开发的效率和精准度,使得查找元素更加方便和快捷。同时,本文还对属性选择器的各种用法进行了详细解释,并给出了相应的代码示例。通过学习本文,读者可以更好地掌握CSS3选择器的使用方法,提升自己的Web开发能力。 ... [详细]
  • 颜色迁移(reinhard VS welsh)
    不要谈什么天分,运气,你需要的是一个截稿日,以及一个不交稿就能打爆你狗头的人,然后你就会被自己的才华吓到。------ ... [详细]
  • 人工智能推理能力与假设检验
    最近Google的Deepmind开始研究如何让AI做数学题。这个问题的提出非常有启发,逻辑推理,发现新知识的能力应该是强人工智能出现自我意识之前最需要发展的能力。深度学习目前可以 ... [详细]
  • 在Android开发中,使用Picasso库可以实现对网络图片的等比例缩放。本文介绍了使用Picasso库进行图片缩放的方法,并提供了具体的代码实现。通过获取图片的宽高,计算目标宽度和高度,并创建新图实现等比例缩放。 ... [详细]
  • Echarts图表重复加载、axis重复多次请求问题解决记录
    文章目录1.需求描述2.问题描述正常状态:问题状态:3.解决方法1.需求描述使用Echats实现了一个中国地图:通过选择查询周期&#x ... [详细]
  • 本文介绍了设计师伊振华受邀参与沈阳市智慧城市运行管理中心项目的整体设计,并以数字赋能和创新驱动高质量发展的理念,建设了集成、智慧、高效的一体化城市综合管理平台,促进了城市的数字化转型。该中心被称为当代城市的智能心脏,为沈阳市的智慧城市建设做出了重要贡献。 ... [详细]
  • 本文主要解析了Open judge C16H问题中涉及到的Magical Balls的快速幂和逆元算法,并给出了问题的解析和解决方法。详细介绍了问题的背景和规则,并给出了相应的算法解析和实现步骤。通过本文的解析,读者可以更好地理解和解决Open judge C16H问题中的Magical Balls部分。 ... [详细]
  • sklearn数据集库中的常用数据集类型介绍
    本文介绍了sklearn数据集库中常用的数据集类型,包括玩具数据集和样本生成器。其中详细介绍了波士顿房价数据集,包含了波士顿506处房屋的13种不同特征以及房屋价格,适用于回归任务。 ... [详细]
  • 本文介绍了在Vue项目中如何结合Element UI解决连续上传多张图片及图片编辑的问题。作者强调了在编码前要明确需求和所需要的结果,并详细描述了自己的代码实现过程。 ... [详细]
  • Html5-Canvas实现简易的抽奖转盘效果
    本文介绍了如何使用Html5和Canvas标签来实现简易的抽奖转盘效果,同时使用了jQueryRotate.js旋转插件。文章中给出了主要的html和css代码,并展示了实现的基本效果。 ... [详细]
  • 本文介绍了利用ARMA模型对平稳非白噪声序列进行建模的步骤及代码实现。首先对观察值序列进行样本自相关系数和样本偏自相关系数的计算,然后根据这些系数的性质选择适当的ARMA模型进行拟合,并估计模型中的位置参数。接着进行模型的有效性检验,如果不通过则重新选择模型再拟合,如果通过则进行模型优化。最后利用拟合模型预测序列的未来走势。文章还介绍了绘制时序图、平稳性检验、白噪声检验、确定ARMA阶数和预测未来走势的代码实现。 ... [详细]
  • Vue基础一、什么是Vue1.1概念Vue(读音vjuː,类似于view)是一套用于构建用户界面的渐进式JavaScript框架,与其它大型框架不 ... [详细]
  • python+selenium十:基于原生selenium的二次封装fromseleniumimportwebdriverfromselenium.webdriv ... [详细]
  • ;(function(window){***[dateDiff算时间差]*@param{[typeNumber]}hisTime[历史时间戳, ... [详细]
  • 详解 Python 的二元算术运算,为什么说减法只是语法糖?[Python常见问题]
    原题|UnravellingbinaryarithmeticoperationsinPython作者|BrettCannon译者|豌豆花下猫(“Python猫 ... [详细]
author-avatar
林林净洁_526
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有