  Structural pattern recognition describes and classifies data based on the
relationships of features and parts. Topological invariants, like the Euler
number, characterize the structure of objects of any dimension. Cohomology can
provide more refined algebraic invariants to a topological space than does
homology. It assigns `quantities' to the chains used in homology to
characterize holes of any dimension. Graph pyramids can be used to describe
subdivisions of the same object at multiple levels of detail. This paper
presents cohomology in the context of structural pattern recognition and
introduces an algorithm to efficiently compute representative cocycles (the
basic elements of cohomology) in 2D using a graph pyramid. An extension to
obtain scanning and rotation invariant cocycles is given.
