Pruning (morphology)
The pruning algorithm is a technique used in digital image processing based on mathematical morphology.[src] It is used as a complement to the skeleton and thinning algorithms to remove unwanted parasitic components (spurs).[src] In this case 'parasitic' components refer to branches of a line which are not key to the overall shape of the line and should be removed.[src] These components can often be created by edge detection algorithms or digitization.[src] Common uses for pruning include automatic recognition of hand-printed characters.[src] Often inconsistency in letter writing creates unwanted spurs that need to be eliminated for better characterization.[src]
The pruning algorithm is a technique used in digital image processing based on mathematical morphology.[src] It is used as a complement to the skeleton and thinning algorithms to remove unwanted parasitic components (spurs).[src] In this case 'parasitic' components refer to branches of a line which are not key to the overall shape of the line and should be removed.[src] These components can often be created by edge detection algorithms or digitization.[src] Common uses for pruning include automatic recognition of hand-printed characters.[src] Often inconsistency in letter writing creates unwanted spurs that need to be eliminated for better characterization.[src] The standard pruning algorithm will remove all branches shorter than a given number of points.[src] If a parasitic branch is shorter than four points and we run the algorithm with n = 4 the branch will be removed.[src] The second step ensures that the main trunks of each line are not shortened by the procedure.[src] B_1 = \begin{bmatrix} x & 0 & 0 \\ 1 & 1 & 0 \\ x & 0 & 0 \end{bmatrix} B_2 = \begin{bmatrix} x & 1 & x \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix} B_3 = \begin{bmatrix} 0 & 0 & x \\ 0 & 1 & 1 \\ 0 & 0 & x \end{bmatrix} B_4 = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 1 & 0 \\ x & 1 & x \end{bmatrix} B_5 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix} B_6 = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix} B_7 = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} B_8 = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{bmatrix} The x in the arrays indicates a “don’t care” condition i.e.[src] the image could have either a 1 or a 0 in the spot.[src] X_1 = A \otimes \{B\} X_2 = \bigcup_{k=1}^8 (X_1\circledast B^k) X_3 = (X_2 \oplus H) \cap A X_4 = X_1 \cup X_3 %% --------------- % Pruning % --------------- clear; clc; % Image read in img = imread('Pruning.tif'); b_img_skel = bwmorph (img, 'skel', 40); b_img_spur = bwmorph(b_img_skel, 'spur', Inf); figure('Name', 'Pruning'); subplot(1,2,1); imshow(b_img_skel); title(sprintf('Image Skeleton')); subplot(1,2,2); imshow(b_img_spur); title(sprintf('Skeleton Image Pruned')); ==See also== Morphological image processing ==External links== Morphological Pruning function in Mathematica Morphological Operations in MATLAB[src]
18 sentences · 18 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Pruning (morphology)." encyclopegia.org, 2025, https://encyclopegia.org/wiki/pruning-morphology. Accessed 25 November 2026.
Chicago
"Pruning (morphology)." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/pruning-morphology.
APA
encyclopegia.org. (2025). Pruning (morphology). Retrieved November 25, 2026, from https://encyclopegia.org/wiki/pruning-morphology
Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON