To automatically register foreground target in cluttered images, we present a novel hierarchical graph representation and a stochastic computing strategy in Bayesian framework. The graph representation, which contains point-(image primitives), seedgraph-, and subgraph- three levels, are built up following the primal sketch theory to capture geometric, topological, and spatial information both in local and global scale. We use two types of bottom-up algorithms for searching matching candidates to generate the pointlevel and seedgraph-level representations respectively. Then, the Swendsen-Wang Cuts and Gibbs sampling methods are performed for global optimal solution to generate the final subgraph-level representation, where a mixture bending function and a set of topological operators are defined for matching measurement. Experiments with comparison are demonstrated on standard dataset with outperforming results. Results show that our method can work well even with clutter noise and c...