Two-Stage Punch-Code Recognition Using a CNN and the Hough Transform

Jaco Fourie, Kapila Pahalawatta · 2024

Several technologies are available for marking logs. One of the oldest wood tracking information systems still in use today is log punching. This is primarily required by log companies to trace log information such as ownership and usability. Automating the identification and decoding of such punch codes, using image processing and morphological tools, presents itself as a challenging problem. Typically these challenging conditions are caused by poor image quality, varying light conditions, and the similarity between the punch code symbols and the wood grain patterns. We aim to build a two-stage system with a Mask R-CNN-based code detector and Hough transform-based decoder to recognise and decode individual instances of punch codes. Each punch code on a log consists of two parts: several arrow symbols in different orientations and a reference bar symbol. Our detection model correctly segmented and identified all arrows in all the 76 images in our test set. However, it failed to find the reference bar in some images due to poor punching or ambiguity between the background wood grain patterns and the symbols, a critical feature in being able to decode the symbols. In stage 2, we used an approach based on the Hough transform line detection method to recognise the orientation of the arrows with respect to the reference bar. Our system correctly recognised the arrow direction with 87% accuracy in the segmented images.

Read the paper · More papers on PaperTik