Introduction

English handwritten character recognition is the task that identifying and converting handwritten characters into machine-readable text. It is an important area of research and development in the domain of computer vision (CV) and pattern recognition (PR). The goal of handwritten character recognition is to create algorithms and models that can accurately interpret and transcribe handwritten text, enabling computers to understand and process written information. This technology finds applications in various domains, such as document analysis, optical character recognition (OCR), digitization of handwritten documents, and automation of data entry tasks. Handwriting character recognition is a computer program that interprets and identifies handwritten input like images and documents [18]. An optical image scanning system is used to take images of printed text papers [1]. This OCR process involves performing various tasks, such as recognizing patterns and characters, which perform various tasks such as formatting a document, achieving the correct segmentation, and finding the most common words [14]. Early versions should also be trained to find the most common words in the text [9].

It’s worth noting that the accuracy of handwritten character recognition systems can vary based on handwriting styles, the quality of the input images, and the complexity of the characters [4]. The development of robust recognition algorithms often requires extensive training data and careful tuning of the models to achieve satisfactory results [7]. Although humans can easily recognize a document, they often have a hard time remembering its appearance due to the random variations in its writing style [12].

The extraction of features in the progression of Handwritten Character Recognition (HCR) is challenging due to the intricate irregularity and lack of precision found in handwritten characters, particularly in English. The classification task becomes even more difficult due to the structural complexity of these characters. Feature extraction can be categorized into three types: structural, statistical, and global transformation, depending on the approach used. A feature extraction process is a process that involves extracting information from a raw data set [5]. The primary objective of feature extraction is to amplify the distinctions among different character classes while minimizing the dissimilarities between them. This crucial factor greatly aids in the recognition of English characters across multiple languages. Variations in character shapes, including contours, solid digital representations, weakened forms (skeletons), and grayscale sub-images, are considered as character variations. By developing a diverse feature extraction approach, it becomes possible to identify all these variations for each individual character. Similarly, classification requires a lot of training set. Due to this propagation, it increases the computational time. It is one of the limitations [28]. Thus, Novel Naïve Propagation for English handwritten character recognition comes to overcome these drawbacks.

The paper’s contribution involves several key steps. Firstly, the preprocessing of scanned handwritten images takes place. Next, the data extraction is performed using Harmonized Independent Component Analysis with HFPSO, which efficiently captures the relevant information from the image [27] [26]. Finally, our innovative approach, the Novel Naïve Propagation (NNP), combines Backpropagation Neural Network and Naïve Bayes classifier to classify the extracted features, resulting in highly accurate and precise recognition of handwritten characters.

The remaining work in this paper is systematized. Section 2 criticizes some of the related literature; Sect. 3 discusses the system design of the recommended HCR methodology. Section 4 represents a simulation result. And at last, Sect. 5 discusses Concluding remarks.

Literature Review

Several research papers, libraries, and commercial software packages are available that provide implementations of handwritten character recognition algorithms. These resources utilize machine learning and deep learning techniques to improve the accuracy and performance evaluation of the recognition systems [16].

Li et al. [15] introduced a multi-column CNN method to identify Chinese character classification. In [2], Alom et al. show that deep learning-based methods can outperform classical methods for recognizing handwritten character recognition. A deep learning framework that learns how to recognize text-based character recognition was introduced to a CNN dataset [3], and the system achieved an accuracy of \( 85.36\% \). Kumar et al. [13] were able to recognize the Indian script of Gurumukhi based on the K-NN classifier provides an accuracy of \(92.12\%\). Pirlo et al. [11] presented that the Fuzzy Membership Function which is used to maximize classification efficiency. Xu-Yao Zhang et al. [22] discussed the RNN model to improve drawing the Chinese character. Jo et al. [10] demonstrate two contributions to recognize handwritten Chinese characters based on the Tesseract engine. The first one is generating feature libraries from different styles of writers, and another is by preprocessing the data while adjusting the Tesseract engine to rank the output weight.

Independent component analysis, or ICA, is a statistical method that involves taking a set of random variables and performing a series of functions. Currently, ICA is used for various applications, such as facial recognition and voice signal analysis. The base vectors of ICA are generally independent or statistically significant. In [20], Teixeira et al. used Raman imaging spectroscopy to study the spectrum of different pens. They were able to extract unique information about the pens. The obtained spectra were compared to known ranges, and they could confirm whether a forgery occurred. Wei et al. [21] explained an Electrical Impedance Tomography is a medical imaging device that delivers an electric pulse into the patient’s body through two electrodes. The primary issue in the EIT device is the nonlinear inverse problem. To tackle these problems, ANN is introduced, but these will suffer from slow convergence during the training stage. So PSO algorithm is proposed to improve the convergence problem in EIT imaging. In [17], Patwal et al. introduced a novel approach for optimizing the operation of a pumped hydrothermal storage system has been proposed. It involves introducing a set of mutation strategies. The proposed algorithm combines the TVAC-PSO method and the Cauchy mutation strategy to improve its search capabilities. The system is evaluated using Fuzzy-AI Immune System [8].

Thus from the above literature review analyzed, there seems some sort of comes in the Neural network for accurate classification and reduction recognition rate due to less precise feature extraction by the various process. A new novel procedure is implemented in the upcoming section to achieve better recognition.

system Overview

Performing handwritten character recognition (HCR) is a complex task that can be hindered by various external and internal factors. External factors include variations in character shapes, diverse writing styles among different individuals, and potential confusion with similar-looking characters, leading to inaccurate recognition. [29]. The internal factors are focused during the scanning of images; like distortion, and additive noise. The neural network is introduced for classification tasks to recognize the image to overcome these problems. This method proposes a new innovative methodology to extract the Handwritten Character with better accuracy to comprehend the above-stated problem. Figure 1 illustrates the suggested process.

Fig. 1
figure 1

Schematic representation of the proposed HCR

The initial step involves collecting an English handwritten database, which is then utilized as input for extracting essential information. The system employs a learning algorithm to automatically learn and classify images. To achieve this, the collected data undergoes analysis and preprocessing stages, as depicted in Fig. 1. The initial step involves applying preprocessing techniques to enhance the scanned input, preparing it for further processing. Subsequently, the preprocessed image is segmented into lines, words, and characters, enabling the extraction of features from each character to form a feature vector. The selection of appropriate feature extraction techniques is crucial for achieving high-performance recognition in segmented documents. The Harmonized Independent Component Analysis (HICA) is employed to extract features of the multivariate data and for selection of extracted feature Fireflies (FF) and Particle Swarm Optimization (PSO). This process considers various aspects of the given dataset, performing both linear and nonlinear operations for blind separation and generating feature vectors. Additionally, meaningful data is extracted and passed to the classification task. Classification, as a decision-making method, plays a crucial role in the recognition system. This paper introduces an innovative method that enhances classification accuracy by leveraging neural network concepts to extract and simplify misplaced information in the document, facilitating the identification of handwritten English text. Ultimately, the proposed framework addresses external and internal factors, and each process flow is elaborated in the subsequent paragraphs.

Dataset Formulation for HCR

There are several publicly available datasets that can be used for handwritten character recognition research and development. Here are some popular datasets:

  • The Char74k : The Char74k is a popular benchmark dataset for handwritten character recognition system. It consists of images of isolated characters from different fonts and styles. The dataset includes characters from the English alphabet (A-Z, both uppercase and lowercase), as well as digits (0-9) and some special characters.

  • MNIST: The MNIST is also widely used datasets for handwritten digit recognition. It includes of 70, 000 images data of handwritten digits \((0-9)\) in a grayscale format..

  • EMNIST: The Extended MNIST (EMNIST) includes both digits and alphabets. It provides a collection of 280, 000 images data, covering both uppercase and lowercase letters. [6].

  • CEDAR: The CEDAR dataset consists of handwritten samples from various sources, including forms, postal addresses, and bank checks. It contains both isolated characters and segmented words or lines, providing a diverse set of handwriting samples.

  • NIST Special Database: The NIST Special Database 19 is a collection of scanned handwritten characters from thousands of writers. It includes digits (0-9), uppercase and lowercase letters, and special characters. The dataset is designed to evaluate the performance of handwriting recognition systems.

  • IAM Handwriting Database: The IAM Handwriting Database contains handwritten English texts from different writers. It includes more complex and realistic samples with variations in writing styles and word context. The dataset provides approximately 1,000 pages of handwritten text. [19].

These datasets can serve as valuable resources for training and evaluating handwritten character recognition systems. They offer a range of variations and challenges commonly encountered in real-world scenarios.

The database of English Handwritten Character is initialized by DB that is exploited to extract relevant information from the database. The dataset contains different styles, fonts, sizes, etc., because of the dissimilarity of other writers. It involves information including alphabets- lower case and upper case, numbers that are written in different styles such as \( db_{1} ,db_{2} ,db_{3} , \cdots ,db_{n} \) are expressed as in Eq. 1,

$$ DB = db_{1} + db_{2} + db_{3} + \cdots + db_{n} $$
(1)

The collective set of scanned images is taken from the dataset with strained situations such as the same character font and its homogenous background. Smartphones and standard cameras can be used to capture and store images. These data are fed into the preprocessing stages to give out accurate results are discussed below.

Preprocessing of Images

