用matlab生成黑白棋盘格作相机标定模板

<div id="article_content" class="article_content">

<ol start="1" style="padding:0px; border:none; color:rgb(92,92,92); font-family:Consolas,'Courier New',Courier,mono,serif; line-height:26px; margin:0px 0px 1px 45px!important">
<li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span style="margin:0px; padding:0px; border:none; background-color:inherit">function M = writeChessBoard( width, height, size, xnum, ynum, position, background)  </span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">% This function writes a chessboard on image.  </span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">% 该方程创建一个棋盘格图像。  </span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">%参数解释:  </span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">%   width: 宽度  </span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">%   height:高度  </span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">%   size:单个小方块的大小  </span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">%   xum:x方向上的个数(每4个小方块一组)  </span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">%   xum:x方向上的个数(每4个小方块一组)  </span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">%   position:起始位置的坐标(为了留出边,便于打印)  </span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">%   background:背景亮度, 0<=background<=1, 0表示纯黑,1表示纯白  </span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">  </span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">    M=ones(width,height);  </span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">    M(:)=background;  </span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">    block=size*2;  </span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">      </span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">    for i=1:xnum,  </span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">        for j=1:ynum,  </span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">            pos=[position(1)+block*(i-1), position(2)+block*(j-1)];  </span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">            M=ChessBoard(M,size,pos);  </span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">        end  </span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">    end  </span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">        </span></li></ol>
<p></p>
<ol start="1" style="padding:0px; border:none; color:rgb(92,92,92); font-family:Consolas,'Courier New',Courier,mono,serif; line-height:26px; margin:0px 0px 1px 45px!important">
<li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important; background-color:rgb(248,248,248)">
<span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit">end  </span></li></ol>
<div><span style="font-family:Consolas,Courier New,Courier,mono,serif"><span style="line-height:18px"><br>
</span></span></div>
<div><span style="font-family:Consolas,Courier New,Courier,mono,serif"><span style="line-height:18px"><br>
</span></span></div>
<div><span style="font-family:Consolas,Courier New,Courier,mono,serif"><span style="line-height:18px"><br>
</span></span></div>
<div><span style="font-family:Consolas,Courier New,Courier,mono,serif"><span style="line-height:18px">或者</span></span></div>
<div><span style="font-family:Consolas,Courier New,Courier,mono,serif"><span style="line-height:18px"><span style="color:rgb(54,46,43); line-height:20px">J = (checkerboard(300,4,5)>0.5);</span><br style="color:rgb(54,46,43); line-height:20px">
<span style="color:rgb(54,46,43); line-height:20px">figure, imshow(J)</span><br>
</span></span></div>
<div><span style="font-family:Consolas,Courier New,Courier,mono,serif"><span style="line-height:18px"><br>
</span></span></div>
<div><span style="font-family:Consolas,Courier New,Courier,mono,serif"><span style="line-height:18px"><br>
</span></span></div>
<div><span style="font-family:Consolas,Courier New,Courier,mono,serif"><span style="line-height:18px"><br>
</span></span></div>
<div><span style="font-family:Consolas,Courier New,Courier,mono,serif"><span style="line-height:18px"><br>
</span></span></div>
<div><span style="font-family:Consolas,Courier New,Courier,mono,serif"><span style="line-height:18px"></span></span>
<p style="color:rgb(54,46,43); font-family:Arial; font-size:14px; line-height:26px">
生成的棋盘样图:</p>
<p style="color:rgb(54,46,43); font-family:Arial; font-size:14px; line-height:26px">
<img alt="" src="https://img-blog.csdn.net/20131023191608765?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvamtoZXJl/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" style="border:none; max-width:100%"></p>
<br>
</div>
<p></p>
   
</div>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值