near_area_detect.m

来自「利用matlab对图像进行读入与处理(运用在仿真领域)」· M 代码 · 共 14 行

M
14
字号
function [near_points,A]=near_area_detect(A,point,t)
%功能:检测出与颜色小于t的点集points的8领域中有哪些点
%包括points中的点
%A是待检测的图像
%
near_points=point;%连通区周围的所有点。
temp_points=[];%点集的8领域点,不包含点集本身。

[temp_points,A]=near8detect(A,point,t);
while size(temp_points,1)>1
	near_points=[near_points;temp_points];
	[temp_points,A]=near8detect(A,temp_points,t);                
end

⌨️ 快捷键说明

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