sepfilter.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:pyrsss 作者: butala 项目源码 文件源码
def asmatrix(self):
        """
        Return the sparse matrix representation of the separable filter.
        """
        h_matrix = NP.array([1])
        for i in range(self.ndim):
            if self.mode == 'circ':
                h_i = Convmtx([self.k[i]], self.h_list[i], mode=self.mode)
            else:
                h_i = Convmtx([self.n[i]], self.h_list[i], mode=self.mode)
            h_matrix = scipy.sparse.kron(h_matrix, h_i)
        return h_matrix
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号