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.pswp.cn/news/254115.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/254115.shtml
英文地址,請注明出處:http://en.pswp.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…