TELK
OMNIKA
T
elecommunication,
Computing,
Electr
onics
and
Contr
ol
V
ol.
24,
No.
3,
June
2026,
pp.
945
∼
956
ISSN:
1693-6930,
DOI:
10.12928/TELK
OMNIKA.v24i3.26961
❒
945
A
segmentation
based
optical
character
r
ecognition
system
f
or
Bangla
printed
text
Mahir
Mahb
ub
1,2
,
Ahmedul
Kabir
2
1
Department
of
IoT
and
Robotics
Engineering,
Bang
abandhu
Sheikh
Mujib
ur
Rahman
Digital
Uni
v
ersity
,
Gazipur
,
Bangladesh
2
Institute
of
Information
T
echnology
,
Uni
v
ersity
of
Dhaka,
Dhaka,
Bangladesh
Article
Inf
o
Article
history:
Recei
v
ed
Feb
5,
2025
Re
vised
Dec
8,
2025
Accepted
Mar
29,
2026
K
eyw
ords:
Mask
ed
w
ord
prediction
Optical
character
recognition
P
attern
recognition
Spell
check
er
T
e
xtual
image
se
gmentation
ABSTRA
CT
Bangla
ranks
as
the
fth
most
spok
en
language
globally
,
catalyzing
signicant
interest
in
the
de
v
elopment
of
B
angla
optical
character
recognition
(OCR)
sys-
tems.
The
intricate
structure
of
the
Bangla
script,
including
compound
char
-
acters,
modiers,
and
headlines,
complicates
the
formation
of
w
ords.
This
research
introduces
a
complete
OCR
system
pipeline
for
printed
Bangla
te
xt.
It
emplo
ys
a
thinning-based
se
gmentation
approach
combined
with
a
con
v
olu-
tional
neural
netw
ork
(CNN)
to
recognize
Bangla
fonts.
Additionally
,
a
part
of
speech
(POS)-a
w
are
spell
check
er
is
proposed
that
automatically
corrects
mis-
spelled
w
ords
while
considering
their
conte
xt
within
the
sentence.
W
e
intro-
duce
semi-generalized
lters
that
a
dapt
to
ne
w
fonts,
addressing
conjunct
for
-
mation
challenges
in
Bangla
OCR.
This
e
xible
design
allo
ws
for
ada
ptation
to
ne
w
fonts.
The
ResNet50
model
is
utilized
to
accurately
recognize
se
gmented
characters
and
modiers.
W
e
achie
v
e
a
character
se
gmentation
error
of
3.354%
and
an
o
v
erall
se
gmentation
error
of
2.332%.
The
ResNet50
recognition
model
achie
v
es
an
accurac
y
of
98.345%.
This
is
an
open
access
article
under
the
CC
BY
-SA
license
.
Corresponding
A
uthor:
Ahmedul
Kabir
Institute
of
Information
T
echnology
,
Uni
v
ersity
of
Dhaka
Suhra
w
ardi
Udyan
Rd,
Dhaka
1200,
Bangladesh
Email:
kabir@iit.du.ac.bd
1.
INTR
ODUCTION
Optical
character
recognition
(OCR)
con
v
erts
te
xt
images
into
machine-readable
form
and
is
no
w
a
core
component
in
digitizing
books,
archi
v
es,
administrati
v
e
records,
and
e
v
eryday
documents.
Rob
ust
OCR
systems
enable
information
retrie
v
al
and
natural
language
processing
and
are
crucial
to
preserving
linguistic
heritage
and
supporting
digital
inclusion.
Bangla
is
one
of
the
most
widely
spok
en
languages
in
the
w
orld,
used
by
hundreds
of
millions
of
speak
ers,
is
used
as
the
of
cial
or
national
language
in
Bangladesh,
and
is
a
major
language
in
parts
of
India.
Despite
its
global
signicance,
Bangla
still
lacks
OCR
systems
as
rob
ust
as
those
a
v
ailable
for
man
y
languages
(e.g.,
English,
German,
and
Spanish)
and
e
v
en
for
se
v
eral
Indo-Iranian
languages,
such
as
Hindi
[1]
and
Assamese
[2].
Existing
Bangla
OCR
often
st
ruggles
with
di
v
erse
fonts,
noisy
documents,
and
comple
x
page
layouts.
Linguistically
,
Bangla
is
clas
sied
within
the
Indo-Iranian
subgroup
of
the
Indo-European
language
f
amily
and
shares
le
xical
and
structural
features
with
Hindi
and
Assamese.
As
a
res
ult,
OCR
studies
on
these
related
scripts
of
fer
an
important
basis.
Ho
we
v
er
,
Bangla
presents
unique
script-specic
dif
culties
that
limit
the
straightforw
ard
adaptation
of
e
xisting
OCR
approaches.
Bangla
uses
multiple
modiers
(e.g.,
Y
a-phal
¯
a
,
J
ournal
homepage:
http://journal.uad.ac.id/inde
x.php/TELK
OMNIKA
Evaluation Warning : The document was created with Spire.PDF for Python.
946
❒
ISSN:
1693-6930
Ra-phal
¯
a
,
Hr
as-i-kar
,
and
R
¯
epha
)
that
v
ary
in
position
and
shape,
and
its
characters
and
modiers
frequently
mer
ge
or
connect
through
a
common
headline
(aka
matr
a
),
making
character
boundaries
dif
cult
to
localize.
These
script
proper
ties
lead
to
non-tri
vial
se
gmentation
and
recognition
problems.
F
or
e
xample,
a
single
Bangla
w
ord
can
span
three
v
ertical
zones:
an
upper
zone
abo
v
e
the
headline,
a
middle
zone
containing
the
primary
body
of
characters,
and
a
lo
wer
zone
belo
w
the
baseline,
as
sho
wn
in
Figure
1.
The
headline
typically
appears
as
the
bar
with
maximum
height
i
n
the
horizontal
projection
prole,
residing
in
the
upper
half
of
the
te
xt
line,
while
the
baseline
is
obtained
by
scanning
the
lo
wer
portion
of
the
line-se
gmented
image.
Comple
x
lig
atures
and
di
v
erse
character
patterns
across
fonts
further
complicate
bot
h
line/w
ord/character
se
gmentation
and
accurate
classication.
Although
se
v
eral
Bangla
OCR
systems
ha
v
e
been
proposed,
persistent
performance
and
compatibility
issues
especially
with
comple
x
layouts,
v
arying
typef
aces,
and
noisy
scans
highlight
the
need
for
more
comprehensi
v
e
solutions.
In
this
w
ork,
we
identify
k
e
y
g
aps:
(i)
se
gmentation
methods
that
are
not
adapti
v
e
and
struggle
with
di
v
erse
script
patterns
during
recognition.
Limited
e
xtensibility
for
ne
wly
observ
ed
character
formations
and
emer
ging
typef
aces/fonts
and
(ii)
the
absence
of
a
conte
xtual
and
automated
progressi
v
e
spell
check
er/corrector
to
rene
the
ra
w
OCR
output.
Our
approach
addresses
these
g
aps
by
redesigning
the
se
gmentation
and
recognition
pipeline
with
e
xtensible,
lter
-based
components,
ResNet50
recognition
and
by
incorporating
an
automated
spell
correction
module
to
impro
v
e
end-to-end
Bangla
OCR
accurac
y
.
Figure
1.
Illustration
of
sections
for
line
se
gmented
image
Headline
is
the
connectors
of
characters
in
a
w
ord,
baseline
separates
the
characters
and
the
modi
ers
belo
w
the
characters,
the
upper
slice
separated
by
headline
i
s
called
the
”upper
portion”,
the
part
between
headline
and
baseline
is
called
the
”mid
portion”,
and
the
part
belo
w
the
baseline
is
called
the
lo
wer
portion.
Se
gmentation-based
OCR
is
widely
recognized
for
its
e
xibility
and
control.
W
e
aim
to
impro
v
e
se
gmentation
of
printed/type
written
te
xt
to
reduce
linguistic
comple
xity
.
Research
in
Bangla
OCR
is
lim-
ited,
often
tar
geting
specic
se
gmentation
issues,
leading
to
inte
gration
problems
and
sometimes
irreparable
errors.
Despite
these
issues,
this
approach
allo
ws
customization
and
control,
potentially
more
ef
fe
cti
v
e
than
scanning/sliding
windo
w
methods
[3],
[4].
Authors
[5]-[7]
pioneered
an
initial
methodology
for
Bangla
OCR
as
a
result
of
successi
v
e
research
ef
forts,
using
eight
strok
e-based
techniques,
a
ll-circle
technique,
and
a
piece
wise
linear
scan
for
te
xt
se
gmentation.
Their
method
struggles
with
characters
ha
ving
parts
in
the
up-
per
portion
of
the
headline.
F
or
e
xample,
Their
approach
can
not
se
gment
cases
lik
e
(R
¯
epha)
with
(
(T
i)
,
(T
ii)
,
(
Hr
as-i-kar
),and
(
Dir
gha-i-kar
)).
Their
methodology
is
limited
in
its
ability
to
separate
numerous
combined
characters
such
as
(T
i)
,
and
(T
ii)
.
In
our
proposed
approach,
we
solv
e
these
issues.
Sattar
et
al.
[8]
suggest
se
gmentation
of
v
arious
characters
and
modiers
lik
e
,
,
(T
i)
,
(T
ii)
,
(Oi-kar)
(Ou-kar)
,
(
Thi
),
(Thii)
,
and
(Chandr
a-bindu)
,
based
on
distincti
v
e
identication.
Their
ap-
proach
lacks
e
xplicit
solutions
for
the
cases
mer
ged
in
the
upper
portion
of
headline.
Similarly
,
Akter
et
al.
[9]
use
a
scanning-based
method
with
constraints.
It
mak
es
both
approaches
font-constrained
and
ine
xible
for
other
Bangla
fonts.
Our
approach
is
more
e
xible,
supporting
lter
e
xtensions
for
easy
adaptation
to
ne
w
fonts.
Ro
wnak
et
al.
[10]
propose
a
curv
ed
scanning
method
for
character
se
gmentation
to
maintain
character
struc-
ture.
The
y
use
w
ord
headline
and
line
headline
zones
as
the
tw
o
form
of
headline
zones,
whic
h
help
separate
numerical
characters.
Ho
we
v
er
,
the
y
sometimes
f
ail
to
se
gment
and
,
es
p
e
cially
when
mer
ged
with
others
in
the
upper
portion
of
the
headline.
Thus,
this
method
adds
noise
and
is
limited
to
static
fonts.
Zahan
et
al
.
[11]
introduce
a
tw
o-zone
strate
gy
using
connected
component
analysis
and
a
chain
approximation
algorithm
with
eight
connecti
vity
to
separate
o
v
erlapping
characters.
Ho
we
v
er
,
it
also
struggles
with
character
o
v
erlap
and
mer
ging
issues
with
the
headline.
Maung
et
al
.
[12]
present
an
OCR
pipeline
for
handwritten
Bangla
that
TELK
OMNIKA
T
elecommun
Comput
El
Control,
V
ol.
24,
No.
3,
June
2026:
945–956
Evaluation Warning : The document was created with Spire.PDF for Python.
TELK
OMNIKA
T
elecommun
Comput
El
Control
❒
947
addresses
script-specic
challenges,
including
modiers,
compound
characters
,
and
diacritics.
Their
approach
combines
you
only
look
once
(Y
OLO)
for
character
detection
with
Ef
cientNet-B4
for
character
recognition,
achie
ving
accuracies
of
93.87%
for
grapheme
roots
and
e
xceeding
98%
for
both
v
o
wel
and
consonant
diacrit-
ics.
A
subsequent
W
ord2V
ec-based
spelling
correction
module
further
reduces
the
character
error
rate
(CER),
enhancing
o
v
erall
system
performance.
Some
researchers
used
approaches
based
on
support
v
ector
machine
(SVM),
quadratic
classier
,
and
adv
anced
neural
netw
ork,
which
ha
v
e
been
sho
wn
to
be
promising
for
their
automatic
feature
e
xtraction
capability
for
OCR
[13]-[16].
Spell
check
ers
can
be
a
promising
solution
to
correct
the
output
of
the
OCR
system.
UzZaman
and
Khan
[17]
utilize
double
maphon
y
encoding
to
impro
v
e
the
accurac
y
of
the
suggested
misspelled
w
ords
in
Bangla.
Here,
a
mapping
rule
is
used
that
combines
the
edit
distance
with
a
double
metaphone.
Islam
et
al.
[18]
proposed
method
uses
the
dictionary
search,
preceded
by
the
suggestion
of
w
ords
based
on
the
edit
distance
algorithm.
The
y
calculate
t
he
accurac
y
using
the
fractional
accurac
y
method.
In
their
other
w
ork,
Islam
et
al.
[19]
inte
grate
the
usage
of
the
n-gram
language
model
with
the
edit
distance.
Bijo
y
et
al.
[20]
proposed
a
ne
w
detector
-puricator
-corrector
frame
w
ork,
detector–puricator–corrector
spell
(DPCSpell),
based
on
denoising
transformers,
and
present
a
method
for
the
creation
of
lar
ge-scale
corpus.
Erroneous
characters
are
detected
and
mask
ed
by
the
detector
netw
ork,
and
the
mask
ed
output
is
then
further
puried
by
the
puricator
.
The
corrector
module
is
responsible
for
creating
corrections.
A
ne
w
bidirectional
encoder
representations
from
transformers
(BER
T)-based
spell
check
er
,
progressi
v
e
stacking,
has
been
de
v
eloped
to
impro
v
e
training
and
correcti
v
e
processes
for
languages
such
as
Bangla
[21].
The
technique,
which
uses
a
con
v
olutional
neural
netw
ork
(CNN)
sub-model,
could
reduce
training
time.
The
y
tested
on
a
6,300-w
ord
dataset
with
spelling
errors.
Therefore
there
is
no
such
auto-progressi
v
e
spell
check
er
for
bangla.
W
e
propose
se
v
eral
impro
v
ements
to
solv
e
the
e
xisting
issues
while
ensuring
the
future
scope
for
the
e
xtension
of
ne
wly
found
patterns
in
characters
and
ne
w
typef
aces/fonts.
Our
proposed
s
e
gmentation
strate
gy
is
easy
to
follo
w
and
sho
ws
se
v
eral
impro
v
ements
to
pre
vious
se
gmentation
issues.
W
e
are
presenting
an
OCR
system
that
does
not
ha
v
e
an
y
compatibility
issues
related
to
se
gmentation
and
is
open
for
e
xtension
to
accommodate
ne
w
fonts.
Then
we
feed
the
se
gmented
characters
to
the
CNN
model
to
recognize
them
while
preserving
the
locality
of
the
te
xt
position
in
our
te
xtual
output.
Finally
,
we
feed
the
output
to
the
proposed
spelling
check
er
model,
which
automat
ically
corrects
spelling.
This
proposed
bangla
spelling
check
er
is
conte
xtual,
rst
auto-progressi
v
e,
and
less
sensiti
v
e
to
pre
vious
spelling
errors.
2.
METHOD
This
section
pro
vides
an
e
xtensi
v
e
elucidation
of
the
methodology
emplo
yed
in
our
research,
with
comprehensi
v
e
details
presented
in
the
subsequent
subsections.
2.1.
Pr
epr
ocessing
OCR
preprocessing
encompasses
se
v
eral
k
e
y
steps:
image
binarization,
sk
e
w
correction,
noise
re
d
uc
-
tion,
and
orientation
detection.
W
e
emplo
yed
otsu’
s
m
ethod
for
binarization.
F
or
sk
e
w
correction,
the
approach
outlined
in
[22]
w
as
used.
Document
noise,
such
as
salt
and
background
interference
that
commonly
arises
from
the
age
or
quality
of
the
document,
w
as
mitig
ated
by
median
ltering.
In
addit
ion,
contrast-limited
adapti
v
e
histogram
equalization
(CLAHE)
w
as
implemented
to
enhance
local
image
details,
and
intensity
le
v
els
were
adjusted
using
sigmoid
correction.
2.2.
Segmentation
Here,
we
dene
the
methodology
used
to
se
gment
the
lines,
w
ords,
and
characters
within
the
te
xt
images.
The
subsequent
subsections
pro
vide
a
comprehensi
v
e
e
xplanation
of
these
processes.
2.2.1.
Line
detection
and
segmentation
T
o
determine
the
orientation
of
an
image,
we
implement
both
horizontal
and
v
ertical
scanning
tech-
niques
to
tally
the
black
pix
els
present
for
both
ro
ws
and
columns.
This
pix
el
count
f
acilitates
the
generation
of
a
histogram,
which
is
instrumental
in
line
detection.
Figure
2
illustrates
an
e
xample
of
such
a
histogram
deri
v
ed
from
the
scanning
proces
s.
Horizontal
scanning
of
the
images
is
emplo
yed
to
identify
lines.
F
ollo
wing
the
separation
of
these
lines,
a
thinning
algorithm
is
emplo
yed
which
is
represented
in
Figure
3.
A
se
gmentation
based
optical
c
har
acter
r
eco
gnition
system
for
Bangla
printed
te
xt
(Mahir
Mahb
ub)
Evaluation Warning : The document was created with Spire.PDF for Python.
948
❒
ISSN:
1693-6930
Figure
2.
The
histogram
in
the
v
ertical
and
horizontal
orientations
sho
ws
the
count
of
black
pix
els
for
each
direction
respecti
v
ely
.
The
dotted
lines
indicate
the
separation
between
the
lines
of
te
xt
Figure
3.
The
separated
te
xt
line
is
thinned
using
sk
eleton-based
thinning
approach
2.2.2.
W
ord
segmentation
In
se
v
eral
w
ord
se
gmentation
techniques
[5],
[6],
a
w
ord
is
identied
as
a
single
connected
component,
using
v
ertical
histogram
scanning
to
separate
w
ords.
Although
some
w
ords,
such
as
(Kha
ga)
,
lack
internal
connection
to
the
headline.
T
o
address
this,
we
manually
e
xtended
the
horizontal
border
length
of
the
connected
component
by
10%
to
its
v
ertical
length.
W
e
did
it
because
our
res
ults
indicate
that
the
intercharacter
spacing
is
usually
6-10%,
while
the
interw
ord
spacing
is
14-25%
of
the
w
ord’
s
v
ertical
le
ng
t
h
in
standard
te
xt.
Then
lled
black
rectangles
are
superimposed
on
the
modied
border
of
the
connected
components
in
a
cop
y
of
the
image.
Then
we
recalculate
the
border
of
the
connected
component.
Finally
,
we
e
xtract
the
areas
from
the
main
image
using
recalculated
borders,
which
result
in
images
of
w
ords.
The
outcome
of
the
method
can
be
seen
in
Figure
4.
T
w
o
separate
components
(
,
and
)
sho
wed
in
Figure
4(a),
of
the
w
ord
(
¯
Ag
¯
e)
are
mer
ged
into
a
single
component
using
the
lled
rectangle
in
Figure
4(b).
(a)
(b)
Figure
4.
An
e
xample
of
w
ord
se
gmentation
by
the
lled
rectangle:
(a)
connected
component:
the
tw
o
w
ords
are
se
gmented
into
three
connected
components.
Those
components
are
sho
wn
inside
the
rectangles
and
(b)
e
xtended
and
lled
the
horizontal
length
of
the
rectangle
co
v
ering
the
w
ord
is
e
xtended
and
lled.
Therefore
the
sub-section
of
the
w
ords
are
mer
ged
and
separated
as
a
single
w
ord
2.2.3.
Character
segmentation
W
e
introduce
common
search
patterns
through
what
we
call
lters
to
se
gment
the
characters
and
modiers.
W
e
designed
the
lters
in
such
a
w
ay
that
the
lters
do
not
o
v
erlap
with
each
other
when
searching.
The
lters
in
Figure
5
remo
v
e
the
headline
from
the
thinned
image.
Here,
C
P
denotes
the
start
of
the
pix
el
from
which
we
start
searching.
P
and
N
denote
positi
v
e
and
ne
g
ati
v
e
character
pix
el.
The
pix
el
colors
for
C
P
and
P
are
black.
P
atterns
matching
the
lters
in
Figures
5(a)
to
(e)
indicate
that
there
is
only
a
headline.
Thus,
we
remo
v
e
the
black
pix
els
of
C
P
and
P
.
Filt
ers
are
crucial
because
the
headline
after
thinning
is
not
al
w
ays
a
straight
line,
as
c
an
be
seen
in
Figure
6.
The
small
rectangles
in
Figure
6
re
v
eal
those
v
ariations
in
the
structure
of
the
headline.
Thus
these
lters
help
identify
the
headline
so
that
the
y
can
be
remo
v
ed.
(a)
(b)
(c)
(d)
(e)
Figure
5.
Filters
for
headline
remo
v
al:
(a)
lter
1,
(b)
lter
2,
(c)
lter
3,
(d)
lter
4,
and
(e)
lter
5
TELK
OMNIKA
T
elecommun
Comput
El
Control,
V
ol.
24,
No.
3,
June
2026:
945–956
Evaluation Warning : The document was created with Spire.PDF for Python.
TELK
OMNIKA
T
elecommun
Comput
El
Control
❒
949
Figure
6.
V
ariations
in
the
headline
appear
follo
wing
the
thinning
process,
as
indicated
within
the
gray
rectangles
Our
approach
ef
fecti
v
ely
resolv
es
mer
ging
issues,
such
as
touching
and
intersecting,
as
sho
wn
in
Figure
7.
W
e
use
lters
to
identify
and
separate
characters
and
modiers
lik
e
(R
¯
epha)
,
,
,
,
and
upper
portions
of
,
,
,
,
and
as
sho
wn
in
Figure
7(a)
and
7(b)
.
In
Figures
8(a)
to
(e),
the
lters
in
Figures
8(a)
to
(c)
are
used
to
search
in
the
image.
Upon
identifying
these
search
patterns
with
the
lters,
we
search
for
single
”up”,
”up-right”,
and
”right”
pix
els
from
the
current
pix
el
accordingly
.
At
rst
we
search
in
the
straight
”up”
direction.
If
the
e
xpected
pix
el
is
not
found,
the
search
mo
v
es
to
the
up-right
and
then
right.
W
e
do
this
single
pix
el
search
because
sometimes
the
pix
els
of
the
thinned
headline
res
ide
one
pix
el
”up”
from
the
a
v
erage
headline.
It
usuall
y
happens
when
characters
join
with
the
headline.
So,
the
starting
point
is
adjusted
to
the
ne
w
positi
v
e
search
point
upon
matching
this
search
pattern.
(a)
(b)
Figure
7.
Examples
of
character
mer
ging
issues:
(a)
with
upper
portion
of
and
(b)
with
upper
portion
of
(a)
(b)
(c)
(d)
(e)
Figure
8.
Filter
for
detecting
upper
modiers
using
dif
ferent
search
and
erasing
strate
gies:
(a)
lter
1,
(b)
lter
2,
(c)
lter
3,
(d)
lter
4,
and
(e)
lter
5
Then
we
search
using
depth-rst
search
(DFS)
from
the
identied
headline
pix
el.
When
a
horizontal
pattern
or
an
intersecting
point
is
found
with
at
lea
st
a
six-pix
el
count
during
the
DFS
search,
we
dra
w
a
white
lled
rectangle
that
separates
the
mer
ging
characters
(
and
(Rpha)
),
as
sho
wn
in
Figure
7(a).
A
(R
¯
epha)
possibly
mer
ges
with
a
headline
when
matched
to
the
lter
in
Figure
6
which
we
pre
viously
used
for
adjustment
of
headline
pix
el.
W
e
replace
C
P
and
P
with
N
,
then
apply
DFS
ag
ain
using
the
”up”
and
”up-left”
patterns.
The
intersection
point
is
disco
v
ered
by
nding
at
least
three
positi
v
e
adjacent
joint
pix
els
in
the
upper
portion
of
the
headline.
It
separates
(R
¯
epha)
.
Lik
ely
,
,
and
upper
portion
of
,
,
,
,
e
xist
here
when
the
matched
pattern
with
the
lter
in
Figure
8(d).
Preceeded
by
a
pattern
corresponding
with
an
y
of
the
Figures
8(a)-8(c).
Therefore,
we
dra
w
a
white
line,
which
is
20%
of
the
width
(aka.
v
ertical
length)
of
the
line-se
gmented
picture,
just
one
pix
el
up
from
the
C
P
pix
el
at
the
backw
ard
horizontal
direction.
This
white
line
separates
from
the
headline
without
an
y
deformation.
Ag
ain,
similar
to
the
pre
vious
one,
we
conduct
a
DFS
based
on
an
”up”,
”up-left”,
”left”
pattern.
W
e
remo
v
e
the
nal
positi
v
e
search
pix
el
after
locating
the
intersection
point.
It
s
eparates
characters/modiers
to
pre
v
ent
mer
ging.
The
whole
process
is
described
in
Algorithm
1.
Our
method
splits
,
,
,
,
into
tw
o
parts,
as
sho
wn
in
Figure
9.
Se
gmented
characters
are
collected
on
the
basis
of
their
centroids.
From
the
centroid,
the
borders
of
the
characters
are
calculated.
Figure
9.
An
e
xample
of
fully
se
gmented
te
xt.
The
images
are
separated
into
lines.
Then
the
lines
are
separated
into
w
ords.
The
w
ords
are
separated
into
characters
and
modiers
A
se
gmentation
based
optical
c
har
acter
r
eco
gnition
system
for
Bangla
printed
te
xt
(Mahir
Mahb
ub)
Evaluation Warning : The document was created with Spire.PDF for Python.
950
❒
ISSN:
1693-6930
Algorithm
1
Separate
characters
and
modiers
from
OCR
image
1:
pr
ocedur
e
S
E
P
A
R
A
T
I
N
G
C
H
A
R
A
C
T
E
R
S
A
N
D
M
O
D
I
FI
R
E
S
(
imag
eAr
r
ay
,
l
ineR
ow
I
ndex
)
2:
lineArray
=
&
I
mag
eAr
r
ay
[
LineR
ow
Ar
r
ay
]
3:
lineLength
=
l
eng
th
(
l
ineAr
r
ay
)
4:
f
or
i
=
0
to
l
ineLeng
th
−
1
do
5:
lterT
ype,
horizontalCount,
erasingInde
x
=
F
indS
eper
ator
F
il
ter
(
C
P
=
&
LineAr
r
ay
[
i
])
6:
if
f
il
ter
T
y
pe
in
[
a,
b,
c
]
then
7:
if
hor
iz
ontal
C
ount
≥
6
then
8:
E
r
a
s
eB
y
R
ectang
l
e
(
r
e
ctang
l
eS
tar
tI
ndex
=
r
ectang
l
eI
ndex
)
9:
end
if
10:
innerFilterT
ype,
,
erasingInde
x
=
F
indS
e
p
er
ator
F
il
ter
(
C
P
=
&
LineAr
r
ay
[
i
])
11:
if
inner
F
il
ter
T
y
pe
==
d
then
12:
E
r
aseB
y
B
ack
w
ar
dLine
(
index
=
er
asi
ng
I
ndex
)
13:
isMer
geF
ound,
mer
gerPix
el
=
S
ear
chF
or
M
er
g
e
(
C
P
=
&
LineAr
r
ay
[
i
])
14:
if
isM
er
g
eF
o
un
d
then
15:
E
r
asing
M
er
g
er
P
ixel
s
(
mer
g
er
P
ixel
=
mer
g
er
P
ixel
)
16:
end
if
17:
end
if
18:
else
if
f
il
ter
T
y
pe
==
e
then
19:
PInde
x
es
=
GetP
I
ndexes
(
C
P
=
&
LineAr
r
ay
[
i
])
20:
isMer
geF
ound,
mer
gerPix
el
=
S
ear
chF
or
M
er
g
e
(
C
P
=
&
LineAr
r
ay
[
i
])
21:
if
isM
er
g
eF
ound
then
22:
E
r
asing
M
er
g
er
P
ixel
s
(
mer
g
er
P
i
xel
=
mer
g
er
P
i
xel
)
23:
end
if
24:
E
r
asing
P
ositiv
eP
ixel
s
(
C
P
=
i,
P
I
ndexes
=
P
I
ndexes
)
25:
end
if
26:
end
f
or
27:
end
pr
ocedur
e
2.3.
Recognition
and
post
pr
ocessing
Our
proposed
model
is
a
st
andard
ResNet50
CNN
(pre-trained
with
imagenet)
and
tw
o
a
d
di
tional
feed-forw
ard
layers
for
character
recognition.
The
model
is
trained
with
127
classes
with
10
fold
cross
v
ali-
dation.
Each
class
is
constrained
to
451
labeled
instances
of
ima
ges
because
of
the
rare
occurrence
of
some
characters/modiers.
W
e
ha
v
e
e
xperimented
using
other
CNN
models.
Ev
ery
class
has
W
e
mer
ge
character
output
into
w
ords
and
lines.
Post-processing
corrects
cert
ain
OCR
generated
errors.
W
e
handle
the
joining
character
separately
by
mer
ging
it
with
the
pre
vious
character
,
bypassing
the
recognizer
.
After
headline
erasing,
(the
letter
T
a
)
and
(the
number
3)
both
become
.
Therefore
we
check
for
se
v
eral
cases
to
determine
if
it
is
or
.
If
the
i
th
v
alue
in
w
ord
is
,
the
cases
are
as
follo
ws:
If
the
(
i
−
1)
th
or
(
i
+
1)
th
v
alue
is
a
number
,
the
i
th
v
alue
is
.
If
the
(
i
+
1)
th
v
alue
is
and
the
(
i
−
1)
th
v
alue
is
not
a
number
or
the
(
i
−
1)
th
v
alue
does
not
e
xist,
the
i
th
v
alue
is
.
Otherwise,
the
i
th
v
alue
is
.
Only
unique
cases
in
ends
with
.
In
addition,
erasing
the
headline
resulted
in
the
se
gmentation
of
,
,
,
,
into
tw
o
parts.
Among
the
se
gmentation
of
,
,
can
result
in
similarity
to
other
characters.
’
’
becomes
’
’
and
’
’,
’
’
becomes
’
’
and
’
’,
’
’
becomes
’
’
and
’
’.
So,
when
these
characters
are
found
in
the
ith
position,
we
check
for
’
’
in
the
i
−
1
th
position
and
tak
e
the
decision
accordingly
.
2.4.
Spell
check
er
The
spell
check
er
we
propose
processes
te
xt
obtained
via
OCR
and
outputs
te
xt
with
corrected
spelling.
The
architecture
of
the
spell
check
er
is
detailed
in
Figure
10
and
is
further
elaborated
upon
in
subsequent
sec-
tions.
Our
approach
utilizes
a
BER
T
,
which
emplo
ys
mask
ed
w
ord
prediction
to
infer
w
ords
by
considering
the
surrounding
conte
xt.
This
mechanism
generates
a
list
of
lik
ely
w
ords
to
correct
spelling
errors.
The
BER
T
model
is
a
base-uncased
model,
featuring
12
layers,
768
hidden
units,
12
attention
heads,
and
a
total
of
110
million
parameters.
The
pri
mary
training
corpus
for
the
BER
T
model
is
sourced
from
Bangla
ne
wspaper
articles,
including
Daily
Prothom
Alo,Daily
Kalerk
ontho,
Daily
Ittef
aq
and
Bangla
W
ikipedia,
constituting
65.36%
of
the
dataset,
with
the
remaining
34.64%
deri
v
ed
from
Bangla
W
ikipedia
.
Data
acquisition
w
as
performed
through
web
cra
wling
and
manual
collection
between
2018
and
2020,
resulting
in
a
corpus
comprising
10,340,273
sentences
and
8,928,472
unique
w
ords.
In
T
able
1
the
data
source
is
described
using
its
proportional
v
alue
from
dif
ferent
sources.
TELK
OMNIKA
T
elecommun
Comput
El
Control,
V
ol.
24,
No.
3,
June
2026:
945–956
Evaluation Warning : The document was created with Spire.PDF for Python.
TELK
OMNIKA
T
elecommun
Comput
El
Control
❒
951
Figure
10.
The
main
components
of
the
proposed
spell
check
er
are
sho
wn
inside
the
dotted
area.
The
spell
check
er
tak
es
the
sentence
as
input
and
produces
the
sentence
with
the
corrected
spelling
of
w
ords
T
able
1.
Details
of
the
dataset
used
for
corpus
b
uilding
Data
source
Bangla
ne
wspaper
Bangla
W
ikipedia
Proportion(%)
65.36
34.64
2.4.1.
Err
or
detection
W
e
address
spelli
ng
errors
in
the
OCR
output,
rst
by
identifying
named
entities
using
an
mBER
T
model
(https://huggingf
ace.co/sagorsark
er/mbert-beng
ali-ner).
Non-named
entities
under
go
a
dictionary
lookup
within
our
451,742-w
ord
database.
W
ords
not
found
and
not
numerical
are
agged
as
potential
misspellings
for
further
analysis.
T
o
correct
the
spelling,
we
took
a
tw
o-step
approach.
Firstly
,
we
took
the
prediction
for
the
probable
w
ord
list
from
the
mask
ed
w
ord
prediction
model
for
probably
misspelled
w
ords.
The
predicted
w
ords
t
h
e
n
under
go
a
correction
process
based
on
Le
v
enshtein
distance
(LD).
LD
calculates
the
minimum
edits
needed
for
the
con
v
ersion
of
w
ord
s
1
to
w
ord
s
2
.
Let
I
represent
the
current
location
in
the
input
string
s
1
and
J
represent
the
current
location
in
the
output
string
s
2
.
If
the
probable
misspelled
wor
d
(mw)
length
is
less
than
4,
we
consider
the
maximum
edit
distance
(ml)
of
2
indicated
by
ml
to
select
a
correctly
spelled
candidate
w
ord.
If
the
mw
or
predicted
w
ord(
pw
)
has
comple
x
characters
(tw
o
characters
joined
by
”
”),
the
v
alue
of
ml
is
e
xtended
by
1.
F
or
the
v
alue
of
the
length
of
mw
>
=
4,
the
v
alue
of
ml
is
half
the
length
of
mw
.
Here,
the
selection
of
minimum
edit
distance
is
based
on
analysis
and
e
xperiment.
When
predicted
w
ords
from
the
mask
ed
model
predicted
w
ord
list
fulll
the
criterion
described
abo
v
e,
the
w
ord
from
the
li
st
with
the
minimum
edit
distance
is
considered
as
the
correctly
spelled
w
ord
and
replaces
the
probable
misspelled
w
ord.
The
model
can
also
suggest
the
most
probable
list
of
correctly
spelled
w
ords.
3.
RESUL
TS
AND
DISCUSSION
Here,
we
discuss
the
result
of
our
se
gmentation
process.
Since
our
lters
are
currently
tailored
to
the
specic
fonts
used
in
the
Daily
Prothom
Alo
and
Somokal
ne
wspapers,
it
is
important
to
compare
ho
w
well
the
method
generalizes
across
dif
ferent
typef
aces.
The
se
gmentation
performance
for
the
dif
ferent
fonts
is
sho
wn
in
T
able
2.
Our
proposed
approach
has
se
gmented
printed
te
xt
images
into
123,422
characters/modiers.
The
se
gmentation
performance
for
the
dif
ferent
fonts
is
sho
wn
in
T
able
2.
Our
proposed
approach
has
se
gmented
printed
te
xt
images
into
123,422
characters/modiers.
The
majority
of
characters,
such
as
,
which
are
occasionally
aligned
abo
v
e
or
with
the
headline,
are
responsible
for
the
character
-le
v
el
se
gmentation
problem.
F
or
the
Daily
Prothom
Alo
and
Somokal
typef
ace,
an
additional
sk
e
w
correction
of
the
headline
after
the
thinning
procedure
resulted
in
a
2.26%
reduction
of
error
.
In
our
proposed
approach,
we
sol
v
e
man
y
mer
ging-related
se
gmentation
issues.
T
able
2.
Comparati
v
e
result
of
character
se
gmentation
for
dif
ferent
ne
wspaper
fonts
F
ont
source
Character
se
g.
err(%)
T
otal
se
g.
character
Prothom
Alo
2.80
63,359
Somokal
4.45
32,112
Jug
antor
11.38
27,951
A
se
gmentation
based
optical
c
har
acter
r
eco
gnition
system
for
Bangla
printed
te
xt
(Mahir
Mahb
ub)
Evaluation Warning : The document was created with Spire.PDF for Python.
952
❒
ISSN:
1693-6930
In
T
able
3,
we
compare
the
performance
of
character
-le
v
el
se
gmentation
across
dif
ferent
ne
wspaper
typef
aces.
This
comparison
is
important
because
it
re
v
eals
certain
widely
used
ne
wspaper
fonts,
especially
with
comple
x
lig
atures
and
closely
spaced
glyphs.
It
sho
ws
that
e
xtension
to
a
ne
w
font
f
ace
is
important
for
future
generalization,
which
scope
we
opened
through
the
ltering-based
approach.
In
our
method,
the
a
v
erage
se
gmentation
error
rate
is
0.22%
on
all
typef
aces.
T
able
3.
Result
of
se
gmentation
of
some
mer
ging
issues
and
characters/modiers.
Most
of
the
issues
arise
due
to
the
mer
ging
of
modiers
and
characters
Issues
Character
se
g.
err(%)
Mer
ging
with
(
Hr
as-i-kar
)
0.95
Mer
ging
with
(
Dir
gha-i-kar
)
1.42
(
Hr
as-i-kar
)
0.21
(
Dir
gha-i-kar
)
0.13
(
Oi-kar
)
0.02
(
Ou-kar
)
0.23
(
Chandr
a-bindu
)
0.48
Mer
ging
with
(
R
¯
epha
)
0.03
(
Y
a-phal
¯
a
)
0.41
(
Ra-phal
¯
a
)
6.31
(
ga
)
8.09
(
tha
)
7.23
T
able
4
pro
vides
a
direct
quantitati
v
e
comparison
between
our
proposed
method
and
e
xisting
Bangla
OCR
systems
under
the
same
e
xperimental
conditions
and
font
settings
(Prothom
Alo
and
Somokal).
This
comparison
i
s
crucial
to
demonstrate
that
performance
g
ains
in
character
se
gmentation
and
recognition
are
not
anecdotal,
b
ut
are
consistently
achie
v
ed
despite
the
limited
and
highl
y
imbalanced
127-class
data
set.
Each
class
is
constrained
to
451
labeled
instances
of
i
mages
because
of
the
rare
occurrence
of
some
characters/mod-
iers.
Our
approach
has
an
error
rate
of
only
3.35%,
which
is
signicantly
lo
wer
than
that
of
the
pre
vious
methods.Gi
v
en
the
scarcity
of
complete
OCR
approaches
in
the
literature,
the
nal
results
are
compared
e
x-
clusi
v
ely
with
studies
that
emplo
y
full
OCR
methods.
In
addition,
there
is
a
limited
standard
benchmark
for
comparing
the
performance
of
OCR
[23],
[10].
W
e
ha
v
e
e
xperimented
with
dif
ferent
CNN
models
for
recognizing
characters/modiers,
as
sho
wn
in
T
able
5.
The
ResNet50
models
gi
v
es
the
best
outcome
compared
to
other
e
v
aluated
CNN
models
with
a
accurac
y
of
98.345%
and
an
F1
score
of
96.854%.
W
e
e
v
aluate
the
performance
of
the
spell
check
er
on
the
Bangla
BER
T
mask
ed
w
ord
model
described
abo
v
e.
The
metrics
used
to
e
v
aluate
the
models
are
described:
-
TP
(true
positi
v
e):
did
not
change
the
correct
w
ord/total
correct
w
ord
-
FN
(f
alse
ne
g
ati
v
e):
change
the
correct
w
ord
incorrectly/total
correct
w
ord
-
FP
(f
alse
positi
v
e):
did
not
change
the
incorrect
w
ord
(Mark
incorrect
as
correct)/total
incorrect
w
ord.
-
TN
(true
ne
g
ati
v
e):
change
the
incorrect
w
ord
correctly/total
incorrect
w
ord
-
TN
PLUS:
change
the
incorrect
w
ord
incorrectly/total
incorrect
w
ord
T
able
4.
Comparati
v
e
analysis
of
the
traditional
se
gmentation-based
Bangla
OCR
systems
Literature
Character
se
g.
error
(%)
Final
outcome
error
(%)
Our
proposed
approach
3.35
2.33
Cho
wdhury
and
P
al
[7]
39.87
44.53
Mahmud
et
al.
[24]
34.22
-
Sattar
et
al.
[8]
36.99
-
Akter
et
al.
[9]
42.66
-
Omee
et
al.
[23]
28.60
30.65
Ro
wnak
et
al
.
[10]
23.54
-
Zahan
et
al.
[11]
28.99
-
TELK
OMNIKA
T
elecommun
Comput
El
Control,
V
ol.
24,
No.
3,
June
2026:
945–956
Evaluation Warning : The document was created with Spire.PDF for Python.
TELK
OMNIKA
T
elecommun
Comput
El
Control
❒
953
T
able
5.
The
result
of
the
dif
ferent
CNN
model
on
labeled
se
gmented
bangla
characters/modiers
Model
name
Accurac
y
(%)
F1
ResNet50
98.345
96.854
V
GG-16
86.433
84.121
Inception
V2
89.992
85.471
ANN(10
Con
v
olutional
Layers)
67.443
59.328
The
dataset
utilized
for
the
e
v
aluation
of
spell
check
er
performance
is
constructed
in
accordance
wi
th
the
methodology
described
in
the
literature
by
Sif
at
et
al.
[25].
There
are
10244
misspelled
w
ords
and
52334
correctly
spelled
w
ords
in
the
dataset.
W
e
e
xpect
to
ha
v
e
the
v
alue
of
TP
,
and
TN
as
lar
ge
as
possible
and
others
as
lo
w
as
possible.
W
e
e
xperimented
with
v
arious
maximum
edit
distance
values
(ml)
.
W
e
dened
and
check
ed
some
conditions
to
decide
when
we
should
change
the
spelling
of
w
ords
based
on
the
LD.
The
conditions
are
listed:
-
C1:
ml
=
(probable
misspell
w
ord
aka
mw’
s
length(length(mw)))/2
-
C2:
ml
=
length(mw)/2
if
length(mw)
>
4
else
ml
=
2
-
C3:
ml
=
length(mw)/2
if
length(mw)
>
6
else
ml
=
2
-
C4:
ml
=
length(mw)/2
if
length(mw)
>
6
else
ml
=
3
In
T
able
6,
C2
sho
ws
better
results
than
other
conditions
that
ha
v
e
already
been
mentioned
in
the
abo
v
e
proposed
method.
Thus
we
select
C2
as
our
para
meterized
v
al
ue
for
ml
.
Although
C2
sho
ws
8.33%
in
TP
PLUS,
the
v
al
ue
of
TN
is
50.17%
which
is
signicantly
good.
C1
performs
better
in
detecting
the
correct
w
ords
in
sentences.
Finally
,
in
T
able
7,
we
sho
w
an
e
x
a
mple
to
demonstrate
the
step-by-step
process
of
our
OCR.
It
sho
ws
the
dif
ferent
outputs
of
the
OCR
through
its
w
ork
c
ycle.
T
able
6.
The
outcomes
of
our
spell
check
er
using
Bangla
BER
T
under
v
arious
conditions
Condition
TP
FN
FP
TN
TN
PLUS
C1
0.983
0.016
0.677
0.320
0.001
C2
0.978
0.021
0.415
0.501
0.083
C3
0.977
0.022
0.553
0.441
0.005
C4
0.962
0.037
0.649
0.201
0.149
T
able
7.
Detailed
vie
w
of
the
pipeline’
s
processes
using
an
e
xample
Step
Outcome
Printed
e
xample
image
Line
se
gmented
thinned
image
After
headline
erasing
Output
from
recognition
model
Output
from
spell
check
er
So
among
the
tested
fonts,
the
proposed
method
achie
v
ed
the
lo
west
se
gmentation
error
with
P
rothom
Alo
(2.80%),
while
fonts
lik
e
Jug
antor
sa
w
higher
error
rates
due
to
the
l
ters
are
not
optimized
for
them.
Compared
to
pre
vious
systems
with
error
rates,
our
approach
reduced
character
-le
v
el
errors
to
3.35%
and
nal
te
xt
errors
to
2.33%.
The
part
of
speech
(POS)
sentiti
v
e
autoprogressi
v
e
and
conte
xtual
BER
T
-based
spell
check
er
further
impro
v
ed
recognition
outcomes,
particularly
under
condition
C2.
A
se
gmentation
based
optical
c
har
acter
r
eco
gnition
system
for
Bangla
printed
te
xt
(Mahir
Mahb
ub)
Evaluation Warning : The document was created with Spire.PDF for Python.
954
❒
ISSN:
1693-6930
4.
CONCLUSION
In
this
w
ork,
we
ha
v
e
addressed
the
problem
of
digitizing
Bangla
printed
images
through
a
com-
plete
OCR
pipeline,
with
particular
emphasis
on
character
se
gmentation,
recognition,
and
post-processing.
W
e
proposed
a
modular
,
e
xtendable
lter
-based
se
gmentation
method
that
mitig
ates
man
y
of
the
shortcom-
ings
found
in
e
xisting
se
gmentation-dri
v
en
Bangla
OCR
approaches,
thus
reduci
ng
se
gmentation-related
errors
across
v
arious
printed
fonts.
By
inte
grating
our
se
gmentat
ion
output
with
ResNet50,
we
achie
v
ed
competi-
ti
v
e
character
-le
v
el
recognition
performance,
despite
the
challenges
posed
by
the
comple
x
Bangla
script
and
compound
characters.
W
e
proposed
a
conte
xtual
spell
check
er
b
uilt
on
a
mask
ed
language
model
(BER
T).
By
operating
at
the
phrase
le
v
el,
this
component
enhances
the
rob
ustness
of
the
OCR
pipeline
ag
ainst
both
recogni-
tion
errors
and
traditional
spelling
errors,
and
sho
wcases
the
utility
of
modern
language
models
in
lo
w-resource
script
OCR.
Although
our
proposed
complete
pipeline
does
not
solv
e
all
challenges
of
Bangla
OCR,
it
establishes
a
strong
foundation
and
suggests
se
v
eral
promising
directions.
Our
current
system
tar
gets
printed
te
xt.
Extending
the
se
gmentation,
recognition,
and
conte
xtual
correction
components
to
handle
handwritten
Bangla,
where
the
v
ariability
is
signi
cantly
higher
,
remains
a
signicant
and
impactful
research
direction.
The
performance
of
both
recognition
and
BER
T
-based
spell
correction
can
be
substantially
i
mpro
v
ed
by
training
and
e
v
aluating
lar
ger
,
more
di
v
erse
datasets
that
better
co
v
er
rare
compound
characters,
multiple
fonts,
and
a
wider
range
of
domains.
De
v
eloping
additional
lters
and
inte
grating
them
into
the
e
xisting
systems
can
enhance
the
o
v
erall
co
v
erage
and
rob
ustness
of
the
pipeline.
Also,
there
are
a
lar
ge
number
of
compound
characters
in
Bangla.
These
characters
appear
too
rarely
to
be
incorporated
into
our
recognition
model.
These
characters
af
fect
the
o
v
erall
performance
of
the
OCR.
Although
our
primary
objecti
v
e
w
as
to
enhance
se
gmentation
techniques,
it
is
essential
to
ackno
wledge
that
se
v
eral
contemporary
studies
emplo
ying
non-se
gmentation
methodologies
ha
v
e
g
arnered
signicant
recognition
and
demonstrated
high
ef
cac
y
.
In
summary
,
our
w
ork
presents
a
se
gmentation-centric
pipeline
for
Bangla
printed
OCR,
combining
classical
image
processing
and
modern
deep
learning
with
conte
xtual
l
anguage
modeling.
W
e
e
xpect
that
the
methods
and
insights
introduced
here
will
f
acilitate
further
research
in
rob
ust
Bangla
OCR
and,
more
broadly
,
OCR
for
other
comple
x
Indic
scripts.
FUNDING
INFORMA
TION
Authors
state
no
funding
in
v
olv
ed.
A
UTHOR
CONTRIB
UTIONS
ST
A
TEMENTS
This
journal
uses
the
Contrib
utor
Roles
T
axonomy
(CRediT)
to
recognize
indi
vidual
author
contrib
u-
tions,
reduce
authorship
disputes,
and
f
acilitate
collaboration.
Name
of
A
uthor
C
M
So
V
a
F
o
I
R
D
O
E
V
i
Su
P
Fu
Mahir
Mahb
ub
✓
✓
✓
✓
✓
✓
✓
✓
✓
Ahmedul
Kabir
✓
✓
✓
✓
✓
✓
✓
C
:
C
onceptualization
I
:
I
n
v
estig
ation
V
i
:
V
i
sualization
M
:
M
ethodology
R
:
R
esources
Su
:
Su
pervision
So
:
So
ftw
are
D
:
D
ata
Curation
P
:
P
roject
Administration
V
a
:
V
a
lidation
O
:
Writing
-
O
riginal
Draft
Fu
:
Fu
nding
Acquisition
F
o
:
F
o
rmal
Analysis
E
:
Writing
-
Re
vie
w
&
E
diting
CONFLICT
OF
INTEREST
Authors
state
no
conict
of
interest.
D
A
T
A
A
V
AILABILITY
Data
supporting
the
ndings
of
this
study
are
a
v
ailable
upon
request
from
the
corresponding
author
.
TELK
OMNIKA
T
elecommun
Comput
El
Control,
V
ol.
24,
No.
3,
June
2026:
945–956
Evaluation Warning : The document was created with Spire.PDF for Python.