1 Introduction

Image processing domain has come a long way and as time has passed each of its various research domains [18, 36, 37, 40] brought novel challenges [19, 38, 39]. Handwriting recognition is one such domain. Handwriting recognition has become popular from the past decade due to the need of automation of handwritten forms and texts that are being filled everyday at railway counters, banks, post offices, educational institutions, and for application of jobs. The drastic need for performing research and development in various aspects of a handwriting recognition system is severe, especially for a developing and multilingual country like India. A handwritten character recognition system encompasses four components, viz. preprocessing, segmentation, feature detection and extraction, and classification [8, 26]. The preprocessing component hones the text, utilising various strategies in order to increase the accuracy at the segmentation level. Due to different reasons, like feeding document into a scanner, or sometimes individuals tend to add skew in text (downwards or upwards) while writing, etc., skew present in most documents can vary between ± 30. Most of the segmentation algorithms work best in ideal cases, i.e., when no skew is present. Presence of a skew estimation and correction strategy at the preprocessing phase helps segmentation algorithms to achieve better result. An example of presence of skew in handwritten text is shown in Fig. 1.

Fig. 1
figure 1

An example of multiple skew present in text

Skew estimation and correction is addressed at two levels:

  • For correcting skew present in text lines of a handwritten text document,

  • For correcting skew present in words of a text line extracted from a multi-oriented handwritten text document.

A diverse amount of methodologies have been presented in the literature to estimate and correct skew present at text line level of document images [2, 5, 6, 15, 22, 31, 33, 41]. But, the same has not reflected at word level. Presence of cursive nature makes the task difficult for Indian regional languages [1]. Also, the stroke styles of characters are different for different scripts, as such the script itself arrives as a very challenging obstacle [14]. Bhowmik et al. [4] have used modified Hough transform based method for correcting skew in handwritten Bangla word images. Roy et al. [29] have illustrated a methodology that utilises the angle created between two successive characters to estimate and correct skew present in handwritten Bangla words. Jayadevan et al. [11] have used Radon transform for correcting skew present in handwritten words. They have experimented on handwritten Devanagari legal words. Malakar et al. [20] have delineated a generalized Hough transform based method for skew detection and correction in handwritten Bangla words. Ghosh and Mandal [7] have defined a method where they divide a word based on its bounding box. This is followed by calculation of the center of gravity at both parts of word. The slope created by the centers of gravity is considered as the skew present in the word. They experimented on Bangla handwritten words. Guru et al. [9] have proposed a methodology that uses an ellipse for encapsulating a handwritten word image. The slope of the major axis of the ellipse is considered as the skew present in the word. They experimented on multilingual Indian documents. Jundale and Hegadi [12] have delineated the use of Hough transform for performing skew correction of handwritten Devanagari words. Further, they [13] have used a parallel axes based linear regression based strategy for correcting skew in handwritten Devanagari words. Guru et al. [10] have extracted the contour of a word image. This is followed by extraction of line segments based on small eigen values. They have further applied K-means clustering for extracting the head line present in Devanagari words. Finally, they estimate skew based on the extracted head line. Pramanik and Bag [25] have proposed a linear regression based strategy to correct skew in Bangla and Devanagari handwritten words but with limited capability. Kar et al. [14] have used a rectangular mask to detect the core region of a word, followed by linear regression and skew correction. A detailed overview of the aforementioned works is provided in Table 1.

Table 1 Existing works on skew estimation and correction of handwritten words for Indian languages

Based on our observation from the literature, we found the following limitations or challenges on skew correction of handwritten words:

  1. M1:

    In present literature, works have been carried out by directly imposing linear curve fitting on words. We observed that, if we use the structural properties of the handwritten words before employing linear curve fitting, then it may provide better results. To the best of our knowledge, none of these types of works have utilized the structural knowledge of handwritten words. (e.g. [13]).

  2. M2:

    Most reported works fail when the skew orientation is greater than ± 25. (e.g. [4, 14, 29]).

  3. M3:

    Few other works fail when the m\(\bar {\mathrm {a}}\textit {tr}\bar {\mathrm {a}}\) (also known as headline) is absent or discontinuous. (e.g. [20]).

  4. M4:

    Absence of skew detection limits a method’s capability of handling skewed text. (e.g. [16, 32]).

  5. M5:

    Pramanik and Bag [25] fails at times to distinguish eligible from ineligible pixels required to estimate the regression line.

