## Abstract

Computing discrete two-dimensional (2-D) convolutions is an important problem in image processing. In mathematical morphology, an important variant is that of computing binary convolutions, where the kernel of the convolution is a 0-1 valued function. This operation can be quite costly, especially when large kernels are involved. In this paper, we present an algorithm for computing convolutions of this form, where the kernel of the binary convolution is derived from a convex polygon. Because the kernel is a geometric object, we allow the algorithm some flexibility in how it elects to digitize the convex kernel at each placement, as long as the digitization satisfies certain reasonable requirements. We say that such a convolution is valid. Given this flexibility we show that it is possible to compute binary convolutions more efficiently than would normally be possible for large kernels. Our main result is an algorithm which, given an m × n image and a k-sided convex polygonal kernel K, computes a valid convolution in O(kmn) time. Unlike standard algorithms for computing correlations and convolutions, the running time is independent of the area or perimeter of K, and our techniques do not rely on computing fast Fourier transforms. Our algorithm is based on a novel use of Bresenham's line-drawing algorithm and prefix-sums to update the convolution incrementally as the kernel is moved from one position to another across the image.

Original language | English |
---|---|

Pages (from-to) | 1826-1835 |

Number of pages | 10 |

Journal | IEEE Transactions on Image Processing |

Volume | 10 |

Issue number | 12 |

DOIs | |

State | Published - Dec 2001 |

### Bibliographical note

Funding Information:Manuscript received June 17, 1999; revised August 29, 2001. This work was supported by the National Science Foundation under Grant CCR-9712379. The associate editor coordinating the review of this manuscript and approving it for publication was Prof. Uday B. Desai.

### Funding

Manuscript received June 17, 1999; revised August 29, 2001. This work was supported by the National Science Foundation under Grant CCR-9712379. The associate editor coordinating the review of this manuscript and approving it for publication was Prof. Uday B. Desai.

Funders | Funder number |
---|---|

National Science Foundation | CCR-9712379 |

## Keywords

- Approximation algorithms
- Correlations
- Digital convolutions
- Digital geometry
- Mathematical morphology