Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

As said earlier the feature extraction method is used to recognize the characters.

The
three geometric entities considered are the corners, endings and bifurcations. Here a dynamic
link library named ocr is imported to the application. The namespace contains a class named
Gen. The Gen class contains a function named getstr() which can be called to retrieve the three
geometric entities. Another function included in the class is Process_img() which takes the
filename as the parameter. That is first an object oc is created for the class Gen. Then the
filename is passed to the function Process_img(). By calling the function getstr() with the object
oc the corresponding set of values for each character in the input image are retrieved and they are
stored on to a list<string> c. The values retrieved will be a 3 set value where each value is
separated by a comma. Thus the value is assigned to a string d. Using the split function the
values are separated by their commas. The values are stored to a string array f. The values
present at f[0],f[1] and f[2] are assigned to the variables respectively.

The query for the comparison of values and identifying is written in a stored procedure
named sel_values which is called inside the values() function defined in the provider class. The
stored procedure is as

ALTER PROCEDURE sel_values


@corners int, @endings int, @bifurcations int
AS
select Alphabet from character where Corners=@corners and Endings=@endings
and Bifurcations=@bifurcations
RETURN
The values retrieved using the getstr() function and the values stored in the database
values are compared. And the corresponding alphabet is returned to where the function was
called.

Thus when a character is returned it is appended to the string str else a space is provided.
Finally str is assigned to the richtextbox where the final editable form is displayed.

4.1.5 Code for recognition of symbols and digits

Not only the alphabets but also certain symbols and all digits can also be detected and
converted to the editable form. For this purpose the code is as below.

21
public string CheckFileType(string filename)
{
MODI.Document md = new MODI.Document();
md.Create(filename);
md.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, true, true);
MODI.Image image = (MODI.Image)md.Images[0];
string k = image.Layout.Text;
return k; }
MODI stands for Microsoft Office Document Imaging which is a feature of Ms Office
2007. The Office OCR component has to be installed. After the installation Microsoft Document
Imaging 12.0 Type Library can be added to the references of the project. Thus Interop.MODI.dll
is imported. The CheckFileType() function takes the filename of the input image as the
argument. The file to be processed is read using the MODI Document object md.
MiLANGUAGES is an enumerator which contains a list of languages. Since the language to be
converted is English miLANG_ENGLISH is specified. The converted form is stored into the
string k and is returned.

22
SYSTEM TESTING

23
5. SYSTEM TESTING

After developing the system must be tested for checking whether or not the system is
achieved its desired functionality.

The first phase that is the preprocessing phase is first put to testing. On giving the
scanned image as input it is tested whether the filteration operations are applied correctly.

Fig 3. The scanned image is uploaded which is to be converted.

24

You might also like