资源简介
实现计算机视觉(Computer Vision)中的Haralick区域增长算法(Haralick Region Growing Algorithm)用于实现图像分割。
代码片段和文件信息
function boundaryAxis = BoundaryMarkingProcessing(I labelMatrix c)
% This file implements boundary marking out algorithm.
% Zexun Wang (Email: wangzexun@gmail.com)
% Electronic Engineering Department
% Harbin Institute of Techonology
% P.R.China
% 2009 December
[M N] = size(I);
boundaryAxis = [];
boundaryAxis = [boundaryAxis; c];
[bPlus cPlus startFlag] = ModifiedBoundaryFollowingAlgorithmLeftStart(M N c labelMatrix);
if startFlag ~= 5
boundaryAxis = [boundaryAxis; cPlus];
startFlagIn = startFlag;
while ( cPlus(1) ~= c(1) ) || ( cPlus(2) ~= c(2) )
% startFlag = 1 down start;
% startFlag = 2 left start;
% startFlag = 3 up start;
% startFlag = 4 right start;
if startFlagIn == 1
[bPlus cPlus startFlagIn] = ModifiedBoundaryFollowingAlgorithmDownStart(M N cPlus labelMatrix);
boundaryAxis = [boundaryAxis; cPlus];
elseif startFlagIn == 2
[bPlus cPlus startFlagIn] = ModifiedBoundaryFollowingAlgorithmLeftStart(M N cPlus labelMatrix);
boundaryAxis = [boundaryAxis; cPlus];
elseif startFlagIn == 3
[bPlus cPlus startFlagIn] = ModifiedBoundaryFollowingAlgorithmUpStart(M N cPlus labelMatrix);
boundaryAxis = [boundaryAxis; cPlus];
elseif startFlagIn == 4
[bPlus cPlus startFlagIn] = ModifiedBoundaryFollowingAlgorithmRightStart(M N cPlus labelMatrix);
boundaryAxis = [boundaryAxis; cPlus];
end
end
end
[cutFlag1 cutFlag2] = size(boundaryAxis);
if cutFlag1 ~= 1
boundaryAxis = boundaryAxis(1 : cutFlag1 - 1 :);
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 66614 2009-12-23 16:24 Haralick Region Growing Matlab Code\airplane256.bmp
文件 1676 2009-12-30 19:06 Haralick Region Growing Matlab Code\BoundaryMarkingProcessing.m
文件 3812 2009-12-30 19:06 Haralick Region Growing Matlab Code\HaralickGrowingAlgorithm.m
文件 4284 2009-12-30 19:06 Haralick Region Growing Matlab Code\ModifiedBoundaryFollowingAlgorithmDownStart.m
文件 4284 2009-12-30 19:06 Haralick Region Growing Matlab Code\ModifiedBoundaryFollowingAlgorithmLeftStart.m
文件 4285 2009-12-30 19:06 Haralick Region Growing Matlab Code\ModifiedBoundaryFollowingAlgorithmRightStart.m
文件 4280 2009-12-30 19:06 Haralick Region Growing Matlab Code\ModifiedBoundaryFollowingAlgorithmUpStart.m
文件 909 2009-12-30 19:07 Haralick Region Growing Matlab Code\README.txt
文件 19328 2009-12-30 19:07 Haralick Region Growing Matlab Code\Region
目录 0 2009-12-30 19:04 Haralick Region Growing Matlab Code
----------- --------- ---------- ----- ----
109472 10
评论
共有 条评论