Patent GB-1495088-A (GB)
Title: Boundary coding apparatus for pictures
IPC: G06K9/48
Filed: 1975-11-07
Abstract: 1495088 Data transmission; methods of coding INTERNATIONAL BUSNESS MACHINES CORP 7Nov 1975 [27 Jan 1975] 46271/75 Heading H4P An apparatus for encoding a two dimensional array of Boolean coded points representative of black/white picture elements (pels), a cluster of black pels forming a "connected object" i.e. a figure having a single outer border closing on itself but which may have inner contours formed of a cluster of white pels, e.g. holes, has a means for searching for an arbitrary element of given value within the array and tracing an unbroken path defined by adjacent elements of a single value each having adjacent element of the other value in a single direction until the first found element is again reached thus defining an outer boundary of an internal sub array of elements of the single value within an external sub array of elements of the other value, and means for generating a chain link coded representation of the traced path. Successive internal adjacent boundaries are then traced, ignoring elements used in previous traces until the bounded sub array will become disjunct, if such elements were ignored, until either a single element remains or an internal boundary of opposite kind is found. In the arrangement described a rectilinear drawing is raster scanned until the first black pel is detected whereupon the co-ordinates of this pel are recorded. The scanning configuration is then changed to that of a "border follower" which encircles the object in a clockwise direction each black pel being recorded as a series of discrete differential azimuths in chain link coded form which continues until the object is encircled. Successive inner contour layers of one pel thickness are similarly coded until a white inner boundary, i.e. a hole, is encountered which is also traced one contour layer at a time in manner similar to the black pels. There may be another black object within the hole and the process is continued until the original object is reduced to a single point. In the apparatus described only rectilinear X, Y moves are permitted and to avoid border crossing an image boundary it is necessary to constrain a cursor following an outline so as not to cross it by masking neighbouring pels which are on the other side of the boundary. Clusters of eight black pels are perceived as "objects", an object being characterized as a single outer contour closing upon itself while "holes" are considered as four connected white pels none of which coincide with the border, both objects and holes being surrounded by "edges" which are pairs of four adjacent elements of opposite brightness. The encoded data comprises the X, Y location of the starting point and a sequence of discrete moves from each boundary point to the next, the encoding being terminated when the initial point is again reached. If an isolated point of opposite type is encountered this is designated by a special code. The process is then continued for the next internal adjacent contour. Occasionally during the shrinking contour process a white pel may be detected which may be a hole or on the other hand could be a thin part of that particular contour. In order to test for this possibility a "test for hole operation" is employed which involves following the possible hole by moving from one "four connected white border pel" to the next until the follower returns to where it started. These moves are weighted to ascertain whether they involve a left or right turn which are assigned positive/negative weightings respectively hence permits a determination as to whether a hole exists at this point. If a hole has been detected the boundary is chain link coded and similarly for successively adjacent contours but if in the hole a black object is encountered a "test for object" procedure is enabled; this is similar to the "test for hole" except that the test for object operates as an eight connected black border. After the original object has been codified to zero the next object is searched for starting from the point where the original first black pel was found. The decoding procedure follows a pattern approximately opposite to that of coding i.e. coded data is received and image points are blackened along contours specified by chain link data by boundary decoding, border following, hole testing &c. utilizing the same functional patterns i.e. boundaries, objects &c. In decoding, only the boundary of a hole is defined and inside the boundary is filled automatically. Apparatus is described in the Specification for performing the various functions involved.