Keeping the aforementioned limitations in mind, we present a method that provides the following solutions:

  1. C1:

    Based on the structural knowledge of the languages under consideration, the proposed method extracts a group of eligible pixels and employs linear curve fitting for estimation and correction of skew present in Bangla, Hindi, Marathi, and Punjabi handwritten words.

  2. C2:

    The proposed method is capable of handling high skew to an extent of ± 55.

  3. C3:

    The proposed method works even when the m\(\bar {\mathrm {a}}\textit {tr}\bar {\mathrm {a}}\) is mostly absent or discontinuous.

  4. C4:

    Moreover, we have used an existing segmentation-based classification strategy to show the efficacy of the proposed method when compared with non-skew-corrected words as baseline.

  5. C5:

    The proposed work is able to distinguish efficiently between eligible and ineligible pixels which is a limitation for [25].

In the past few years, Convolution Neural Networks (CNNs) have widely evolved and being used towards improving the performance of various image processing and multimedia research domains. However, CNNs require considerable training data and energy consumption. In addition, when the training data is limited, the methods may cause a cross-learning problem. So, there is still research space for model-based approaches for image segmentation, which are more cost efficient, energy efficient and space efficient. As such, to identify the effectiveness of our proposed method, we have also focussed towards the feature extraction and recognition part. For correct recognition, selection of correct feature techniques plays a crucial part [17, 21, 35, 42]. We used structural features delineated in [28] and MLP and SVM for classification.

The paper is systematised as follows: A detailed description of the proposed methodology is provided in Section 2. A delineation of the experimental results and their corresponding analysis is presented in Section 3, followed by a brief conclusion in Section 4.

2 Proposed methodology

We propose a strategy that detects and corrects skew present in Bangla, Hindi, Marathi, and Punjabi handwritten words. A complete working model of the entire approach is shown in Fig. 2.

Fig. 2
figure 2

Work flow of the entire proposed methodology with an example

2.1 Preprocessing

Given a m\(\bar {\mathrm {a}}\textit {tr}\bar {\mathrm {a}}\)-based multilingual document image, we utilise the method depicted in [30] to extract the text lines. This is followed by word extraction (Fig. 2a). For each extracted word image (Iq), we perform component labelling and noise cleaning on Iq and remove all components below a certain threshold, υ. Here, we consider υ as 30 [24]. We crop this noise cleaned image Iq to its boundaries (Fig. 2b).

2.2 Skew estimation and correction

Here, Iq having dimension m × n is taken as input. The k of the n columns in Iq are chosen as 12% of the width of Iq consecutively (Fig. 2c). We experimented on a set of 500 randomly chosen images and surmised 12 to be the optimal percentage of selecting columns in order to obtain the best result. A validation for the aforementioned conclusion is provided in Section 3.2. These k selected columns are denoted as \({\mathscr{L}}~=~<c_{1},c_{2},\cdots ,c_{k}>\). Algorithm 1 is used for admissible pixel identification for skew estimation and correction. Each column in \({\mathscr{L}}\) is consecutively traversed from top to bottom and the first encountered foreground pixel is stored in \(\mathcal {P}\) (Alg. 1, Steps: 2–6) (Fig. 2d). The stored pixels in \(\mathcal {P}\) are denoted as \(\mathcal {P}~=~<p_{1},p_{2},\cdots ,p_{l}>\), where lk. Each pixel pj in \(\mathcal {P}\) associates with a row number and a column number (pj(r), pj(c)). Three sets viz., \(\mathcal {A} \), \(\mathcal {A}^{\prime } \), and \(\mathcal {T} \) are used to represent pixels in \(\mathcal {P} \) as admissible, inadmissible, and transitional, respectively. \(\mathcal {A} \) constitutes pixels that are admissible for further skew correction. \(\mathcal {A}^{\prime }\) constitutes pixels that are inadmissible for further computation and will be removed from \(\mathcal {P} \). \(\mathcal {T} \) constitutes pairs of pixels that are provisionally kept here before examining their belongingness in \(\mathcal {A} \) or \(\mathcal {A}^{\prime }\). For every three successive pixels pj, pj+ 1, and pj+ 2 in \(\mathcal {P}\), the angle \(\angle p_{j}p_{j+1}p_{j+2}\) (denoted as 𝜃l) is computed. If 𝜃l≤ 165, then \(\lvert p_{j}(r)-p_{j+1}(r)\rvert \) and \(\lvert p_{j+1}(r)-p_{j+2}(r)\rvert \) are evaluated. A validation for choosing 165 as optimal value is provided in Section 3.2. If \(\lvert p_{j}(r)-p_{j+1}(r)\rvert > \lvert p_{j+1}(r)-p_{j+2}(r)\rvert \), then (pj, pj+ 1) is considered as transitional pixel pair and stored in \(\mathcal {T} \). Otherwise, (pj+ 1, pj+ 2) is considered as transitional pixel pair and stored in \(\mathcal {T} \) instead (Alg. 1, Steps: 7–11). If a pixel pj in \(\mathcal {P} \) appears twice in two consecutive pairs in \(\mathcal {T} \) in a single iteration, then pj is transferred from the set \(\mathcal {T} \) to \(\mathcal {A}^{\prime } \), while the pixels paired with pj in \(\mathcal {T} \) are removed from \(\mathcal {T} \) (Alg. 1, Steps: 12–16). Once all the intermediate pixels get marked in a single iteration, the admissible pixels in \(\mathcal {A}\) are computed as \(\mathcal {A}\) = \(\mathcal {P}\) ∖ (\(\mathcal {T}~\cup ~\mathcal {A}^{\prime } \)) (Alg. 1, Step: 18).

figure a

For each pixel pair (pj, pj+ 1) in \(\mathcal {T} \), the row-wise difference, \(d_{p_{j}}\) and \(d_{p_{j+1}}\) of pj and pj+ 1 with every pixel in \(\mathcal {A}\) is computed. The maximum of the two differences \(d_{p_{j}}\) and \(d_{p_{j+1}}\) is evaluated as maxd. The pixel in the pair (pj, pj+ 1) that is associated with the maximum number of maxd is sent from \(\mathcal {T} \) to \(\mathcal {A}^{\prime }\), while the other is sent to \(\mathcal {A}\) (Alg. 1, Steps: 19–30). Once all the pixel pairs in \(\mathcal {T} \) are examined, the pixels belonging to \(\mathcal {A}^{\prime } \) are deleted from \(\mathcal {P} \) and \(\mathcal {A} \), \(\mathcal {T} \), and \(\mathcal {A}^{\prime } \) are all emptied (Alg. 1, Step: 31). This approach is carried out until no pixel gets represented in \(\mathcal {T} \) or \(\mathcal {A}^{\prime } \). The inadmissible pixels are removed from \(\mathcal {P} \) to ensure that the skew estimation does not get affected due to the presence of certain consonants and upper modifiers that appear above the headline and at places where a rift is formed due to the absence of the headline in a word (Fig. 2e). , , ,, and are few examples of consonants and upper modifiers that appear above the headline in Bangla script.

To illustrate the proposed approach, the skewed words and are used as working examples. The two words illustrate the two different conditions as explained above. Currently, we consider the word for illustrating the first condition. During first iteration, for the first three pixels p1, p2, and p3, the computed angle, i.e., \(\angle p_{1}p_{2}p_{3}\), is lesser than the specified threshold 165, i.e., \(\angle p_{1}p_{2}p_{3}\) (𝜃l) is ≤ 165 and \(\lvert p_{1}(r)\) - \(p_{2}(r)\rvert > \lvert p_{2}(r)\) - \(p_{3}(r)\rvert \). So, the pixel pair (p1, p2) is sent to \(\mathcal {T} \) (Fig. 3). Similarly, for the consecutive pixels p2, p3, and p4, the angle \(\angle p_{2}p_{3}p_{4}\), is lesser than the specified threshold and \(\lvert p_{2}(r)\) - \(p_{3}(r)\rvert \leq \lvert p_{3}(r)\) - \(p_{4}(r)\rvert \). As a result, pixel pair (p3, p4) is sent to \(\mathcal {T} \) (Fig. 3). Once all the elements in \(\mathcal {P}\) are examined and the first iteration completes, the elements in \(\mathcal {A}\) is computed as \(\mathcal {A}\)=\(\mathcal {P}\) ∖ (\(\mathcal {T} \cup \mathcal {A}^{\prime }\)). \(d_{p_{1}}\) and \(d_{p_{2}}\) of pixel pair (p1, p2) is computed with elements in \(\mathcal {A}\) and correspondingly, \(d_{p_{3}}\) and \(d_{p_{4}}\) of pixel pair (p3, p4) is computed with elements in \(\mathcal {A}\). It is concluded that for the first pair, p1 is associated with most # maxd and for the second pair, p3 is associated with most # maxd (Fig. 3). As a result, p1 and p3 are transferred to \(\mathcal {A}^{\prime }\) from \(\mathcal {T}\) and subsequently, p1 and p3 are removed from \(\mathcal {P}\) (Fig. 3). All the elements in \(\mathcal {A}, \mathcal {A}^{\prime }\), and \(\mathcal {T}\) are removed.

Fig. 3
figure 3

Stepwise illustration of inadmissible pixel removal delineating the first iteration of the first condition for skew correction

During the second iteration, for the three pixels p2, p4, and p5, the computed angle, i.e., \(\angle p_{2}p_{4}p_{5}\), is lesser than the specified threshold 165, i.e., \(\angle p_{2}p_{4}p_{5}\) (𝜃l) is ≤ 165 and \(\lvert p_{2}(r)\) - \(p_{4}(r)\rvert \leq \lvert p_{4}(r)\) - \(p_{5}(r)\rvert \). So, the pixel pair (p4, p5) is sent to \(\mathcal {T} \) (Fig. 4). Once all the elements in \(\mathcal {P}\) are examined and the second iteration completes, the elements in \(\mathcal {A}\) is computed as \(\mathcal {A}\)=\(\mathcal {P}\) ∖ (\(\mathcal {T} \cup \mathcal {A}^{\prime }\)). \(d_{p_{4}}\) and \(d_{p_{5}}\) of pixel pair (p4, p5) is computed with elements in \(\mathcal {A}\) and is concluded that p4 is associated with most # maxd. As a result, p4 is transferred to \(\mathcal {A}^{\prime }\) from \(\mathcal {T}\) and subsequently, p4 is removed from \(\mathcal {P}\) (Fig. 4). All the elements in \(\mathcal {A}, \mathcal {A}^{\prime }\), and \(\mathcal {T}\) are removed. During third iteration, no consecutive pixel with angle lesser than the specified threshold 165 is found (Fig. 5).

Fig. 4
figure 4

Stepwise illustration of inadmissible pixel removal delineating the second iteration of the first condition for skew correction

Fig. 5
figure 5

Stepwise illustration of inadmissible pixel removal delineating the third iteration of the first condition for skew correction

To illustrate the second condition, the word is used. Presence of the upper modifier in , puts the third encountered foreground pixel p3 much higher than the rest of the pixels in \(\mathcal {P}\) (Fig. 6a). As a result, during first iteration, when the angle for the pixels p1, p2, and p3 is computed, i.e., \(\angle p_{1}p_{2}p_{3}\), the angle is lesser than the specified threshold 165, i.e., \(\angle p_{1}p_{2}p_{3}\) (𝜃l) is ≤ 165 and \(\lvert p_{1}(r)\) - \(p_{2}(r)\rvert \leq \lvert p_{2}(r)\) - \(p_{3}(r)\rvert \). So, the pixel pair (p2, p3) is sent to \(\mathcal {T} \) (Fig. 6a). Similarly, the angle computed for the next three consecutive pixels p2, p3, and p4, i.e., \(\angle p_{2}p_{3}p_{4}\), is lesser than the specified threshold 165 and \(\lvert p_{2}(r)\) - \(p_{3}(r)\rvert > \lvert p_{3}(r)\) - \(p_{4}(r)\rvert \). So, the pixel pair (p2, p3) is sent to \(\mathcal {T} \). As the pair already exists in \(\mathcal {T}\), the current pair is discarded (Fig. 6b). Identically, the angle created by the next three subsequent pixels p3, p4, and p5 is lesser than 165. As, \(\lvert p_{3}(r)\) - \(p_{4}(r)\rvert > \lvert p_{4}(r)\) - \(p_{5}(r)\rvert \), the pixel pair (p3, p4) is sent to \(\mathcal {T} \). Pixel p3 appears in two consecutive pairs in \(\mathcal {T}\). As a consequence, p3 is transferred to \(\mathcal {A}^{\prime } \), while the two pixels associated with it, i.e., p2 and p4, are removed from \(\mathcal {T}\) (Fig. 6c). Eventually, p3 is removed from \(\mathcal {P}\) (Fig. 6d) and \(\mathcal {A}\), \(\mathcal {A}^{\prime }\), and \(\mathcal {T}\) are emptied. During second iteration, no consecutive pixel with angle lesser than the specified threshold 165 is found.

Fig. 6
figure 6

Stepwise illustration of inadmissible pixel removal delineating the second condition for skew correction

Next, predictive \(\hat {p_{i}}(r)\) values are computed utilising Algorithm 2 and Matlab’s polyfit function based on the pixels in \(\mathcal {P} \). For this purpose, we compute the mean values of rows (pi(r)) and columns (pi(c)) (Alg. 2, Step: 2–5). We compute two coefficients b0 and b1. b0 is the intercept that determines where the regression line to be computed intercepts the y-axis and b1 is the slope of the aforementioned line (Alg. 2, Step: 6–9). Finally, we compute the predictive \(\hat {p_{i}}(r)\) values utilising the aforementioned coefficients (Alg. 2, Step: 10–12). These predicted \(\hat {p_{i}}(r)\) values and pi(c) values (where i∈{1 \({\cdots } |\mathcal {P}|\}\)) are used to compute the regression line (Fig. 2f5, and 6e). The skewed angle is determined from the computed regression line (Figs. 2g). Finally, the image is rotated according to the estimated angle for de-skewing (Figs. 2h5, and 6f).

figure h

3 Experimental results and analysis

3.1 Dataset

We have employed ICDAR 2013 Segmentation Dataset [34] and PHDIndic_11 [23] dataset for performing skew correction of the word images. A total of 10,000 images are used to carry out the experiment. Apart from this, we have also used another set of 1000 word images for performing validation. All modules and codes used for implementation are written in MATLAB environment.

3.2 Parameter validation

Figure 7a delineates the validation of choosing 12% of the width of Iq as the optimal percentage for selecting columns in order to traverse uniformly distributed columns for skew estimation and correction. We have experimented on a set of 500 randomly chosen images and observed the surmised 12 to be the optimal percentage of selecting columns in order to obtain the best result.

Fig. 7
figure 7

a Validation delineating 12 as the optimal column width selection percentage for Iq; b Validation depicting 165 as the optimal value for examining if 𝜃l is eligible or not

For every three successive pixels pj, pj+ 1, and pj+ 2 in \(\mathcal {P}\), it is validated if the angle \(\angle p_{j}p_{j+1}p_{j+2}\) (denoted as 𝜃l) ≤ 165. We have randomly chosen 500 word images and performed validation and surmised 165 to be the optimal value (Fig. 7b).

3.3 Time complexity

The time complexity of Algorithm 1 depends on three main factors, namely change, \(\lvert \mathcal {T}\rvert \), and \(\lvert \mathcal {A}^{\prime }\rvert \). change is the number of iterations the algorithm runs until the sets \(\mathcal {T}\) and \(\mathcal {A}^{\prime }\) become empty. \(\mathcal {A} \) comprises of pixels that are eligible for further skew correction and \(\mathcal {T} \) comprises pairs of pixels that are provisionally stored before examining their belongingness in \(\mathcal {A} \) or \(\mathcal {A}^{\prime }\). So, the time complexity of Algorithm 1 can be approximated to O(change \( \times \lvert \mathcal {T}\rvert \times \lvert \mathcal {A}\rvert \)). Similarly, the time complexity of Algorithm 2 can be approximated as O(\(\lvert \mathcal {P}\rvert \)).

3.4 Experimental analysis

As the actual skew angle estimation of a particular word in an unconstrained environment is only possible by human beings, we have employed a semi-automated process to find the ground truth images and the corresponding angles of each word. We have used a recently developed method [25] to estimate the slope of each handwritten word. In case of erroneous cases, we have used traditional rotation operations to find the actual skew. The ground truth angle of each word is compared with the corresponding result of our proposed method as well as with other state-of-the-art methods. The root mean square (RMS) value of absolute error is determined by the following equation:

$$ E_{s} = \sqrt{\frac{{\sum}_{i=1}^{t}\left | g-x \right |^{2}}{t}} $$
(1)

where, g is the ground truth angle, x is the skew angle determined by the proposed method and t is the total number of words.

The proposed methodology has the lowest RMS error of 0.95 for Punjabi words while the highest error of 2.47 is recorded for Bangla words. In an ideal case, a word belonging to any of the four languages under consideration will contain a headline that connects the entire word. In such an ideal scenario, all the four languages will provide almost similar results for the proposed method. But, in general case, we have observed based on the writing of different individuals that the headlines are completely absent or very frequently disconnected in Bangla words. This is not the case for other languages. Our dataset similarly reflects the aforementioned general case. Due to the aforementioned characteristic of Bangla words, the performance of Bangla is not as good as other languages. The performance of our proposed method is delineated in Table 2. To show the efficiency of the proposed skew estimation and correction technique, we have synthetically rotated few handwritten word images and provided a visual and statistical analysis in Table 3. We have compared our proposed method with six recent works, namely Malakar et al. [20], Ghosh and Mandal [7], Jundale and Hegadi [12], Jundale and Hegadi [13], Pramanik and Bag [25], and Roy et al. [29]. Malakar et al. [20] have used generalized Hough transform for skew correcting handwritten Bangla word images. Ghosh and Mandal [7] have divided the word images morphologically and computed the centers of gravity of both part for skew angle detection. Jundale and Hegadi [12] have used a modified Hough transform based method for skew correcting Hindi handwritten words. Later, they [13] have used a basic parallel axes based linear regression based strategy for correcting skew in handwritten Devanagari words. Pramanik and Bag [25] is similar to the current method at initial stage but differs considerably at the latter stage. This method examines if the angle computed between three consecutive pixels is greater than or equal to a certain threshold and removes the middle pixel if the condition matches. Due to this rigid condition, several eligible pixels get removed and several ineligible pixels remain. Roy et al. [29] have used the angle between two successive characters to estimate and correct skewness. This technique cannot handle skew beyond ± 10. In the current method, we use three different sets as well as few other conditions to ensure that an eligible pixel does not get removed and handles skewed word images to an extent of ± 55. This mechanism shows improvement in accuracy when compared with other recent works. A comparison with [20], [7], [12], [13], and [25] is reported in Table 4. We have also reported and compared the average execution time required for each of the aforementionaed method to completely process each image. In terms of execution time, our proposed method is relatively slow when compared with other methodologies. We have also delineated a visual comparison of few word images with [25] and [29] in Tables 5 and 6 respectively to validate that the current method provides better skew correction.

Table 2 Skew estimation and correction performance of our proposed method for different languages
Table 3 Few skew estimation and correction results of handwritten words
Table 4 Skew estimation and correction performance comparison of our proposed method with other recent works
Table 5 Comparison of skew correction on few word images of current method with Pramanik and Bag [25]
Table 6 Comparison of skew correction on few word images of current method with Roy et al. [29]

Apart from the aforementioned analysis, we have also used a segmentation-based classification methodology for delineating the effectiveness of our proposed skew correction strategy. For segmentation of the words into pseudo-characters, we used the methodology depicted in [27]. We have extracted the structural features using the methodology delineated in [28]. We have used MLP and SVM for classification. For comparison purpose, we have used non-skew-corrected word images as baseline. We have applied the same segmentation and feature set extraction strategy on these word images. The comparison delineates that the segmentation methodology works better on skew corrected words and thereby provides better classification accuracy (Table 7).

Table 7 Accuracy comparison with different classifiers

3.5 Failure cases

The proposed methodology is very robust if single skew is present in the word images. But, it fails if a particular word is associated with multiple skews. If the size of upper modifier is too large w.r.t. the actual size of the word image, or the characters in a word are too much separated, then the proposed method fails at times, as most eligible pixels get deleted. Complete absence of headline is also a reason for some failures. Few such examples are provided in Fig 8.

Fig. 8
figure 8

Failure cases. a A Bangla word with multiple skew present; b Headline is completely absent in Hindi and Marathi word; c Size of upper modifier is too large w.r.t. the actual size of the Punjabi word image

4 Conclusion

Segmentation algorithms in multi-oriented handwritten document often fail due to the presence of skew in text. So, it is important to deskew the text images in the preprocessing phase before applying segmentation algorithms. Appearance of skew in multi-oriented Indian language based handwritten document is higher due to the presence of cursive nature. In the current work, we utilise a salient feature present in Indian scripts called m\(\bar {\mathrm {a}}\textit {tr}\bar {\mathrm {a}}\), extract a group of eligible pixels and employ linear curve fitting for detecting and correcting skew in handwritten words. This method is capable in correcting skew in four different Indian languages, viz. Bangla, Hindi, Marathi, and Punjabi and handles skewed word images to an extent of ± 55.