資源簡介
在matlab軟件下寫的一個獲取棋盤格亞像素角點的程序,主要是用到了工具箱的一個函數。

代碼片段和文件信息
?clc;?clear;?close?all;
im?=?imread(‘Image__2018-06-30__21-26-36.bmp‘);
%?im?=?imresize(im0.5);
im?=?im2double(im);
[imagePoints?boardSize?imagesUsed]?=?detectCheckerboardPoints(im);%捕獲角點,并儲存在imagePoints
K(8112)=1.0;??%創建3維矩陣???因為得到的角點坐標是8x11個。?
for?i=1:11????%imagePoints是88x2矩陣,通過循環轉換為8x11x2形式的矩陣,方便后續處理
????for?j=1:8
????K(ji1)=imagePoints(j+(i-1)*81);K(ji2)=imagePoints(j+(i-1)*82);
????end
end
figure(2);imshow(im);hold?on?;
for?i?=?1:8
plot(K(i:1)K(i:2)‘bo‘);?????????????%畫出捕獲角點
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????5039926??2018-06-30?21:26??get_subcorner\Image__2018-06-30__21-26-36.bmp
?????文件???????23552??2018-09-20?09:28??get_subcorner\Thumbs.db
?????文件?????????579??2018-09-20?09:21??get_subcorner\my_subcorner.m
?????文件???????30060??2018-09-20?09:28??get_subcorner\亞像素點.PNG
?????目錄???????????0??2018-09-20?09:28??get_subcorner\
- 上一篇:官方matlab中文幫助文檔.pdf
- 下一篇:SVPWM原理及MATLAB仿真指導
評論
共有 條評論