Separable N-Dimensional Convolution

버전 1.1.0.0 (3.3 KB) 작성자: Igor Solovey
N-dimensional convolution for separable kernels, similar to functionality of "conv2(hcol, hrow, A)"
다운로드 수: 1.1K
업데이트 날짜: 2011/2/26

라이선스 보기

This function is an implementation of N-dimensional convolution for the special case when the convolution kernel is separable.

A continuous function f(x1, x2, ... xN) is considered separable if there exist N functions f1, f2, ... fN such that f(x1, x2, ... xN) = f1(x1)f2(x2)f3(x3)...fN(xN).

In two dimensions, a discrete version of the separability condition is as follows: a 2D matrix is separable if it can be expressed as an outer product of two 1D vectors:

a=[-1 0 1]; b=[1 0 -1]; H=a'*b

In this case, supplying Matlab's conv2 function with the two vectors a & b (one to convolve the rows with, the second to convolve the columns with) results in a faster computation than supplying conv2 with the outer product H.

Convnsep.m extends this functionality to an arbitrary number of dimensions.

This may be useful for applications such as:
1. Smoothing a 3D image with separable filters
2. Bilateral filtering (requires 4D convolution for filtering a 3D image)

Notes and caveats:

- As the total size of the variable being convolved increases towards the largest size allowable by Matlab (platform/architecture dependent), performance significantly degrades due to memory limitations, and may become worse than that of convn. Because Matlab requires a contiguous block of memory to allocate space for a variable, the maximum size for which performance is reasonable may be significantly lower than the "theoretical" size limit (which is 1.5 GB on my platform).

- For convolution types other than 'full' (no discarding of any samples), only odd-sized kernels are currently working properly.

인용 양식

Igor Solovey (2026). Separable N-Dimensional Convolution (https://kr.mathworks.com/matlabcentral/fileexchange/27957-separable-n-dimensional-convolution), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Image Processing Toolbox에 대해 자세히 알아보기
버전 게시됨 릴리스 정보
1.1.0.0

Fixed a reference to num2str

1.0.0.0