📄 localmax.m
字号:
%function [U,V] = localMax(I,radius,thresh)%% Finds local maxima at a specified scale.%% INPUT:% I - the image % radius - the radius in which to search for a local maximum% thresh - the values of I must be above this to be considered%% OUTPUT: % U,V - the U and V coordinates of the foudn maxima function [U,V] = localMax(I,radius,thresh)mask = meshgrid(-radius:radius,-radius:radius);mask = sqrt(mask.*mask+mask'.*mask');mask = mask<=radius;tempI = ordfilt2(I,sum(mask(:)),mask);[U,V] = find(tempI == I & I > thresh);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -