Page 258 -
P. 258

232   Chapter 6 ■ Thinning





                                                                     2







                                                            3
                                                  1
                                                                1
                                                          2





                                                      3




                           Figure 6.22: The force at a given pixel is the vector sum of the forces to all visible pixels.
                           Only boundary pixels exert a force, and only object pixels have the force computed.


                             The details of the growing process are relatively simple. First, a queue to
                           hold the points to be grown is defined. All the endpoints of the current stubs
                           are placed into the queue as potential starting points for the growth process.
                           Then points are removed from the queue one at a time and tested to see if
                           growth is possible; if so, it is added to the skeleton and the new skeletal point
                           is added to the queue if it, too, is a potential starting point.
                             To grow from a point P,the pointmustsatisfy twoconditions. P must have
                           exactly one or two 8-connected neighbors that are skeletal pixels, and if it has
                           two such neighbors, then these must be adjacent to each other. The preferred
                           direction of growth is through these neighbors towards P and beyond to the
                           next pixel. There will be three candidate pixels, and the one of these having the
                           smallest force magnitude is grown into: It is added to the skeleton and placed
                           on the queue for further growth steps. The growing process will stop when
                           the growth front hits an edge or other part of the skeleton.
                             At a subpixel level, the growth process first attempts to find new skeletal
                           pixels at double the previous resolution. Using the stub endpoints the regions
                           to be refined are identified, and forces are computed for each pixel at the
                           new resolution; the resolution doubles each time. Then the dot products are
                           computed as before, looking for zero crossings. When located, a zero crossing
                           becomes a skeletal pixel at the current resolution and also marks all containing
                           pixels at lower resolutions as skeletal. The refinement can be continued at
   253   254   255   256   257   258   259   260   261   262   263