• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

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

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap