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

📄 iharris.m

📁 这是一个基于MATLAB的机器视觉工具箱,里面用很多非常有价值的的程序
💻 M
字号:
%IHARRIS		Harris corner detector%%	C = IHARRIS(I)%%	Return an image of 'cornerness', C, from the original grey level image%% REF:	"A combined corner and edge detector", C.G. Harris and M.J. Stephens%	Proc. Fourth Alvey Vision Conf., Manchester, pp 147-151, 1988.%% SEE ALSO:	showcorners%%	Copyright (c) Peter Corke, 1999  Machine Vision Toolbox for Matlab%	pic 10/96function cp = iharris(im)	mask = [-1 0 1; -1 0 1; -1 0 1] / 3;	% compute horizontal and vertical gradients	Ix = conv2(im, mask, 'valid');	Iy = conv2(im, mask', 'valid');		% compute squares amd product	Ixy = Ix .* Iy;	Ix = Ix.^2;	Iy = Iy.^2;	% smooth them	gmask = igauss(1, 1);	Ix = conv2(Ix, gmask, 'valid');	Iy = conv2(Iy, gmask, 'valid');	Ixy = conv2(Ixy, gmask, 'valid');	% computer cornerness	c = (Ix + Iy) ./ (Ix .* Iy - Ixy.^2);	% compute minimum value around each pixel	cmin = imorph(c, ones(3,3), 'min');	% if pixel equals minimum, its a local minima, find index	l = find(c == cmin);	cp = ones(size(c)) * max(max(c));	cp(l) = c(l);

⌨️ 快捷键说明

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