I am trying to prune a skeletonized image of numbers (0-9), which is sometimes highly branched because of irregularities in the original number thickness.
For this, I am trying to use the kernels shown in Fig. 4: http://homepages.inf.ed.ac.uk/rbf/HIPR2/thin.htm, which contain "don't care" cells.
Because I don't see how to code a "don't care" element in a kernel, I am creating other kernels to cover up all of the possibilities when taking into account the "don't care" elements. However, this greatly increases the complexity of the code, as it is computationally expensive. For example, take into account the first kernel in Fig 4:
kernel1 = [1 1 1; * 1 *; 0 0 0] -->
[1 1 1; 1 1 0; 0 0 0]
[1 1 1; 0 1 1; 0 0 0]
[1 1 1; 1 1 1; 0 0 0]
[1 1 1; 0 1 0; 0 0 0]
Where * denotes "don't care" elements. Directly coding a "don't care" element would be much less cumbersome, and it would largely decrease computation time.
Does anyone have any suggestions on how to deal with this?
Victor