Image Processing: Frequency Domain Techniques
Image Processing: Frequency Domain Techniques
Note : Any query related to course then first connect with overall course
1
coordinator.
Module 3 Content
1.2 Low pass filter, High pass filter, Butterworth and Gaussian filters.
3. Text Recognition.
2
Image Enhancement in the Frequency Domain
1. Frequency domain Fundamentals.
6. Homomorphic Filtering.
1. Fourier transform is a global transform. Every pixel in the spatial domain contributes to every point in the frequency
domain.
2. Convolution in the time domain equivalent to the multiplication in the frequency domain. It directly reduces the
computational complexity. 3
Frequency Domain Fundamentals: Fourier series
1. Fourier Series: Any periodic function can be
expressed as a sum of sines and/or cosines of
different frequencies, each multiplied by a
different co-efficient.
Where –
A function f(t) of a continuous variable, t that
is periodic with period T.
It’s a Fourier transform pair which indicate forward and Inverse Fourier transform is possible. .
7
Frequency Domain Fundamentals: Sampling theorem, Nyquist
rate
Sampling Theorem: A continuous bandlimited signal can be
Example -
recovered completely from the set of its samples if the samples
are acquired at a rate exceeding at least twice the highest m(t) = sin2Πt + sin3Πt + sin4Πt
frequency content of the function.
Fs > 2fm (Oversampled) W = 2Π
Where,
Fs = sampling frequency
fm = highest frequency component present in the signal
Oversampling
Fs > 2fm (Oversampled)
Where,
Fs = sampling frequency, fm = highest
frequency component present in the signal9
Frequency Domain Fundamentals: Aliaising
What happened if during sampling of continuous function, someone Solution
is not following the sampling theorem ? Anti Aliasing :
Answer: Aliasing or false identity Aliasing can be reduced by smoothening (Low
Pass filter) input function to attenuate the higher
Aliasing: It’s a phenomena where different signals are indistinguishable
frequencies.
from one another after sampling.
This process has to be done before the function
Fs < 2fm (Under sampling or aliasing effect)
is sampled because aliasing is an sampling issue
that cannot be “undone after the fact” using
computational techniques.
10
Two different function but their digitization is same.
Interpretation image in the Frequency Domain: Fourier Transform
Fourier Transform: It's an image enhancement tool, which is used to decompose an image into its sine and cosine compone
Low frequencies : It represent smooth transition in the image.
High frequencies : It capture the rapid changes in the image. Like edges and texture.
High Frequency
component
Keep only low frequency components: image is blurred Keep only high frequency components
11
Frequency Domain Filters
Frequency Domain
Filters
Band Pass
Ideal LPF Ideal HPF Filtering
12
Frequency Domain Filters: Ideal Low Pass Filter
(ILPF)
A 2D filter which passes all the frequencies within a circle of radius from the origin and cut off or attenuate all the
frequencies which are outside to this circle.
13
Frequency Domain Filters: Ideal Low Pass Filter
(ILPF)
Cut off Frequency
(a) Ideal LPF Transfer function Plot (b) Function displayed as an image (c) Radial Cross
Section
14
Test Pattern image Circle with radi 10,30,60,160,460
Frequency Domain Filters: Ideal Low Pass Filter
(ILPF) a b c
a – Original Image
b – ILPF with cut off Frequency set at
radii value - 10
c – ILPF with cut off Frequency set at
radii value - 30
d – ILPF with cut off Frequency set at
radii value - 60
e – ILPF with cut off Frequency set at
radii value - 160
f – ILPF with cut off Frequency set at
radii value - 460
d e f
15
Frequency Domain Filters: Gaussian Low Pass Filter
(GLPF)
It is specified by the transfer function H(u,v)
(a) Gaussian LPF Transfer function Plot (b) Function displayed as an image (c) Radial Cross Section with various value of D0
16
Frequency Domain Filters: Gaussian Low Pass Filter
(GLPF) a b c
a – Original Image
b – GLPF with cut off Frequency set at
radii value - 10
c – GLPF with cut off Frequency set at
radii value - 30
d – GLPF with cut off Frequency set at
radii value - 60
e – GLPF with cut off Frequency set at
radii value - 160
f – GLPF with cut off Frequency set at
radii value - 460
d e f
17
Frequency Domain Filters: Butterworth Low Pass Filter
(BLPF)
It is specified by the transfer function H(u,v)
(a) Gaussian LPF Transfer function Plot (b) Function displayed as an image (c) Radial Cross Section with orders 1 to 4.
18
Frequency Domain Filters: Butterworth Low Pass Filter
(BLPF) a b c
a – Original Image
b – BLPF with cut off Frequency set at
radii value - 10
c – BLPF with cut off Frequency set at
radii value - 30
d – BLPF with cut off Frequency set at
radii value - 60
e – BLPF with cut off Frequency set at
radii value - 160
f – BLPF with cut off Frequency set at
radii value - 460
d e f
19
Comparative Analysis Between ILPF, GLBF and BLPF
Image Sharpening can be achieved in the frequency domain by passing the high frequency components (i.e
Edges or other sharp transitions) and attenuate the low frequency components.
Where
n = order
21
Frequency Domain Filters: Image Sharpening using High
PF
Transfer Function (a) HPF Transfer function Plot (b) Function displayed as an image (c) Radial Cross Section
22
Frequency Domain Filters: Image Sharpening using High
PF a b c
Filtered with (a) IHPF, (b) GHPF, (c) BHPF with D0 =60
Filtered with (d) IHPF, (e) GHPF, (f) BHPF with D0 =160
d e f
23
Frequency Domain Filters: Homomorphic Filtering
Objective –
Overall objective is to separate illumination and reflectance components to manipulate them independently.
It used to correct uneven illumination and simultaneously enhance the contrast of the image.
Illumination and reflectance model –
An image is modeled as illumination function and reflectance function at every point.
For an images,
illumination is the primary contributor to the dynamic range of an image and it varies slowly. (related to low frequencies)
Reflectance component refers to the details of object edges and it varies rapidly. (related to the high frequencies)
Homomorphic filtering: The idea is to separate these two components and apply separate transfer function on these
two components to get more control over it.
But Fourier transform can not define for the product of two functions, it means we can not apply it.
Solution is : Apply logarithmic function that will separate the multiplicative term into additive. 24
Frequency Domain Filters: Homomorphic Filtering.
Flow diagram of homomorphic
filtering
Note: Convolution in the spatial domain is equivalent to the multiplication in the frequency
domain. 25
Frequency Domain Filters: Homomorphic Filtering
Radial Cross Section of a homographic filter
transfer function
Here
consider Gamma(L) <1:
it attenuate the contribution made by
low frequencies (illumination)
and Gamma(H) =>1: Original Image Image Enhanced using homomorphic filtering
it amplify the contribution made by
high frequencies. (reflectance.)
The net results is simultaneously dynamic range compression
Note: D(u,v) is the distance from the center. and contrast enhancement. 26
Frequency Domain Filters: Working Examples
1-D Discrete Fourier Transform (DFT) and Inverse Discrete Fourier Transform (IDFT)
DFT
IDFT
27
1-D DFT and Inverse DFT working
example
DFT
IDFT
28
1-D DFT and Inverse DFT working
example
29
Frequency domain filtering : Flow Chart
3 4 5
Filter Function
Fourier Transform Inverse Fourier Transform
H(u,v)
F(u,v)
F(x,y) G(x,y)
Input Image Enhanced Image
1 7
30
Frequency Domain Filters: Working Examples
Question
Input Image
Step 1: Multiply the input image by (-1)^x+y to shift the Centre from (0,0) to
(2,2).
31
Frequency Domain Filters: Working Examples
(-1)^0,0 = 1, (-1)^0,1 = -1 (-1)^0,2 = 1 (-1)^0,3 = -1
0,0 0,1 0,2 0,3
(-1)^1,0 = -1, (-1)^1,1 = 1 (-1)^1,2 = -1 (-1)^1,3 = 1
1,0 1,1 1,2 1,3
2,0 2,1 2,2 2,3 (-1)^2,0 = 1, (-1)^2,1 = -1 (-1)^2,2 = 1 (-1)^2,3 = -1
3,0 3,1 3,2 3,3
(-1)^3,0 = -1, (-1)^3,1 = 1 (-1)^3,2 = -1 (-1)^3,3 = 1
1 0 1 0 1 -1 1 -1 1 0 1 0
1 0 1 0 -1 1 -1 1 -1 0 -1 0
1 0 1 0 X 1 -1 1 -1 = 1 0 1 0
1 0 1 0 -1 1 -1 1 -1 0 -1 0
0 0 0 0
0 0 0 0
F(U,V) DFT =
16 0 16 0
0 0 0 0
1 1 1 1
H(u,v) = 1 1 1 1 Note: IHPF – Any value greater than 0.5 will be 1
else is 0.
D0 = 0.5 1 1 0 1
1 1 1 1 34
Frequency Domain Filters: Working Examples
Step 3,4: G(u,v) = F(u,v) x H(u,v)
0 0 0 0 1 1 1 1 0 0 0 0
0 0 0 0 1 1 1 1 0 0 0 0
X =
16 0 16 0 1 1 0 1 16 0 0 0
0 0 0 0 1 1 1 1 0 0 0 0
35
Frequency Domain Filters: Working Examples
Step 5: Compute the IDFT of the image.
1 1 1 1 0 0 0 0 1 1 1 1
1 j -1 -j 0 0 0 0 1 j -1 -j
X X =
1 -1 1 -1 16 0 0 0 1 -1 1 -1
1 -j -1 j 0 0 0 0 1 -j -1 j
16 16 16 16 1 1 1 1
-16 -16 -16 -16 = -1 -1 -1 -1
1/16 16 16 16 16 1 1 1 1
-16 -16 -16 -16 -1 -1 -1 -1
(-1)^(x+y)
1 1 1 1 1 -1 1 -1
-1 -1 -1 -1 -1 1 -1 1
X
1 1 1 1 1 -1 1 -1
-1 -1 -1 -1 -1 1 -1 1 =
1 -1 1 -1
1 -1 1 -1
Final Output =
1 -1 1 -1
1 -1 1 -1
Convolution Multiplication
38
Difference between spatial domain and frequency domain.
Feature Spatial Domain Enhancement Frequency Domain Enhancement
Fast for small kernels, slow for large Slower due to transforms for small
Computational Speed
kernels kernels, faster for large kernels
Frequency domain: The process requires two computationally intensive steps: a forward Fourier transform and
an inverse Fourier transform. 39
CSET344
Image and Video Processing
27th Oct. to 31st Oct. 2025
(Module 3 )
Note : Any query related to course then first connect with overall course
40
coordinator.
Image Compression
2. Lossless Compression.
4. Huffman Coding.
5. Lossy Compression.
6. Discrete Cosine Transform, Quantizer and Zigzag coding and DCT application.
41
Image Compression : Motivation
Lossy Compression – In this type of compression, after performing the inverse transformation we cant get exactly
the same image or data as the older one. (Loss of information). Overall the quality of the image get significantly
reduced.
Compression Ratio:
b
Redundancy
44
Image Compression Models: Compression and Decompression flow diagram
Image
For videos –
Where the discrete
parameter t specify
the time.
Overall Objective – Input image is fed to the encoder which creates a compressed representation of it. Now
this compressed data is fed to the decoder which reconstruct the original data or image.
45
Image Compression Fundamentals
Encoding or Compression
Process
46
Image Compression Fundamentals
Decoding or Decompression
Process
It contains mainly two components - First component is symbol decoder and second component is an inverse
mapper. These two components perform exactly inverse operation that is performed by encoder.
47
Image Compression Fundamentals
Calculate different
parameters
Average Length of the Total bits to be Entrop How much space saved
code transmitted y
49
Lossless Compression: Huffman Coding working
example
Problem Statement –
1. Consider an image of size 10 by 10 (5 bit image). Consider some symbols with different
frequencies.
a2 = 40 , a6 = 30 , a1 = 10 , a4 = 10 , a3 = 6 , a5 = 4 (Probability – a2 40/100, a6 30/100, a1 =
10/100…..etc)
Source Reduction
Symbol Probability 1 2 3 4
a5 0.04
50
Lossless Compression: Huffman Coding working
example
Source Reduction
Symbol Probability 1 2 3 4
a5 0.04 01011
51
Lossless Compression: Huffman Coding working
example
0.4 is represented by 1 bit
Parameter Calculation
Average Length of the L = 0.4x1 + 0.3 x 2 + 0.1 x 4 + 0.1 x 4 + 0.06 x 5 + 0.04 x 5 = 2.3 bits/symbol
code
52
Run Length Encoding
Run Length Encoding :
Repeating intensities along the row and columns often be compressed by representing runs of identical intensities
where each run length pairs specify the start of the new intensity and number of consecutive pixels that have that
intensity.
Example
111110000000011111111100111111000001111111 Total Bits in the original
11 sequence = 42
(0,2times) (0,5times)
(1,5times)
(1,6times) (1,9times)
(0,8times)
(1,9times)
53
Run Length Encoding
Binary Representation Binary Representation
8 4 2 1
(1,5times) 10101
(0,8times) 01000
(1,9times) 11001
(0,2times) 00010
(1,6times) 10110
(0,5times) 00101
(1,9times) 11001
10101 01000 11001 00010 10110 00101 Total Bits - 35
11001
Total Bit reduced = Total number of bits in the original sequence - total number of bits in the compressed sequence = 42 -35
54
Image Compression Fundamentals
Apply Run Length Encoding to below example Binary Representation
0000000011111111 8 4 2 1
011
55
Image Compression Fundamentals
Apply Run Length Encoding to below example Binary Representation
0000000011111111 8 4 2 1
Total bits = 16
(0,8times)
(1,8times) 01000 11000 = Total bits = 10
Total compression = Original Representation - Compressed representation = 16-10 = 6
011
00001 10010 = Total bits = 10
Total compression = Original Representation - Compressed representation = 3-10 = -7
56
Lossy Compression: Discrete Cosine Transform:
DCT
Lossy Compression – In this type of compression, after performing the inverse transformation we cant get exactly
the same image as the older one (i.e. Loss of information). Overall the quality of the image get significantly reduced.
3. In DCT, most of the significant information or signal (image) energy, is concentrated in the few number of
coefficients (near to the origin) and rest other frequency having very small information which can be stored by using
less number of bits.
4. DCT coefficient are real valued while DFT coefficients are complex, therefore, hardware implementation of DCT
is easier than DFT.
57
Lossy Compression: DCT : Flow Chart
4
3
5
Each block is
DCT is applied on each
compressed through Inverse Discrete cosine
block from left to right top
quantization followed Transform
to bottom.
by coding)
Post-Processing
2 6
Image is broken
into 8 x 8 blocks
of window.
Decompressed
7 Image
Input Image 1
58
Lossy Compression: Discrete Cosine Transform:
DCT
DCT Equation
Equation (1)
59
Lossy Compression: Discrete Cosine Transform:
DCT
DCT Matrix
Here T (i,j) is the Transformation matrix which used to convert the DCT equation (1) into matrix form.
(i,j) are the pixel location.
Transformation matrix (T) for N =8 i.e for 8 x 8 block. 1/sqrt(8) = 0.3536 when i = 0
60
Lossy Compression: Discrete Cosine Transform:
DCT
Working example, Consider a 8 by 8
block of the original image. A particular
block is chosen from the very upper left- DCT is designed to work on pixel values ranging from -128 to 127,
hand corner of an image. The original image is level off by subtracting 128 from each entry.
For example 154-128 = 26, 123-128 = -5 and so on.
Discrete cosine transform (DCT) can be accomplished by matrix multiplication. DCT matrix (D) can be generated by
Matrix Multiplication between M and Transformation matrix (T). 61
Lossy Compression: Discrete Cosine Transform:
DCT
Where Q1 means, quantization matrix has poorest image quality and highest compression.
Q100 means, quantization matrix has Best image quality and lowest compression.
62
Lossy Compression: Discrete Cosine Transform:
DCT
Quantization Matrix with different quality levels. These matrix are standard matrix with different quality levels.
Observations
Quantization is achieved by dividing each
element in the transformed image matrix • Coefficient situated near to
D by the corresponding element in the upper left corner corresponds
quantization matrix and then rounding off to lower
to nearest integer value. frequencies to which human
eye
Consider here Q50. is more sensitive.
first element: 162.3/16 approx. 10
Here, 162.3 is the first element of matrix • Here 0 means, high frequencies
D and 16 is the first element of Q50 that has been discarded, giving
matrix. rise to the Lossy 63 part of
Lossy Compression: Discrete Cosine Transform:
DCT
Zig Zag Coding: final step of compression is coding, where all the coefficient of C are converted by an encoder to a
stream of binary data.
[10 4 3 -7 9 2 5 1 -5 -3 -2 -5 1 2 1 0 1 -2 0 1 0 00 -1 -1 0 0 EOC]
Convert to
64
binary
Lossy Compression: Discrete Cosine Transform:
DCT
Decompression
Reconstruction of output image begins by decoding the bit stream representing the quantization matrix (C). Each
element of C
Is then multiplied by the corresponding element of the quantization matrix that was originally used. (in the quantization
process) Once (R) is generated then IDCT applied on the
matrix R, which is rounded off to the nearest integer.
Finally, 128 added to each elements of that results
to recenter it.
Observation:
65
Lossy Compression: Discrete Cosine Transform:
DCT
Observation:
Quantization matrix 50
is far better as compared
to 20 and 10.
66
DCT _Q50 image DCT _Q20 image DCT _Q10 image
Lossy Compression : DCT
(b) watermark.
Compression: It is used to reduce the amount data used to represent the image.
Visible Invisible
Why
watermarkin
g required ?
Fragile Robust
Authenticity Automated
determination monitoring
It is destroyed by It is designed to survive
Presence of watermarked Watermarked can be monitored performing any of the any kind of image
guarantee that an image by the systems that track when and modification in the modifications-
has not been altered. Where images are used or re-used. images - Like –
Like image Linear filtering.
Monitoring is useful for royalty collection compression and Non linear filtering.
And/or the location of illegal users. decompression. Cropping.
Rotation.
Resampling &69etc.
Application of DCT: Digital Image Watermarking: Embedding
workflow
How to add watermark
Prepare a watermark In these mid frequency
component, add watermark.
Suppose the DCT coefficient is 17.4:
It may be anything, let's •To embedd bit 0: make it even
say, someone wants to ([Link] 1 ) → 16.
hide name of college i.e. Select one block and find mid •To embedd bit 1: make it odd → 17.
BU inside the image. frequency DCT coefficient in
it
Here, BU is the
Mid-frequency coefficients
watermark. Apply Inverse DCT to each
are less perceptible or
Divide the host or the block and reconstruct the
visible to the human visual
original image into 8 by 8 original image.
system.
blocks
Apply 2D DCT 1. Stitch all the blocks together to
These 8 by 8 image blocks build the final watermarked image.
should be non
For each block, apply the 2D 2. The embedded watermark will be
overlapping.
DCT to convert the pixel values imperceptible or invisible to the
to frequency domain human eye but can be reliably
coefficients. extracted. 70
Application of DCT: Digital Image Watermarking: Extraction
workflow
Divide the watermarked Apply 2D DCT on each Reterive watermarks
image block. bits
71
Color Image Compression : Flow Chart :
Compression
Decompressio 72
Lossy Compression: Discrete Cosine Transform:
DCT
Difference between DFT and DCT.
Nature of Output Complex values (real + imaginary parts) Usually real numbers
Basis Functions Complex exponentials (both cosines and sines) Cosine functions only
Computational Complexity Can be computed efficiently with FFT algorithms Similar complexity to FFT; specific variants exist
73
CSET344
Image and Video Processing
03rd Oct. to 07th Nov. 2025
(Module 3 )
Note : Any query related to course then first connect with overall course
74
coordinator.
Optical Character Recognition (OCR): Definition & Motivation
OCR: It converts different type of documents including scanned papers, PDfs and digital images into editable searchable
digital text.
Scanned Papers
Editable
PDFs OCR searchable digital
text.
Automated data entry: Automatically extracting the key information from structured documents like invoices,
receipts etc.
Accessibility: Converting printed text documents to digital format that can be used with text to speech software75for
Optical Character Recognition: Approaches
OCR Approaches
Traditional
AI Driven Approaches
Approaches
Template matching for character recognition. Deep learning algorithms: Continuous improvement
through training.
Pre-defined rules and patterns.
Computer vision: Advanced image understanding.
Basic image processing techniques.
Natural Language Processing: Context-aware text
Limited accuracy with complex layouts. interpretation.
76
OCR: Text Recognition : Flow Chart
Image Acquisition
Post-
Feature
Preprocessing Pattern Matching processing
extraction
Techniques Post -
Isolate the characters processing
that need to be
recognized. 77
Preprocessin
OCR: Preprocessing
•Why: Removes unnecessary color information, reduces complexity, and enhances further binarization or thresholding.
Color Image
Binarization or BW image
79
OCR: Preprocessing
2. Noise Reduction
•Goal: Uneven illumination, Remove specks, smudges, or background noise that can look like real text to an OCR engine.
•Why: Cleaner images help the OCR systems to avoid false positives and reduce errors in character recognition.
80
OCR: Preprocessing
Steps in contrast limited adaptive histogram equalization (CLAHE).
Image Tiling or The input image is divided into a grid of small, non-overlapping, and equally sized tiles.
Partitioning The contrast enhancement is performed independently for each of these tiles.
Histogram
computation and For each tile, the pixel intensity histogram is computed.
clipping or contrast Contrast Limiting: A clip limit is applied to each histogram bin. This limit, usually determined
limiting by the distribution of the histogram and a user-defined parameter, it prevents any single gray-
level bin from having too high a count.
Any pixel count in a histogram bin that exceeds the clip limit is clipped (or truncated) to that
limit.
The total number of clipped pixels (the excess) is then redistributed evenly among all the
histogram bins. This ensures that the overall brightness of the tile is maintained. This step is
what distinguishes CLAHE from standard AHE and prevents noise over-amplification.
Local histogram
equalization
Image Reconstruction via Bilinear Interpolation
A local histogram equalization has
been performed, after the histogram
81
has been clipped and redistributed.
OCR: Preprocessing
Steps in contrast limited adaptive histogram equalization (CLAHE).
82
Optical Character Recognition: Flow diagram detail
3. Skew Correction
•Goal: Detects and corrects any tilt or rotation in the scanned image.
•Why: Even slight tilts cause major recognition problems, so aligning lines horizontally is crucial for maximal accuracy.
83
OCR: Preprocessing
Skew Correction Techniques
Hough Transform: Detects lines Skew angle calculation is the process of • The image is rotated by the detected
in edge maps; dominant line estimating the rotation angle of the text angle in the opposite direction.
orientation reflects about skew. baseline in a document image that
causes the document's skew. • Interpolation methods (e.g., bilinear)
are used to prevent image artifacts.
•Goal: Focus on relevant parts of the image, removing borders, graphics, or unrelated regions.
•Why: Reduces distractions and keeps computation efficient and focused on the text content.
84
OCR: Preprocessing
[Link]
•Goal: Standardize image intensity values or scale to a uniform size and resolution.
•Why: Brings images into a consistent format, so OCR algorithms have predictable inputs.
85
OCR: Preprocessing
[Link] (Thresholding)
•Why: Strong contrast between text and background optimizes the input for most OCR algorithms, which are designed to work
on binary images.
•Goal: Convert black pixel into white and white into black. It means text and background colors are swapped.
•Techniques: Thresholding followed by inversion. Color to grey then thresholding convert it into binary then inversion.
Why: OCR engines are generally optimized to recognize text that appears as dark characters on a light background.
When the input image has light-colored text on a dark background (such as white text on a black sign), inverting the
image puts it in the preferred format (dark text on light background).
86
OCR: Preprocessing
8. Text Detection, Layout, and Segmentation
•Goal: Detect lines, words, or blocks of text and segment them from one another.
•Why: Helps the OCR system understand document structure and process multi-line/column/page layouts. This is a crucial
step in complex document processing.
87
OCR: Preprocessing
9. Thinning (Skeletonization)
•Why: Enhances the outline of handwritten or joined text, aiding recognition, especially in noisy or stylized scripts
88
OCR: Text Recognition Techniques
Text Recognition
Compares extracted Analyze geometrical
character images (with Feature features like edge and
Pattern Matching
stored templates. extraction line etc.
Note: glyph is the specific visual shape of a character within a particular font. 89
OCR: Flow diagram of Template matching
Image acquisition, Pre-processing, • Obtain scanned or captured image of the document.
Segmentation • Convert image to grayscale or binary.
• Detect the ROI.
• For each segmented character, compute similarity (e.g., correlation or distance metric) with each
Template Matching template.
• Use matching functions such as Euclidean distance, Correlation etc.
Best match • Identify template with highest similarity or least error to input segment.
selection • Assign label of the best matched template as recognized character.
90
OCR: Flow diagram of Feature extraction
Input pre processed character image
Edge detection Edges represent boundaries of characters and are extracted using operators like Sobel or Canny.
Corner and
Characteristic points like corners, junctions, and endpoints of strokes are detected here.
Junction
Detection
Contour and Shape Contours of the character are extracted to track boundaries and curves which can describe the
analysis overall geometry.
Statistical measures like zoning (dividing the character into zones and calculating pixel densities),
Statistical feature moments and projection profiles (horizontal/vertical pixel distributions) are computed. These
computation capture global and local shape properties complementing geometric features.
Transformation Transformations such as Fourier descriptors, Wavelets, or Discrete Cosine Transform (DCT) convert
Based Feature spatial pixel data into frequency or scale domains. Such features are powerful for capturing texture,
periodicity, and invariant aspects of characters.
Feature vector All extracted features are compiled into a fixed-length feature vector representing the
formation character uniquely. This vector feeds directly into classifiers (e.g., SVM, neural networks)
91
that perform the final character recognition.
OCR: Post Processing
The first step of post-processing is to identify which words are likely wrong.
•Method:
•Typically uses a dictionary lookup (spell-checking) or analyzes the confidence scores provided by the OCR engine for
each character/word.
•Words not found in the dictionary or those with low confidence are flagged as potential errors.
Second step: From the list of candidates, the best correction is chosen based on the context of the sentence or
document.
•Method: A language model or n-gram analysis is used to determine which candidate word is most probable given
the words surrounding it.
Third Step: This step applies domain-specific rules to check and correct structured information that a dictionary
can't validate.
•Method: Uses regular expressions (RegEx) or other rules to ensure data fields
like dates,
phone numbers,
currency amounts, and addresses adhere to the correct format (e.g., correcting a date "10-99-2025" to "10-09-
92
2025").