1. A method of preprocessing an image for optical character recognition (OCR), wherein the image comprises a plurality of columns, each column of the plurality of columns comprising at least one of Arabic text and non-text items, the method comprising: determining a plurality of components associated with at least one of the Arabic text and the non-text items of the plurality of columns, wherein a component comprises a series of connected pixels; calculating a line height and a column spacing associated with the plurality of components; associating at least one component of the plurality of components with a column of the plurality of columns based on at least one of the line height and the column spacing; calculating a first set of characteristic parameters for each column of the plurality of columns; and merging the plurality of components of each column of the plurality of columns based on the first set of characteristic parameters to form at least one of at least one Arabic sub-word and at least one Arabic word, wherein the first set of characteristic parameters is at least one of a line height associated with each column, a word spacing associated with each column, a line spacing associated with each column, a number of pixels corresponding to each component, a width of each component, a height of each component, coordinates of each component, density of each component, and aspect ratio of each component and wherein calculating the line spacing associated with each column comprises: creating a histogram of a plurality of horizontal projections of the plurality of components associated with each column, wherein a horizontal projection of the plurality of horizontal projections indicates a number of pixels associated with the plurality of components corresponding to each sweep of the raster scan; calculating an average distance between two consecutive maximum horizontal projections; and computing the line spacing based on the average distance.
1. A method of preprocessing an image for optical character recognition (OCR), wherein the image comprises a plurality of columns, each column of the plurality of columns comprising at least one of Arabic text and non-text items, the method comprising: determining a plurality of components associated with at least one of the Arabic text and the non-text items of the plurality of columns, wherein a component comprises a series of connected pixels; calculating a line height and a column spacing associated with the plurality of components; associating at least one component of the plurality of components with a column of the plurality of columns based on at least one of the line height and the column spacing; calculating a first set of characteristic parameters for each column of the plurality of columns; and merging the plurality of components of each column of the plurality of columns based on the first set of characteristic parameters to form at least one of at least one Arabic sub-word and at least one Arabic word, wherein the first set of characteristic parameters is at least one of a line height associated with each column, a word spacing associated with each column, a line spacing associated with each column, a number of pixels corresponding to each component, a width of each component, a height of each component, coordinates of each component, density of each component, and aspect ratio of each component and wherein calculating the line spacing associated with each column comprises: creating a histogram of a plurality of horizontal projections of the plurality of components associated with each column, wherein a horizontal projection of the plurality of horizontal projections indicates a number of pixels associated with the plurality of components corresponding to each sweep of the raster scan; calculating an average distance between two consecutive maximum horizontal projections; and computing the line spacing based on the average distance. 5. The method of claim 1 , wherein determining the plurality of components comprises: performing a raster scan across the image; identifying a plurality of pixels associated with at least one of the plurality of components corresponding to at least one sweep of the raster scan; and aggregating the plurality of pixels based on an interconnection between the plurality of pixels to form at least one set of connected pixels.