halcon直线标定板对相机标定的效果评估(对比矫正前后、对比标定板矫正效果)

原图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

程序源码

* gen_caltab (7, 7, 0.0025, 1/2.5, 'GB025标定板.descr', 'GB025标定板.ps')
* Calibration 01: Code generated by Calibration 01
* CameraParameters := [0.048105,-44.0585,8.31518e-006,8.3e-006,641.37,588.269,1280,1024]
* CameraPose := [-0.000849522,-0.00119001,0.155349,357.367,2.64825,174.694,0]
* stop ()
* Calibration 01: Code generated by Calibration 01
CameraParameters := [0.0481151,56.7536,-739213,1.05534e+010,0.00643696,0.00896216,8.31503e-006,8.3e-006,636.538,582.388,1280,1024]
CameraPose := [-0.000719502,-0.00103218,0.155376,357.307,2.70546,174.696,0]
stop ()read_image (Image, '直线标定板图片/Left201113141949916.bmp')
get_image_size (Image, Width, Height)
dev_close_window ()
dev_open_window_fit_image (Image, 0, 0, -1, -1, WindowHandle)
dev_display (Image)
* Image Acquisition 01: Code generated by Image Acquisition 01
list_files ('直线标定板图片', ['files','follow_links'], ImageFiles)
tuple_regexp_select (ImageFiles, ['\\.(tif|tiff|gif|bmp|jpg|jpeg|jp2|png|pcx|pgm|ppm|pbm|xwd|ima|hobj)$','ignore_case'], ImageFiles)
gen_empty_obj (Edges)
for Index := 0 to 20 - 1 by 1read_image (Image, ImageFiles[Index])edges_sub_pix (Image, ImageEdges, 'canny', 1, 10, 40)segment_contours_xld (ImageEdges, SplitEdges, 'lines_circles', 5, 4, 2)select_shape_xld (SplitEdges, SelectedEdges, 'contlength', 'and', 30, 100000)concat_obj (Edges, SelectedEdges, Edges)dev_display (Image)dev_set_colored (12)dev_display (SelectedEdges)wait_seconds (0.1)
*     stop ()
endforradial_distortion_self_calibration (Edges, CalibrationEdges, Width, Height, 0.08, 42, 'polynomial', 'variable', 0, CamParMultiImage)
dev_clear_window ()
dev_set_colored (12)
dev_display (CalibrationEdges)**********对比矫正后的图片与矫正前的图片
change_radial_distortion_cam_par ('fixed', CamParMultiImage, 0, CamParMultiImageRect)
for Index := 0 to |ImageFiles| - 1 by 1read_image (Image, ImageFiles[Index])get_domain (Image, Domain)* Rectify the image, i.e., remove the radial distortions.change_radial_distortion_image (Image, Domain, ImageRectified, CamParMultiImage, CamParMultiImageRect)* Display the distorted and undistorted image to visualize the* differences between the images.dev_display (Image)sub_image (Image, ImageRectified, ImageSub3, 1, 0)stop ()disp_message (WindowHandle, 'Image with radial distortions', 'window', 0, 0, 'black', 'true')wait_seconds (0.5)dev_display (ImageRectified)disp_message (WindowHandle, 'Image without radial distortions', 'window', 0, 0, 'black', 'true')wait_seconds (0.5)
endfor*标定板畸变矫正准备
change_radial_distortion_cam_par ('fixed', CameraParameters, [0,0,0,0,0], CamParVirtualFixed)
* CamParVirtualFixed:=CameraParameters
gen_radial_distortion_map(MapFixed,CameraParameters,CamParVirtualFixed,'bilinear')
*直线畸变矫正准备
change_radial_distortion_cam_par ('fixed', CamParMultiImage, [0,0,0,0,0], CamParMultiImageRect)
get_domain (Image, Domain)for Index := 0 to |ImageFiles| - 1 by 1read_image (Image, ImageFiles[Index])* 直线标定change_radial_distortion_image (Image, Domain, ImageRectified, CamParMultiImage, CamParMultiImageRect)* 标定板标定map_image(Image,MapFixed,ImageRectifiedFixed)*标定板与直线标定sub_image (ImageRectified, ImageRectifiedFixed, ImageSub, 1, 128)intensity (Domain, ImageSub, Mean, Deviation)sub_image (Image, ImageRectifiedFixed, ImageSub1, 1, 128)intensity (Domain, ImageSub1, Mean1, Deviation1)sub_image (Image, ImageRectified, ImageSub2, 1, 128)intensity (Domain, ImageSub2, Mean2, Deviation2)dev_display (Image)disp_message (WindowHandle, 'Image with radial distortions', 'window', 0, 0, 'black', 'true')wait_seconds (0.5)dev_display (ImageRectified)disp_message (WindowHandle, 'Image without radial distortions', 'window', 0, 0, 'black', 'true')wait_seconds (0.5)
endfor

直线标定板标定前后对比:

在这里插入图片描述

直线标定板矫正与标定板差异

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/254115.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【QQ输入法】QQ输入法-剪切板 释放内存

发现一个神奇的情况: 清除和关闭的操作: 1. 2.右键 3.点击 4.清空 5.最后需要关闭 QQ输入法的进程

Socket编程原理

什么是SocketSocket接口是TCP/IP网络的API,Socket接口定义了许多函数或例程,程序员可以用它们来开发TCP/IP网络上的应用程序。要学Internet上的TCP/IP网络编程,必须理解Socket接口。Socket接口设计者最先是将接口放在Unix操作系统里面的。如果…

【XLL 框架库函数】 TempActiveCell/TempActiveCell12

这两个函数创建 XLOPER/XLOPER12 ,包含了当前激活工作表上的单元格引用。 LPXLOPER TempActiveCell(WORD row, BYTE col); LPXLOPER12 TempActiveCell12(RW row, COL co); 参数 row 引用行号,行号参数是从0开始的,因此 第一行就是0. col 引用…

POJ 3264 Balanced Lineup【线段树区间查询求最大值和最小值】

Balanced Lineup Time Limit: 5000MS Memory Limit: 65536KTotal Submissions: 53703 Accepted: 25237Case Time Limit: 2000MSDescription For the daily milking, Farmer Johns N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to…

halcon测试一张图片是否过曝或过暗

read_image (Image, 1.bmp) count_obj (Image, Number) if(Number<0)return() endif min_max_gray (Image, Image, 0, Min, Max, Range) if(Min<1)*图像过暗 endif if(Max>254)*图像过曝 endif

真的要做一辈子的程序员吗?来自10年程序员的心声

经常听一些同学说&#xff1a;不知道下一份工作该去哪类公司做些什么&#xff0c;我的职场人际一团糟老板不重视我&#xff0c;我现在成长的非常慢所以又想跳槽了&#xff0c;我看不到公司的发展前景好迷茫&#xff0c;其实这一切的困惑都来源于没有做好职业规划或者你根本就没…

网络编程之 TCP / UDP 及其流程比较

TCP与UDP的区别 1、基于连接与无连接 2、对系统资源的要求&#xff08;TCP较多&#xff0c;UDP少&#xff09;3、UDP程序结构较简单 流模式与数据报模式 4、TCP保证数据正确性&#xff0c;UDP可能丢包 5、TCP保证数据顺序&#xff0c;UDP不保证具体编程时的区别 1、socket()的参…

Tomcat在Linux上的安装与配置

Tomcat在Linux上的安装与配置 1、 jdk下载地址&#xff1a; http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html tomcat下载地址:http://tomcat.apache.org/download-70.cg 2、jdk安装与配置.&#xff08;rpm包&#xff09; (1)jdk安装…

Spring在3.1版本后的bean获取方法的改变

xml配置不变&#xff0c;如下 <?xml version"1.0" encoding"UTF-8"?> <beans xmlns"http://www.springframework.org/schema/beans"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://…

使用halcon选择点拟合成直线求直线角度

原图 源码 read_image (Image, 0.bmp) dev_clear_window () dev_open_window_fit_image (Image, 0, 0, -1, -1, WindowHandle) dev_display (Image)binary_threshold (Image, Region, max_separability, dark, UsedThreshold) connection (Region, ConnectedRegions) select_s…

