# Optimal hypercube algorithms for labeled images

- 659 Downloads

## Abstract

Optimal hypercube algorithms are given for determining properties of labeled figures in a digitized black/white image stored one pixel per processor on a fine-grained hypercube. A *figure* (i.e., connected component) is a maximally connected set of black pixels in an image. The figures of an image are said to be *labeled* if every black pixel in the image has a label, with two black pixels having the same label if and only if they are in the same figure. We show that for input consisting of a labeled digitized image, a systematic use of divide-and-conquer into subimages of *n*^{ c } pixels, coupled with global operations such as parallel prefix and semigroup reduction over figures, can be used to rapidly determine many properties of the figures. Using this approach, we show that in Θ(log *n*) worst-case time the extreme points, area, perimeter, centroid, diameter, width and smallest enclosing rectangle of every figure can be determined. These times are optimal, and are superior to the best previously published times of Θ(log^{2}*n*).

## Index Terms

Parallel algorithms hypercube computer convexity area perimeter diameter smallest enclosing rectangle image analysis divide-and-conquer## Preview

Unable to display preview. Download preview PDF.

## References

- [ACGOY]A. Aggarwal, B. Chazelle, L. Guibas, C. O'Dunlaing, and C. Yap, “Parallel computational geometry”,
*Algorithmica*3 (1988), pp. 293–327.CrossRefGoogle Scholar - [AtGo]M.J. Atallah and M.T. Goodrich, “Efficient parallel solutions to some geometric problems”,
*J. Parallel and Distrib. Comput.*3 (1986), pp. 492–507.CrossRefGoogle Scholar - [Bat]K.E. Batcher, “Sorting networks and their applications”,
*Proc. AFIPS Spring Joint Comput. Conf.*32 (1968), pp. 307–314.Google Scholar - [Ble]G. Blelloch, “Scans as primitive parallel operations”
*Proc. 1987 Int'l. Conf. Parallel Proc.*, pp. 355–362.Google Scholar - [BoHo]A. Borodin and J.E. Hopcroft, “Routing, merging and sorting on parallel models of computation”,
*J. Comp. and Sys. Sci.*30 (1985), pp. 130–145.Google Scholar - [CySa]R. Cypher and J.L.C. Sanz, “Data reduction and fast routing: a strategy for efficient algorithms for message-passing parallel computers”,
*Algorithmica*, to appear.Google Scholar - [CSS87a]R. Cypher, J.L.C. Sanz, and L. Snyder, “Hypercube and shuffle-exchange algorithms for image component labeling”,
*Proc. Comp. Arch. Pat. Anal. and Mach. Intel. '87*, pp. 5–10.Google Scholar - [CSS87b]R. Cypher, J.L.C. Sanz, and L. Snyder, “EREW PRAM and Mesh Connected computer algorithms for image component labeling”,
*IEEE Trans. Pat. Anal. and Machine Intel.*, 11 (1989), pp. 258–262.Google Scholar - [FrSh]H. Freeman and R. Shapira, “Determining the minimal-area encasing rectangle for an arbitrary closed curve”,
*Comm. ACM*18 (1975), pp. 409–413.Google Scholar - [KaJa]A.E. Kayaalp and R. Jain, “Parallel implementation of an algorithm for three-dimensional reconstruction of integrated circuit pattern topography using the scanning electron microscope stereo technique on the NCUBE”,
*Hypercube Multiprocessors 1987*, pp. 438–444.Google Scholar - [KRS]C.P. Kruskal, L. Rudolf, and M. Snir, The power of parallel prefix,
*Proc. 1985 Intl. Conf. Parallel Proc.*, pp. 180–185.Google Scholar - [LAN]W. Lim, A. Agrawal, and L. Nekludova, “A fast parallel algorithm for labeling connected components in image arrays”, Tech. report NA86-2, Thinking Machines Corp., 1986.Google Scholar
- [MiSt87]R. Miller and Q.F. Stout, “Some graph and image processing algorithms for the hypercube”,
*Hypercube Multiprocessors 1987*, pp. 418–425.Google Scholar - [MiSt88]R. Miller and Q.F. Stout, “Efficient parallel convex hull algorithms”,
*IEEE Trans. Computers*37 (1988), pp. 1605–1618.Google Scholar - [MiSt89]R. Miller and Q.F. Stout,
*Parallel Algorithms for Regular Architectures*, The MIT Press, 1989.Google Scholar - [MuAb]T.N. Mudge and T.S. Abdel-Rahman, “Vision algorithms for hypercube machines”,
*J. Parallel and Distrib. Comp.*4 (1987), pp. 79–94.Google Scholar - [NaSa]D. Nassimi and S. Sahni, “Parallel permutations and sorting algorithms and a new generalized connection network”,
*J. ACM*29 (1982), pp. 642–667.CrossRefGoogle Scholar - [PrSh]F.P. Preparata, and M.I. Shamos,
*Computational Geometry*, Springer-Verlag, 1985.Google Scholar - [RaSa]S. Ranka and S. Sahni, “Image template matching on SIMD hypercube multicomputers”,
*Proc. 1988 Intl. Conf. Parallel Proc.*, pp. 84–91.Google Scholar - [RND]E.M. Reingold, J. Nievergelt, and N. Deo,
*Combinatorial Algorithms*, Prentice Hall, New York, 1977.Google Scholar - [ShVi]Y. Shiloach and U. Vishkin, “An
*O*(log*n*) parallel connectivity algorithm”,*J. Algorithms*3 (1982), pp. 57–67.CrossRefGoogle Scholar - [Sto]Q.F. Stout, “Hypercubes and pyramids”,
*Pyramidal Systems for Computer Vision*, V.Cantoni and S. Levialdi, eds., Springer-Verlag, 1986, pp. 75–89.Google Scholar - [Val75]L.G. Valiant, “Parallelism in comparison problems”,
*SIAM J. Comput.*4 (1975), pp. 151–162.Google Scholar - [Val82]L.G. Valiant, “A scheme for fast parallel communication”,
*SIAM J. Comput.*11 (1982), pp. 350–361.Google Scholar - [VoKl]K. Voss and R. Klette, “On the maximum number of edges of convex digital polygons included into a square”, Friedrich-Schiller-Universitat Jena, Forschungsergegnisse, no. N/82/6.Google Scholar