zoukankan      html  css  js  c++  java
  • 【转】MATLAB conv2函数的理解

    另附:http://blog.csdn.net/anan1205/article/details/12313593

    原文:http://blog.csdn.net/andrewseu/article/details/51783181

    在图像处理的过程中,经常会看到矩阵卷积的概念,比如说用一个模板去和一张图片进行卷积,因此很有必要了解矩阵卷积到了做了什么,具体又是怎么计算的。 
    在matlab中有conv2函数对矩阵进行卷积运算,其中有一个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).
    

    用一幅图可以很好的理解这三个参数代码的具体含义: 
    这里写图片描述

    矩阵卷积计算方法

    这里写图片描述 
    这里写图片描述 
    举一个简单的例子, 
    这里写图片描述 
    matlab 的计算结果如下: 
    这里写图片描述

  • 相关阅读:
    Mac重装系统 [转·整合]
    cocos2d-x使用plugin-x
    iOS启动其他应用程序[转]
    iOS时间的创建
    [转] 同步与异步的概念
    Apache 虚拟主机文档
    结构变量2
    //结构体的基本使用
    指向函数的指针
    返回指针的函数
  • 原文地址:https://www.cnblogs.com/qrlozte/p/6706937.html
Copyright © 2011-2022 走看看