⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mksq.m

📁 来自澳大利亚Qeensland大学的计算机视觉Matlab工具箱。 This Toolbox provides a number of functions that are useful in co
💻 M
字号:
%MKSQ	Make a test pattern comprising squares%%	im = MKSQ(w, numsq)%%	Create a square output image (W x W) with NUMSQ filled squares along %	the diagonal.  Pixels in the squares are set to one, all others to zero.%% SEE ALSO:	mkline, ihough, xyhough%%	Copyright (c) Peter Corke, 1999  Machine Vision Toolbox for Matlab% 1997 Peter Corkefunction im = mksq(w, nsq)	im = zeros(w,w);	% make the image	k = 2^(nsq+1);		% a useful quantity	ws = w / k;		% each square is 2ws x 2ws	for j=1:4:k,		% for each square		l = j*ws;		% left coord		r = (j+2)*ws-1;		% right coord		im(l:r,l:r) = ones(2*ws,2*ws);	% then fill it	end		

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -