matlab中卷积运算conv2的三种形式

来源:互联网 发布:编程求解汉诺塔问题 编辑:程序博客网 时间:2024/06/05 02:43

matlab中的conv2是用于对二维数据进行卷积运算,有三个参数可供选择,下面是help content of conv2

conv2 Two dimensional convolution.

    C = conv2(A, B) performs the 2-D convolution of matrices A and B.
    If [ma,na] = size(A), [mb,nb] = size(B), and [mc,nc] = size(C), then
    mc = max([ma+mb-1,ma,mb]) and nc = max([na+nb-1,na,nb]).
 
    C = conv2(H1, H2, A) first convolves each column of A with the vector
    H1 and then convolves each row of the result with the vector H2.  If
    n1 = length(H1), n2 = length(H2), and [mc,nc] = size(C) then
    mc = max([ma+n1-1,ma,n1]) and nc = max([na+n2-1,na,n2]).
    conv2(H1, H2, A) is equivalent to conv2(H1(:)*H2(:).', A) up to
    round-off.
 
    C = conv2(..., SHAPE) returns a subsection of the 2-D
    convolution with size specified by SHAPE:
      'full'  - (default) returns the full 2-D convolution,
      'same'  - returns the central part of the convolution
                that is the same size as A.
      'valid' - returns only those parts of the convolution
                that are computed without the zero-padded edges.

                size(C) = max([ma-max(0,mb-1),na-max(0,nb-1)],0).


关于full, same以及valid三种参数的区别,如下面的实例所示:

full



same



valid

阅读全文
'); })();
0 0
原创粉丝点击
热门IT博客
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 维生素b2说明书 pb 2b2t 深圳长宏b2b平台 考b2驾照需要什么条件 b2驾驶证年审新规定 bv 205 a3-b3 b-2 维生素b作用及功能 维生素b千万别乱补 维生素b作用 美国b2幽灵隐形战略轰炸机 b2驾照新规2018年新规定 维生素b缺乏病 维生素b食物 维生素b说明书 b驾照能开什么车 比亚迪e2 e31230v2 比亚迪e e2 e52680v2 洗衣机e e31220v2 洗衣机显示e2 洗衣机出现e2 比亚迪e2新能源 e52650v2 热水器显示e2 比亚迪e2上市 e31230v2相当于i5几代 me 海尔洗衣机e2 m2e5 e52660v2 比亚迪e2价格 万家乐e2故障排除图解 e5b2a9e4bd90e7be8ee592b2 2e