The main objectives of preprocessing is that improving the class of the scanned input images and removing the unwanted distortion making it possible for promoting the processing stage to next level [24].

Fig. 2
figure 2

Preprocessing steps

Figure 2 explains the preprocessing stages for removing the undesirable data in the characters, which support extracting accurate information.

Feature Extraction and Vector Selection Process

The features are an essential representation of the information extracted from the handwritten image in English handwritten documents. This information should have been identical characteristics of the character or the word, making it different from another. The features in the images are designated to extract meaningful information that uniquely recognizes the text. It is hard to get meaningful features due to the complex degree of irregularity and lacking exactness in handwritten characters. The character contours, solid digital characters, weakened (skeletons sentence), or gray-level sub-images are character variations. All these variations of every single character can be identified by using a combined analysis of HICA with HFPSO, which assumed that each separate data series is a combination of many statistically separate source letters. The solution is to find unknown sources without the mixing conditions. The integration of HICA and HFPSO used to obtained diagonal and directional extraction. It shows that the resulting set of 144 features has 96 directional and 48 diagonal features.

Harmonized Independent Component Analysis (HICA)

The objective of this technique is to find the non-Gaussian data in linear representation are statistically independent. Non-Gaussian information ensures not to follow a normal distribution. The flowchart for Harmonized Independent Component Analysis (HICA) is as shown in Fig. 3.

Fig. 3
figure 3

Flowchart for harmonized independent component analysis (HICA)

The linear combination of n independent constituent such as \( y_{1},y_{2},\cdots , y_{n} \) can be observed in statistical ‘latent variables’ model in Eq. 2.

$$\begin{aligned} y_{i} = u_{i1} x_{1} + u_{i2} x_{2} + \cdots + u_{in} x_{n} \text {for all i} \end{aligned}$$
(2)

When the ICA model is released with time index t, We assume two components as, random variable \( u_{i} \) and the independent components \( x_{i} \). If the observable values \( y_{i}(t) \) are zero, then the zero-mean model can be used.

Particle Swarm Optimization (PSO)

PSO is based on the movement or actions of the flock of birds or groups of fish; discovered by Eberhart and Kennedy inspired by. Birds. A group of flies in each particle with a velocity of a search domain tries to achieve the best velocity according to its own previous (pbest) and its global (gbest) best flying experience. This method’s merits are its simplicity compared to other optimization techniques [25]. For adjustment, very few parameters are required. The flowchart is as shown in Fig. 4.

Fig. 4
figure 4

Flowchart for particle swarm optimization (PSO) algorithm

Let \( Y_{i} \) be a position and \( V_{i} \) be a particle’s velocity is initialized, and the fitness value is evaluated depending upon the particle position. Finally, the swarms are moved into a new position using Eq. 3 and 4.

$$\begin{aligned} v_{i}(i+1)= & {} \omega \times v_{i}(i) + d_{1} \times \phi _{1} \times (Pbest - Y_{i}(i)) + D_{2}\times \phi _{2} \times (Pbest - Y_{i}(i)) \end{aligned}$$
(3)
$$\begin{aligned} Y_{i}(i+1)= & {} Y_{i}(i) + V_{i}(i+1) \end{aligned}$$
(4)

In this algorithm, the variance is implemented by receiving the local optima & avoid premature convergence. The optimization becomes more complex due to increase in variable size and decreases the probability of finding global optimum. These are the drawbacks of PSO.

Firefly Algorithm (FFA)

This is inspired by fireflies, which are capable of making flashes to attract prey. It makes short flashes and rhythmic sounds. For a specific kind, the flashlight is unique. The purpose of fireflies is for hunting, communicating, and warning their enemies with their chemical light attractiveness [24]. The flowchart for Fireflies algorithm is as shown in Fig. 5.

Fig. 5
figure 5

Flowchart for fireflies algorithm

Inverse-square law states that the distance in between a light and an object is equal to the distance in between them. When the air absorbs the light, its intensity goes down, which makes the distance increase. The reason fireflies communicate at a fair distance is that they’re communicating with a limited distance of about a hundred meters. The nature-inspired Firefly optimization (FF) is considered a new population-based algorithm introduced.

According to this law, the intensity J(r) at distance ‘r’ from source \( m_{s} \) is expressed as in Eq. 5

$$\begin{aligned} J ( r ) = m_{s} / s^{2} \end{aligned}$$
(5)

The constant coefficient of light absorption is obtained using Gaussian concepts as in Eq. 6 This is referred ‘t’ as a attractiveness venues that firefly at a distance ‘r’.

$$\begin{aligned} C ( r ) = C_{0} * e^{\gamma .r^{2}} \end{aligned}$$
(6)

Where, \(C_{0}\) is attractiveness at distance \(r = 0\).

Let us consider there are two fireflies i and j with positions \( Y_{i} \) and \( Y_{j}\), respectively. So, to calculate distance between them Euclidean function is used as Eq. 7.

$$\begin{aligned} s_{ij} = \sqrt{(y_{i} - y_{j})^{2} - (z_{i} - z_{j})^{2}} = \Vert Y_{i} - Y_{j}\Vert \end{aligned}$$
(7)

For a new position \( Y_{i} \), makes a movement toward i as a less brighter firefly and j as a more brighter firefly can be calculated in Eq. 8

$$\begin{aligned} y_{i} = y_{i} + C_{0} * e^{\gamma .r_{i,j}^{2}} (Y_{j} - Y_{i}) + a.\epsilon _{i} \end{aligned}$$
(8)

where, \( \epsilon _{i} \) is a random variables vectors.

Particle Swarm Optimization is a straightforward, efficient global search method. But it suffers from a low or premature convergence problem, making it challenging to recognize the particle in the global area. The Fireflies algorithm is used to eradicate those problems. It has a high convergence of speed. The term high convergence is referred to as quickly searching the particle in a local search space. So by concluding these statements, the fireflies offer very efficient results compared to PSO. This HFPSO approach used in this HCR concept recognizes the character with high convergence to find the globally optimal result of feature vectors.

Hybrid Fireflies Particle Swarm Optimization (HFPSO) Algorithm

Feature optimization of HCR in English language configurations uses HFPSO. The enhanced HFPSO feature is set as an input to the NNP classifier. Initially, the local search of FF is calculated with mixed characteristics of PSO as expressed in Eqs. 9,  10 and  11

$$\begin{aligned} s_{px}= & {} \sqrt{ \sum _{j=1}^{d} [pbest_{(i,j)} - y_{(i,j)}]^{2}} \end{aligned}$$
(9)
$$\begin{aligned} s_{gx}= & {} \sqrt{ \sum _{j=1}^{d} [gbest_{(i,j)} - y_{(i,j)}]^{2}} \end{aligned}$$
(10)
$$\begin{aligned} y_{i} (t+1)= & {} xY_{i}(t)+d_{1}e^{-rpx^{2}} (pbest_{i}-Y_{i}(t)) \nonumber \\{} & {} +d_{2}e^{-rgx^{2}} (gbest_{i}-Y_{i}(t))+a \epsilon (i) \end{aligned}$$
(11)

The important purpose of HFPSO algorithm is to achieve reliable results even when dealing with limited function evaluations. In this context, the convergence speed plays a crucial role, particularly in the early iterations. Compared to other algorithms, Particle Swarm Optimization (PSO) demonstrates better convergence performance. The velocities of particles are utilized to compute the subsequent positions, enabling an optimal search by considering the velocity values of different particles. On the other hand, the Fireflies (FF) algorithm lacks a velocity characteristic, leading to easy attainment of global optima but posing a practical challenge. Additionally, the FF algorithm lacks parameters to utilize the past best positions of every firefly, causing fireflies to get without considering their past best positions.

Here the hybrid approach combining HFPSO algorithms is proposed to enhance the search capabilities. This combination establishes a balance between exploitation and exploration. Unlike particles, Fireflies lack velocity (V) with personal best position (pbest). The novelty lies in the hybridization of the Firefly Algorithm (FFA) with the PSO operator for global search and the utilization of local search, which enables fast convergence in exploration. FFA contributes to fine-tuning exploitation, making it suitable for incorporating local search. Initially, the input parameters are provided for both algorithms, followed by the random generation of uniform particle vectors within predefined vectors. Subsequently, the global best particle (gbest) and local best particles (pbest) are analyzed and set. If particle has an advancement over its closest value in very last iteration conferring to Eq. 11. Then present position is kept in variable \( (X_{i}, temp) \), and next (new) position is calculated with velocity as per Eq. 13 and  14.

