资源简介

形态学成分分析,该方法的基本思想是利用信号组成成分的形态差异,将图像分割为纹理和分片光滑部分。

资源截图

代码片段和文件信息

function M = crop(Mnc)

% crop - crop an image to reduce its size 修剪图像
%
%   M = crop(Mnc);
%
%   n is the new size of the image
%   c is the center of the grop
%
%   Copyright (c) 2007 Gabriel Peyr?

n0 = size(M);              %n0=[p0 q0]p0、q0是图像M的两个维度

if nargin<2                %只给出了参数M
    n = round( n0(1:2)/2 );%取p0/2和q0/2最接近的整数p、q,n=[p q],即将图像变为原来的1/4
end
if nargin<3 || isempty(c)  %未给出c
    c = round( n0(1:2)/2 );%c=[p q]处为原图像的的中心,也将其作为新图像的中心
end

if isempty(n)              %只给出了参数M和c,是不允许的
    return;
end

if length(n)==1            %将使用函数时,给出的n和c扩展成数组,表示两维的大小
    n = [n n];
end
if length(c)==1
    c = [c c];
end

c = round(c);


selx = c(1)-ceil(n(1)/2)+1:c(1)+floor(n(1)/2);  %修剪后,第一维范围
sely = c(2)-ceil(n(2)/2)+1:c(2)+floor(n(2)/2);  %修剪后,第二维范围

%当各维元素个数小于1,或大于原图像时,将其设置为无效
se

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3240  2011-06-10 14:48  MCA\testMCA2metadata.mat

     文件        776  2011-05-08 10:32  MCA\MakeList.m

     文件        365  2011-05-07 17:12  MCA\mcalabmeta.mat

     文件        334  2008-12-24 07:51  MCA\LengthList.m

     文件        594  2009-05-19 17:51  MCA\NthList.m

     文件        873  2009-05-19 17:48  MCA\FastLA2.m

     文件       1484  2009-05-19 17:47  MCA\FastCURVWRAPAnalysis.m

     文件        845  2011-05-09 14:40  MCA\fdct_wrapping.m

     文件     529920  2009-06-19 20:18  MCA\fdct_wrapping_mex.mexw32

     文件        384  2009-06-19 20:18  MCA\fdct_wrapping_c2r.m

     文件       1353  2008-12-24 07:51  MCA\FastLDCT2ivAnalysis.m

     文件       1471  2008-12-24 07:51  MCA\FastLDCTivAnalysis.m

     文件        705  2008-12-24 07:51  MCA\rmaxis.m

     文件       1003  2008-12-24 07:51  MCA\FastLS2.m

     文件       1422  2008-12-24 07:51  MCA\FastCURVWRAPSynthesis.m

     文件        754  2009-06-19 20:18  MCA\ifdct_wrapping.m

     文件        317  2009-06-19 20:18  MCA\fdct_wrapping_r2c.m

     文件     529920  2009-06-19 20:18  MCA\ifdct_wrapping_mex.mexw32

     文件       5068  2002-11-12 15:32  MCA\mrdwt.m

     文件       8192  2004-07-28 14:22  MCA\mrdwt.dll

     文件       5210  2002-11-12 15:31  MCA\mirdwt.m

     文件       8704  2004-07-28 14:22  MCA\mirdwt.dll

     文件       1496  2008-12-24 07:51  MCA\FastLDCT2ivSynthesis.m

     文件       1298  2008-12-24 07:51  MCA\FastLDCTivSynthesis.m

     文件        303  2010-03-15 19:31  MCA\psnr.m

     文件        877  2008-12-24 07:51  MCA\FastLDCT2Analysis.m

     文件       1043  2008-12-24 07:51  MCA\FastLDCT2Synthesis.m

     文件        763  2011-05-08 10:32  MCA\MakeList.asv

     文件      12154  2011-05-18 23:10  MCA\MCA2_Bcr.asv

     文件        845  2011-05-09 14:39  MCA\fdct_wrapping.asv

............此处省略73个文件信息

评论

共有 条评论