Neighborhood coding of binary images for fast contour following and general binary array processing

The problem of computing 3 × 3 neighborhood functions of binary images can be subdivided into that of accessing the eight neighbors of a pixel and assembling them into a compact 8-bit code, and then of computing the desired neighborhood function (s) by simple table-lookup on the code. When the task is looked at in this way, it is apparent that much, if not most, of the computational effort on a serial computer goes into the accessing and assembling of the neighbors of a pixel. We propose a simple hardware encoder to handle this part of the task, and thus allow for significant speedup of the overall computation. We shrew in particular how this coding and encoder can be applied to the problem of boundary contour following, and suggest other areas of application.