$$\begin{aligned} x= & {} x_{i} - ((x_{i}-x_{f}) / iteration_{maxi}) \times iteration \end{aligned}$$
(12)
$$\begin{aligned} h(i,t)= & {} {\left\{ \begin{array}{ll} true, &{} \hbox { if fitness}\ (particle_i^t) \le gbest^{(t-1)} \\ false, &{} \hbox { if fitness}\ (particle_i^t) > gbest^{(t-1)} \end{array}\right. } \end{aligned}$$
(13)
$$\begin{aligned} y_{i} (t+1)= & {} y_{i} (t) + C_{0} * e^{ \gamma * r_(i,j)^{2}} * y_{i}(t) - gbest^{t-1} + a \epsilon _{i} \end{aligned}$$
(14)

In this hybrid structure, the light attraction risk of every fly (\(C_{0}\)) is neutralized by the PSO algorithm, and a molecules are randomly drawn in relation to the best position in the search space. The PSO algorithm can also be modified to consider the attractive characteristics of FFA in different areas of the search space (local search a). Therefore, the PSOFFA-SVR takes care of the model optimization issues by taking advantage of the strategies of fireflies.

$$\begin{aligned} w_{i}(t+1) = y_{i}(t+1) - y_{i_{temp}} \end{aligned}$$
(15)

In the proposed algorithm, when a resultant particle has a fitness value that is better or equal to the previous global best (gbest), a local search is initiated using an imitative Firefly Algorithm (FFA). On the other hand, if the fitness value of the particle is worse than the gbest, the particle is moved to the Particle Swarm Optimization (PSO) phase, where it continues with the standard procedures alongside other particles. This algorithm incorporates a maximum number of fitness function evaluations (MaxFES), which is a commonly used criterion to determine the maximum computational effort for objective functions in evolutionary computing. To balance the exploration and exploitation in the PSO phase, an inertia weight parameter (w) is utilized. This parameter helps control the velocity of particles and affects their movement in the search space. A linearly decreasing value of ’w’ is calculated according to the following Eq. 15. By implementing these strategies, the algorithm aims to optimize the fitness values of particles and find the global best solution within the given computational constraints.

Once the features are extracted, the globally optimized solution of characters is obtained. The data is then classified using the Novel Naïve Propagation classifier. In this process, the Neural Network recursively checks the characters and features for each propagation instance until an accurate result is achieved. However, this approach requires a substantial amount of training data, resulting in increased computational time. This limitation is one of the drawbacks of Feed-forward Neural Networks (FFNN). To overcome these challenges, the Naïve Bayes classifier is introduced. It requires less training data for character and feature classification, making it faster and more accurate compared to FFNN. Additionally, the Naïve Bayes classifier can predict results even in situations with ambiguous features in the training set. Combining the strengths of FFNN and Naïve Bayes, the innovative classifier known as Novel Naïve Propagation is introduced, offering improved performance and efficiency.

Classification Model

Feed-forward Neural Networks

For pattern recognition, the artificial neural network (ANN) concept is labeled in English handwriting characters. The idea of NN is explained massively as a parallel computing system with many interconnections involving a vast number of simple processors. In the Neural network model, the nodes represent the artificial neurons, and directed edges with corresponding weights represent the link between inputs to output neurons. The feed-forward network includes Radial-Basis Function (RBF) and multilayer perceptron (MLP) network. These networks are arranged into layers and are unidirectional. The network performs a learning process that brings the network architecture up-to-date with connection weights, regarding the network achieves a specific handwritten character recognition task effectively.

A neural network provides a nonlinear combination of feature extraction using the number of hidden layers and classification by a multilayer perceptron. Some of the advantages of using neural networks are their ability to self-organize and develop adaptive learning techniques. Pattern recognition aims to solve new instances’ problems by using a set of sample solutions. In feed-forward networks, it uses a sample solution named a training set, which relates the actual input with the training set to compute the expected output values. An error function is analyzed by using the training set. The error generates an expected output value that corresponds with the difference between the actual output from the given inputs within the network.

A typical example of an error function is squaring the difference between desired and actual output, summing over all outputs, and adding overall patterns in the training set. By adjusting the parameter value, the learning process minimizes the value of the error function. Feed-forward Neural Network (FFNN) would be used to reconstruct the input patterns and make them free from error, increasing the neural network performance.

The Bias or threshold value is given along with constant input 1 for example \( x_{0}=1 \) and \( w_{0}=0 \), usually in the beginning itself the weights are randomized. The basic information processing unit in neural network is neuron. Equation 16 represents the input neuron with weight as \( x_{1}, x_{2}, x_{3},..., x_{n} \), and \( w_{1}, w_{2}, w_{3},..., w_{n} \), respectively. An adder function computes the weighted sum as Eq. 16

$$\begin{aligned} v = \sum _{j=1}^{m}[ w_{j} * x_{j}] \end{aligned}$$
(16)

The activation function is expressed in Eq. 17 for controlling the amplitude of the neuron output with bias,

$$\begin{aligned} y = \psi (v+b) \end{aligned}$$
(17)

where, Eqs. 18 and 19 shows values of v and b.

$$ v = \sum\limits_{{j = 1}}^{m} {w_{j} } x_{j} b = w_{0} $$
(18)

The expression for sigmoid function is given by Eq. 19

$$\begin{aligned} y = f(x) = \frac{1}{ (1+ e^{-k*x})} \end{aligned}$$
(19)

Where k is the constant

Fig. 6
figure 6

The neural network architecture

The supervised learning process is a commonly used method for learning neural network architecture (Fig. 6). This process involves moving a pattern through a hidden layer network, which then carries out computation until it reaches the output layer. If the pattern is correctly classified, and compared with the input; provides the correct output values. Due to the comparison of the output values of all the connections, the output values for the correct category are a little higher than they were before. The variation between the actual and expected output is achieved by modifying the connection weight using the Backpropagation learning algorithm, which is propagated backward from top to bottom.

Backpropagation Neural Network

This is the popular algorithms in supervised learning, which performs pattern recognition tasks based on recurrent neural networks. The BP algorithm is commonly used for carrying out multi-layer perceptron operations. It provides a generalized delta rule. Also multi-layer network transmission network training to achieve anonymous work, based on other training data involving pairs \( (x, z )\in A \) When x is the input vector and represents the required output vector training set A. The purpose of the development or reduction function is defined by the number of errors is not a quick square as Eq. 20:

$$ E_{p} = \left( {\frac{1}{2}} \right)\sum\limits_{{n = 1}}^{n} {(T_{n} - A_{n} )^{2} } $$
(20)

where,

\( T_{n} \) is target output pattern vector for the pattern P

\( A_{n} \) actual output pattern vector for the pattern P.

Its purpose is to reduce the output error.

Naive Bayes Classifier

This classifier provides supportive outlook for formulating and estimating several machine learning algorithm. It predict faster than the logistics regression neural network. Naïve Bayes is a part of Bayesian classification, which explicitly calculates the probability distribution hypothesis and its input file is a strongly built noise. The model of conditional probability function classified by a vector instance in Eq. 21

$$\begin{aligned} P(C_{k}\mid x_{1}, x_{2},..., x_{n}) \end{aligned}$$
(21)

The only problem occur in the above expression is that, when n is large and its value is oversized, so it should be impossible to calculate the probabilistic function. To overcomes the above problem, we use a Bayes theorem with conditional probability as Eq. 22,

$$\begin{aligned} P(C_{k}\mid X) = P(C_{k}\mid X) / P(X) \end{aligned}$$
(22)

The above equation can be rewrite as Eq. 23

$$\begin{aligned} Posterior = Prior likelihood / evidence \end{aligned}$$
(23)

Interestingly tells about the numerator part, it contains only fractional value apart from the denominator regulates only the constant integer that does not depends upon C and feature \( F_{i} \) values.

The joint probability model is same as the numerator in this context as Eq. 24

$$\begin{aligned} P(C_{k}, x_{1}, x_{2},..., x_{n}) \end{aligned}$$
(24)

By the chain rule method frequently used in conditional probability is written as Eq. 25

$$\begin{aligned} P(C_{k}, x_{1}, x_{2},..., x_{n}) = P(C_{k})P(x_{1}, x_{2},..., x_{n}\mid C_{k}) \end{aligned}$$
(25)

In Naive Bayes, feature \( F_{i} \) is provisionally independent on every other features \( F_{j} \)

When, \( j \ne i \)

$$\begin{aligned} P(X_{i}\mid C_{k}, X_{j})\,= \,& {} P(X_{i},C_{k}) \end{aligned}$$
(26)
$$\begin{aligned} P(X_{i}\mid C_{k}, X_{j},X_{k})\,= & \,{} P(X_{i}\mid C_{k}) \end{aligned}$$
(27)
$$\begin{aligned} P(X_{i}\mid C_{k}, X_{j},X_{k},X_{i})\,= \,& {} P(X_{i}\mid C_{k}) \end{aligned}$$
(28)

when, \( i \ne j \),

$$\begin{aligned} \begin{aligned} P(C_{k,i}\mid X_{1},X_{2},..., X_{j}) \\ \propto P(C_{k}, X_{1},..., X_{n}) \\ \propto P(C_{k}) P(X_{1} \mid C_{k}) P(X_{2} \mid C_{k}) P(X_{3} \mid C_{k}) \\ \propto P(C_{k})\prod _{i=1}^{n} P(X_{i} \mid C_{k}) \end{aligned} \end{aligned}$$
(29)

Finally the distribution of conditional probability over C is given by,

$$\begin{aligned} P(C_{k,i}\mid X_{i},..., X_{j}) = \frac{1}{Z}* P(C_{k}) \prod _{i=1}^{n} P(X_{i} \mid C_{k}) \end{aligned}$$
(30)

Where Z is a scaling factor. Finally the Novel Naïve Propagation classifier is proposed with finite amount of training set to obtain the result more accurate handwritten character recognition than BPNN in less computational time.

Result and Discussion

The proposed handwritten English character is accurately recognized by using some innovative techniques such as HICA with HFPSO (feature extraction) and Novel Naïve Propagation Classifier which generate a better result of character.

Dataset Description

Dataset considered here are Chars74K, EMNIST dataset, CEDAR dataset, NIST dataset and MSRA dataset.

  • In Chars74K, it includes 64 types (A-Z,0-9 and a-z),7705 characters gained from ordinary images, characters of 3410 are drawn from hand taken using tablet PC, 62992 characters from machine fonts, 5000 training images and 2705 testing images.

  • The EMNIST dataset consists of 5035 training set images (9912422 bytes), training set labels (28881 bytes) and 2048 testing set images (3620652 bytes), test set labels (4542 bytes) [6].

  • CEDAR dataset contains total image of 4893 out of these 3455 data for the training and 1438 data the for testing.

  • NIST dataset contains total image of 4800 out of these 3600 images for the training set & 1200the images for testing set.

  • MSRA dataset contains total image of 500 images, splitted as 300 for the training and 200 for the testing [19].

The image resolution ranges from \( 1296 \times 864 \) pixel to \( 1920 \times 1280 \) pixel [23].

Performance Analysis

Performance metrics provide a means to evaluate the accuracy and efficiency of a system. In our proposed system, we consider several criteria to assess its performance, including accuracy, recognition rate, sensitivity, and specificity. The accuracy metric measures the overall correctness of the system’s predictions. It indicates the proportion of correctly classified instances out of the total number of instances. A higher accuracy score suggests better performance. Recognition rate, also known as the true positive rate, measures the system’s ability to correctly identify positive instances or samples belonging to a specific class. It quantifies the percentage of true positive predictions out of all actual positive instances. Sensitivity, also referred to as the true positive rate or recall, measures the system’s ability to correctly detect positive instances relative to the total number of positive instances. It represents the proportion of true positives correctly identified by the system. Specificity, on the other hand, measures the system’s ability to correctly identify negative instances or samples not belonging to a specific class. It quantifies the percentage of true negative predictions out of all actual negative instances. In our proposed system, the final recognition performance is achieved using the Novel Naïve Bayes classifier. It is observed that this classifier significantly reduces computational complexity (CC) associated with the recognition task. This reduction in CC implies that the system is capable of achieving accurate results with improved computational efficiency as in Eq. 31.

$$\begin{aligned} CC = \sum _{j=1}^{NC} (ns_{i} \times nc_{i})_{l} \end{aligned}$$
(31)

Where,

CC: Computational Complexity

\(ns_{i}\): number of handwritten documents

\(nc_{i}\): number of recognized characters

Simulation result for preprocessed images

The English handwritten optical characters of training dataset are processed in preprocessing section that requires binarization, edge detection, smoothening and noise removal for the input scanned image as displayed in Fig. 7.

Fig. 7
figure 7

Preprocessed global threshold binarization

Initially, Binarization is performed to convert grayscale values into binary images, it will extract the image from background by linking the image values with threshold values as displayed in Fig. 8.

Fig. 8
figure 8

Preprocessed global threshold binarization

After performing binarization, the unwanted noise in the pictures are eliminated by using wiener filter. The smoothening process is done by median filter, respectively, which is drawn in Fig. 9.

Fig. 9
figure 9

Noise removal and smoothening used for wiener and median filter

The Canny edge recognition technique mentioned in Fig. 10 which is used in removing the edges in input English image, i.e., the unnecessary pixels get eliminated.

Fig. 10
figure 10

Edge detection using canny Edge detector

Harmonized ICA on the origin of firefly with PSO is the feature extraction novelty cited in this paper and its simulation result is presented in Fig. 11.

Fig. 11
figure 11

Feature extraction using harmonized independent component analysis based on firefly with PSO

The proposed strategy (HICA Based on FF with PSO) is to remove applicable feature for perceiving the English handwritten character. It enhance feature vector which manages the pertinent examples utilized for the classification of the samples in testing and furthermore serving thus input to NN for the preparation of the entire framework and design layered model utilizing delta function as an activation function. The feature vectors optimization result is simulated in Fig. 11.

Fig. 12
figure 12

Backpropagation neural network

The framework of training set utilizing BPNN which manages with the number of iteration. This method specifies to taken only 20 iteration out of maximum limit ranges from 1000 trained images, which shows the fast response and also robustness as shown in Fig. 12.

Proposed Comparison Evolution

The analysis result of extraction process is arranged in Table 1. It compares the resultant values with different parameter such as accuracy, Recognition Rate, sensitivity and specificity. Thus the parameter comprise the existing algorithm(ICA+PSO, ICA+FF) with proposed one(ICA+FF+PSO). Finally, the proposed method demonstrate improved efficiency than the existing approach.

Table 1 Feature extraction comparison with different parameter

While using extracted feature vectors of Handwritten Character Images, the classification task(various neural networks) is the further process to investigate the accuracy and time taken for training and testing set of images are tabulated in Table 2.

Table 2 Performance Analysis of existing and proposed methodology

In this methodology, various parameters such as the number of datasets, training time, testing time, training accuracy, testing accuracy, and classification accuracy are compared. The proposed method employs the Novel Naïve Propagation Classifier for the classification section. Through the analysis of these parameters, it is evident that the proposed technique achieves finer results compared to existing networks.

The table below illustrates that the Nearest Neighbor (NN) approach yields lower accuracy in character recognition compared to other NN models, while the Radial Basis Function (RBF) NN demonstrates relatively higher accuracy. In previous studies, the Backpropagation Neural Network (BPNN) was commonly used for classification, which often required multiple training iterations and constant adjustments of learning rates and hidden nodes. This resulted in less precise results and increased computational time. These limitations associated with using BPNN alone are addressed by incorporating the Novel Naïve Propagation classifier.

Finally, the Novel Naïve Propagation classifier is proposed, which utilizes a finite amount of training data to achieve more accurate handwritten character recognition compared to BPNN, while also reducing computational time.

Recognition accuracy for different alphabetic characters by our proposed Novel Naive Propagation Classifier is shown in Table 2. Some of the characters like c, o, d, q and I, J, T are having the same recognition accuracy, because these letters may overlap with others because of their visual similarity with the writing style and so on as mentioned in Table 3.

Table 3 Recognition accuracy of different alphabets

Figure 13 discuss the performance measure of existing and proposed classifier concept. These methodology compares different parameter like number of data Set, Training Time, Testing Time, Training accuracy, Testing accuracy and Classification Accuracy.

Fig. 13
figure 13

Comparative analysis of training time and testing time on various data set

The proposed method used for classification section is Novel Naïve Propagation Classifier. By analyzing all the above results, the proposed technique express better result compared to existing network. The dataset descriptions are discussed below in Fig. 14. Compared with all other database, the Chars74K and CEDAR images produce greater performance in recognition ratio, sensitivity, specificity and accuracy parameters. After that the time is reduced for the training data from Char74K dataset and testing from database CEDAR.

A system for recognizing English handwritten characters was presented. The system was developed using the HFPSO. Both the training and testing were done using our proposed Classifier. The performance was evaluated based on Recognition Ratio\( 98.65\%\), sensitivity \(97.68\%\) and specificity \(97.23\%\) for feature extraction technique and proposed classifier FFBP compared with different parameter Accuracy \(97.69\%\), sensitivity \(98.65\%\) and specificity \(97.36\%\) and Recognition Ratio \(98.86\%\).

Fig. 14
figure 14

Public dataset compared with different parameters

Most of the works utilized Convolutional Neural networks. When CNN is trained, then the image recognition will be accurate, but they take a longer training time for the larger dataset sample.

Our proposed algorithm attains a quite practical recognition rate of \(98.65\%\), which is comparatively lower than these existing methodologies. Even though our proposed methodology achieved this recognition rate with less computation time for the handwritten characters.

Conclusion

This study focuses on the challenging task of handwritten character recognition (HCR). Various methodologies and techniques have been explored to improve the accuracy and efficiency of HCR systems. The proposed approach incorporates the combination of HFPSO algorithms for effective search capabilities. This hybridization balances exploitation and exploration, leading to reliable results even with limited function evaluations. The use of Particle Swarm Optimization (PSO) contributes to better convergence, while the Firefly Algorithm (FFA) enhances fine-tuning exploitation. Furthermore, the integration of the Novel Naïve Propagation classifier in the classification stage demonstrates superior performance compared to existing networks. The performance evaluation is based on metrics such as Recognition Ratio, sensitivity, and specificity, taking into account the feature extraction technique and the proposed classifier. This classifier combines the strengths of Feed-forward Neural Networks (FFNN), Backpropagation Neural Network and the Naïve Bayes classifier. It achieves accurate recognition with less training data and reduced computational time. Through comprehensive evaluations and comparisons, it is evident that the proposed technique outperforms existing approaches as classification accuracy, training and testing time, and overall performance. The methodology presented in this study provides a promising solution for the accurate recognition of handwritten characters. Overall, this research contributes to the advancement of handwritten character recognition systems, addressing the challenges posed by external and internal factors. The proposed methodology and the Novel Naïve Propagation classifier pave the way for more accurate and efficient HCR systems, with potential applications in various domains such as document processing, digitization, and automated data entry.