Linux网络/firewalld和netfilter/netfilter/iptables语法

为什么80%的码农都做不了架构师&#xff1f;>>> linux网络相关 查看网卡网络信息 ifconfig 命令查看网卡网络信息&#xff0c;比如ip、网关、子网掩码等&#xff0c;但是安装centos7的版本或者某些未知原因&#xff0c;此命令提示找不到&#xff0c;我们可以使用Yu…

Chrome开发者工具详解(4)-Profiles面板

Chrome开发者工具详解(4)-Profiles面板 如果上篇中的Timeline面板所提供的信息不能满足你的要求&#xff0c;你可以使用Profiles面板&#xff0c;利用这个面板你可以追踪网页程序的内存泄漏问题&#xff0c;进一步提升程序的JavaScript执行性能。 概述 当前使用的Chrome最新版为…

etcd raft library设计原理和使用

早在2013年11月份&#xff0c;在raft论文还只能在网上下载到草稿版时&#xff0c;我曾经写过一篇blog对其进行简要分析。4年过去了&#xff0c;各种raft协议的讲解铺天盖地&#xff0c;raft也确实得到了广泛的应用。其中最知名的应用莫过于etcd。etcd将raft协议本身实现为一个l…

halcon通过点拟合圆形,鼠标选点

原图 源码 read_image (Image, 0.bmp) dev_clear_window () dev_open_window_fit_image (Image, 0, 0, -1, -1, WindowHandle) dev_display (Image)binary_threshold (Image, Region, max_separability, dark, UsedThreshold) connection (Region, ConnectedRegions) select_s…

JDBC事务--软件开发三层架构--ThreadLocal

JDBC事务--软件开发三层架构--ThreadLocal 一.JDBC事务 1.概述: 事务是指逻辑上的一组操作!这一组操作,通常认为是一个整体,不可拆分! 特点:同生共死;事务内的这一组操作要么全部成功,要么全部失败! 作用:保证逻辑操作的完整性,安全性! 2.使用(3种方式) 1)面向数据库,使用S…

LINUX多播编程

一.单播&#xff0c;广播和多播 1.单播用于两个主机之间的端对端通信&#xff0c;广播用于一个主机对整个局域网上所有主机上的数据通信。单播和广播是两个极端&#xff0c;要么对一个主机进行通信&#xff0c;要么对整个局域网上的主机进行通信。实际情况下&#xff0c;经常需…

cas单点登录搭建

Cas Server下载&#xff1a;http://developer.jasig.org/cas/ Cas Client下载&#xff1a;http://developer.jasig.org/cas-clients/ 测试环境&#xff1a; jdk&#xff1a;java version "1.8.0_60" tomcat&#xff1a;apache-tomcat-7.0.65 mysql&#xff1a;mysql5…

新CIO:Mark Schwartz认为的领先IT

美国公民及移民服务局前任CIO&#xff0c;现任AWS企业战略师Mark Schwartz在伦敦举行的DevOps企业峰会上介绍了什么是领先的IT。\\Schwartz介绍说&#xff0c;老旧、传统的模型将业务和IT完全分开&#xff0c;他又提出了一种新的模型&#xff0c;在这种模型中&#xff0c;CIO担…

689D Magic Odd Square 奇数幻方

1 奇数阶幻方构造法 (1) 将1放在第一行中间一列; (2) 从2开始直到nn止各数依次按下列规则存放&#xff1a;按 45方向行走&#xff0c;向右上&#xff0c;即每一个数存放的行比前一个数的行数减1&#xff0c;列数加1 (3) 如果行列范围超出矩阵范围&#xff0c;则回绕。例如1在第…

Java单例的常见形式

2019独角兽企业重金招聘Python工程师标准>>> Java单例的常见形式 本文目的&#xff1a;总结Java中的单例模式 本文定位&#xff1a;学习笔记 学习过程记录&#xff0c;加深理解&#xff0c;便于回顾。也希望能给学习的同学一些灵感 一、非延迟加载单例类 public cla…