3. g
(b)
01 Objectives
• Recognition digit for given image using template matching .
Figure for Processing Example : (a) Template & candidate image (b)
Template matching algoithm (c) Recognize digit image
Matching similarity by NCC
(a)
(c)
4. 02 Motivation
Traditional methods often struggle to handle various fonts, styles, and
handwriting.
01
02
03 Ensuring accurate digit extraction and interpretation,
To minimize human error, inefficiencies and inaccuracies.
6. Methodology
04
Input image normalize by size
Convert images to grayscale.
Convert to binary using Otsu's thresholds
Complement Binary Images
Calculate Candidate Mean
NCC Loop
Find Best Match
Visualize result by rectangle box
Template
Candidate(digit)
7. Process Example - 1
05
Fig 1: Read RGB image and convert
to grayscale image
Fig 2: Convert gray to binary and
take the complement of binary
image
Fig 3: Display the current template,
candidate and best match
8. Process Example -2
06
Fig 1: Read RGB image and convert
to grayscale image
Fig 2: Convert gray to binary and
take the complement of binary
image
Fig 3: Display the current template,
candidate and best match
9. Conclusion
07
In conclusion, the code demonstrates a basic implementation of digit recognition using the NCC
technique.
Merits of NCC:
• Easy to understand and implement.
• Effective for finding patterns.
• Clear interpretation of results.
• Doesn't need extensive training.
Demerits of NCC:
• Can be slow for large images.
• Only good for exact or near-exact matches.
• Affected by similar patterns in the background.
• Challenging to set accurate thresholds.
• Struggles with noise, and variations.