Personality Analysis through Handwriting Detection Using Android Based Mobile Device

Graphology is one of the psychology disciplines which aims to study the personality traits of individuals through interpretation of handwriting. We can get information of one’s personality through graphology. In addition, by using android based mobile device, graphology analysis could show one’s personality faster. This study was conducted by taking 42 samples of handwriting from different backgrounds. The feature used in this study was handwriting margin. Besides, Support Vector Machine method was employed to classify the result feature from extraction process. The result of this study showed the accurate average of the application reached 82.738%.


Introduction
Individual's physical appearance and personality are two different things.It means, physical appearance does not reflect one's personality.A neat appearance does not mean that the person is also neat.Therefore, a psychology test aims to obtain the information about individual's personality [11].
However, on reality, psychology test spends much time, thus another alternative in choosing the proper psychology test must be taken into account to give accurate result of individual's personality in a short time [11].Besides, the cost to conduct this psychology test is also expensive [11].
The other method as an alternative of psychology test is by reading handwriting style to interpret individual's personality [8].Similar to fingerprint, handwriting and signature are the trait of individual that could not be copied even though they are made as similar as possible.As a matter of fact, twins have different fingerprint and handwriting style [8].The term of graphology emerged as one of the psychology disciplines which aims to study one's personality through handwriting [6].Personality, characteristics and the tendency of behavior are reflected from the handwriting style (hand stroke and handwriting style).The conduct of the test was relatively fast (did not spend one full day), easy in using graphotest, cheap and accurate into 85% [11].
The aspect of body, mental, and emotion affect the writing of someone.Brain actually controls handwriting style.Brain handles the body function, either conscious or unconscious mind.The analysis was carried out by reading the handwriting style, not by seeing the bad or the good handwriting nor the content of the writing [11].Through this handwriting style, we can tell the mental state, behavior, and characteristics of someone [11].This analysis was conducted by interpreting the handwriting of someone on a piece of paper.The parameter used to analyze handwriting was the writing speed, writing tilt, writing space, writing size, word space, writing basic line, connection and press when writing [8].The motivation and courage of someone, mental state, emotion steadiness, intellectual tendency, interest, strength and weakness of someone can be revealed through handwriting analysis.
A research conducted by [4] compared method of Multi-Class Support Vector Machines (SVM), of which SVM is actually designed to classify binary.Besides, on the research of [4], SVM was compared to three methods in binary classifications; they are "one-against-all", "one-against-one", and DAGSVM.The result showed that "one-against-one" and DAGSVM were more proper to use in its practice compared to the other methods.
[2] carried out a research about handwriting identification in mathematics.The mathematics expressions were recognized, defined, and converted in programming language MathML.Object Oriented approach with Prototype process model was used in this research.The strength of application [2] was can recognize handwriting in number, letter, mathematics operator, and mathematics symbols which later were converted in text.Besides, this application could convert handwriting into programming language MathML.However, it could not recognize complex mathematics expression yet, such as integral, logarithm, and trigonometry.
The researcher of [1] used pen pressure pattern feature.This pattern is one of the features to analyze.Preprocessing stage uses grayscalling and binary image, feature extraction process by calculating black pixel, and classification by using Support Vector Machine (SVM) Method.There were 70 sample data of handwriting including 35 trained data sample and 35 testing data sample in this research.Furthermore, the level of accuracy average reached in this research was 96,54% from 5 experiments.
Support Vector Machine (SVM) method was used by [7] in identifying one's personality through the basic stroke of writing.SVM method was divided into two stages.The first stage is training stage, consisted of image analysis and image class determination which provide data of abscissa for image analysis which will be used further as testing stage.The second stage is testing carried out to discover the accuracy of application.According to this research, it was discovered that SVM method can identify the writing stroke of writing and it is effective in analyzing the pattern of writing basic pattern with the success average rate of 97.92%.
The researcher [17] used dihybrid SVM with Hidden Markov Model Online Handwriting Recognition (HMM OHR).The result of this research concluded that hybrid SVM gave better result in recognizing number, capital letter and lower-case letter.
The other research carried out by [18] used matching method to employ marginal feature, basic writing stroke, words space.In margin feature used, there are some subfeatures which are justify, align text left, align text right, align text top, align text bottom and no margin.In its implementation, researcher [18] used segmentation process per text line with horizontal histogram where local minima are considered as boundaries between text lines.This study generates 4 types of data, they are top margin, bottom margin, left margin, and right margin.This research concluded that the left and right margin, as well as the top and bottom margin were medium, so the percentage obtained was 73,33% due to the noise in image.
According to the research conducted by [18], a study of margin feature was developed.Moreover, an application operated in android based device in order to identify one's characteristics through handwriting has been designed.Yosandy [11] stated that precious information of someone comes from handwriting which is the expression of subconscious mind.The quality, personality and even characteristics of someone can also be improved through handwriting [6].
The researcher also developed margin feature to recognize characters.Margin feature consists of top margin, bottom margin, right margin and left margin.Each margin consists of sub-feature.The left margin consists of normal left margin, narrow left margin, constrain left margin, very wide left margin, wide left margin and ragged left margin.Top margin consists of wide top margin, normal top margin and narrow top margin.Bottom margin consists of narrow bottom margin and wide bottom margin.Right margin consists of narrow right margin, wide right margin and struck right margin.The implementation of accurate Support Vector Machine (SVM) is expected to recognize characteristic through handwriting.Using the method that has been developed, it is hoped that the design and implementation could provide meaningful accuracy level seen from the accuracy parameter.This application is operated in android based mobile device since it can be operated anytime and anywhere.Android was chosen since there are many android users and it has been rapidly developed in 2016 [15].Handwriting analysis by mobile device could give efficiency in terms of time and cost.

Graphology
Handwriting is closely related to the state of mind.The most unsteady state of mind is emotion.The feeling of happy, sad, confused, stress and joyful are emotions that are likely to change.Handwriting reflects fluctuated emotion; therefore handwriting can be different from time to time.Besides, mental state affects handwriting especially when someone is confident or not.When writing, human uses his/her body, mental and emotion.An individual expresses the reflection of body, mental and emotion through handwriting.Body reflects physical condition, power, and the health of the author.Mental reflects intelligence and personality.Whereas, emotion reflects condition of feeling such as happiness, sadness, anger, etc [11].
Briefly, handwriting can reveal hundreds of personalities and characteristics of individual, started from subconscious mind, emotional reaction, intelligence, fearful energy and self defense, motivation, imagination, integrity, even sexual desire and belief.
Graphology analysis covers some features, namely press, margin, space, basic line, continuity, speed, slant, size, 3 zones, starting and ending, capital letter, signature, special letter [8].A vary of handwriting has its own traits, and those traits can describe one's personality [8].
Nonetheless, this research used page margin in detecting someone's personality.Shortly, the description of characteristics can be seen in Table 1 [14] developed Support Vector Machine (SVM) as a powerful classifier discriminant.The positive result given by SVM makes this method widely used in pattern recognition.In Figure 1 (SVM Concept), we can discover that linear and non linear problems, classification problems, flexibility, global optimum characters and prediction capacity could be performed by SVM and provide positive result.

The Recognition of Handwriting
The recognition of handwriting is done by android device.Handwriting in form of picture is recognized by android with these following stages:

Preprocessing stage.
Preprocessing stage is the initial stage in image processing for the smoothness of the next stage [9].Some of the things that can be carried out are image quality improvement, image reparation, noise remove, and image determination that will be observed.

Grayscale.
Grayscalling stage consists of preprocessing stage.Grayscale is between minimum color (black) and maximum color (white), which is grayish.The limit of this grayscale gives many possible colors.

Thresholding.
Process that produces binary image, which is the determination of threshold value level, thus pixel which has value under the level will become white in color ( 0 value for binary), and the value above the level will become black in color (1 value binary) [18].

Segmentation Stage.
Segmentation stage changes the image input into binary input based on the attributes taken.Segmentation will be more accurate depends on the success rate of analysis procedure [13].The recognition of left margin pattern was performed by scanning process, from the left side in vertical position until it touches the writing.

Feature Extraction Stage.
The objective of this extraction is to find out the value of image object feature which has passed segmentation process previously.The available array is ready to accommodate the value of features obtained.The value of x distance into y distance.

Methodology
This part tells about steps that were conducted in this research.Figure 2 {Methodology Block} is a scheme from methodology performed.

Search for Information and Data Collection
System Design and Implementation

Measurement and Testing
Analysis of Test Results

Figure 2 Methodology Block
The initial step in this method was literature research which was related to the sample of handwriting.Graphology books, national and international scientific journal supported this research.A basic knowledge of graphology was considerably important in using image method of preprocessing, segmentation and classification SVM process.In data collection process, the sample was randomly chosen, and there were male and female respondents of 14 until 30 years old.The handwriting sample, then, was analyzed by application.Figure 3 shows stages in process of handwriting analysis.The collected data of handwriting was further analyzed through image analysis consisting of 2 stages; those are preprocessing and segmentation process.The preprocessing stage determined the image to be analyzed.The preprocessing stage which had been conducted was grayscale, where the sample of handwriting is previously in the form of RGB (Red, Green, Blue) image that was changed into grayish image with the depth of color was 8 bit.Then, the image was converted into binary of 0 and 1 value, with black and white color only [7].Thresholding was a process to obtain binary value.It means, if the pixel value is under threshold value, then the image will be black, on the contrast, if the pixel value is above threshold value, then the image will be white.
Segmentation was the process that was carried out after preprocessing, it divided image into region or object components.The image division into regions is in line with an approach, such as threshold, region growing and merging.The characteristics of similarity in segmentation [3].
The next image analysis step was feature extractions.The feature which was extracted was left margin, including align left margin, ragged left margin, left margin broadens to the right, and narrow left margin.In addition, the right margin consists of narrow right margin, wide right margin, struck right margin.Top margin consists of wide top margin, normal top margin, and narrow top margin.Lastly, bottom margin includes narrow bottom margin and wide bottom margin.

Designing
The designing phases are divided into two, namely application and method designing.We can see it briefly in Application Designing.The application used was android based device, particularly a mobile phone.There were two important roles of this application, those are the android system in which it processes the imaging activity started from preprocessing, segmentation, feature extraction, and displaying the analysis result.The second important role is the user, in which the user enters the data in form of handwriting image.In Figure 5, we can see how android was used to analyze handwriting.Handwriting on A4 paper was captured by using android, thus, a graphology analysis process was conducted using android, that later will result to a conclusion of the characteristics of the handwriting's author.Figure 5. Method Designing.A method designing can be seen in Figure 6.The change of binary image was based on the attribute determined.The image of handwriting was loaded to the application then it was displayed in a screen.The preprocessing process was initiated with grayscale and threshold process, where the image was given a threshold.The feature of left margin was taken through feature extraction process from the image obtained from segmentation process.The value resulted was the calculation from some pixels of handwriting sample as the feature value of classification process.
The next process was classification using SVM method where there was a limit of classification including left margin, right margin, top margin, and bottom margin based on its categories of each margin.Narrow right margin, wide right margin, struck right margin.Wide top margin, normal top margin, narrow top margin.Narrow bottom margin and wide bottom margin.

Implementation
Implementation step explains the process of system designing and method designing activity.The implementation of software system defines the device used for research.The initial step in implementing this method was collecting the handwriting sample of 42 people with different backgrounds.The steps in method implementation were started from preprocessing process which later continued with segmentation, feature extraction and lastly recognition of handwriting and also the analysis result.

Preprocessing
Preprocessing was the beginning of method designing that functioned to improve the image quality, remove noise, and repair the image [9].The stages of preprocessing covered:

Grayscale
Grayscale has black, grayish and white color.The depth of grayscale image color was 8 bit (256 combination of grayish colors) [9].It has canal value in its pixel.Moreover, the intensity level was pointed out by the canal value in its pixel.

Thresholding
Thresholding was an image that had two values of grayish level, namely black and white.All pixels in image were converted into black (value 0) and white (value 1) with one value of threshold T. [9].

Segmentation
Segmentation was a process of dividing image into region or objects components [3].Segmentation becomes important since the use of segmentation is to change the input image into binary image based on the attribute taken into that image [13].Left Margin Segmentation.Figure 7, shows the whole chart from segmentation occurred in left margin.Left margin segmentation was started by making a grid or straight line first on the working sheet with regular space of 5 pixels from top to the bottom.The grid, one by one, will be scanned to find out the handwriting on that working sheet.If during the process of scanning that grid, white pixel is found out, then, an imaginary box is made to mark that there is text in that area.Yet, it is insufficient to decide whether that grid consists of text or not.Therefore, the imaginary boxes were made into two and they were placed above and under the grid in order to detect the text in that grid.In Figure 8, we can see a text in a white and green stripes, yellow and red imaginary box.Each box has its own value, where those values were the total of white pixel which was passed by grid in scanning process.This imaginary box was compared to the others so it was determined that the box with the highest white pixel was the row of the text.It was indicated with green and white stripe imaginary box.When that grid was decided as the row of a text, then a starting point of the text was made with green color.Figure 9.The determination of left margin was calculated from how much the green boxes come in the align line.
Top Margin Segmentation.Top margin segmentation was performed by scanning segmentation horizontally after making grid/ horizontal line previously from left to right.Grid will pass white pixel, so it can be decided whether the text belongs to wide, normal or narrow top margin.

Figure 11 Top Margin
Right Margin Segmentation.In right margin process, the segmentation was conducted with similar treat to the left margin.Grid/ line was made first, then a scanning process was done horizontally.If grid touched the white pixel on the working sheet, then it can be decided soon whether it belongs to the category of wide, narrow, or struck right margin.
Bottom Margin Segmentation.The segmentation process of bottom margin was similar to top margin process.However, the category of bottom margin were only 2, those were narrow and wide bottom margin.

Feature extraction.
The extraction of fundamental part of image analysis activity.Feature as the unique characteristic of an object was separated [9].

Analysis Result
The testing of application was performed by comparing the result analysis of android with the result analysis of the experts.Thus, the accuracy of analysis from the application made could be reached.This following sample is the handwriting sample from the data collected.Tulisan(1) as it is shown in Figure 12.Hence, the result of analysis using application as it is made in Table 4 was gained.5, there is a different result of data sample Tulisan(1) in left margin feature.The application showed that the left margin was ragged, on the contrast; the experts stated that the left margin is narrow.The whole result from application analysis then was compared with some experts.Every feature was scored 1 if the result between application and experts are same, yet, the score will be 0 if the result between application and experts were different.Thus, it was gained the result as it is shown in Table 6.Therefore, the result between congruency of application and the experts is shown in Table 6.The formula to decide the percentage of each feature could be calculated as follows: The total of same data The total of sample data  100% …………..(1)

Conclusion
This research is basically the development of previous researches.The previous researchers used margin with balanced margin category, wide left margin, wide range left, wide top margin, wide bottom margin, and no margin.Whereas, this research used normal left margin, narrow left margin, constrained left margin, very wide left margin, broaden left margin, ragged left margin, narrow right margin, wide right margin, struck right margin, narrow bottom margin, and wide bottom margin.
The result of this research showed that the testing of android based mobile device gave left margin congruence percentage of 69.047619%, top margin of 80.952381%, bottom margin of 100%, and right margin of 80.952381%.Therefore, the accuracy average of this application was 82.738%.

Figure 3
Figure 3 Stages of System

Figure 5
Figure 5 Capture Text

Figure 6
Figure 6 Method Designing

Figure 7
Figure 7 Left Margin Segmentation

Figure 8
Figure 8 Left Margin Segmentation Aplication

Figure 9 Figure 10
Figure 9 The Starting Point of the TextThe next process to be taken into account was making 2 lines of straight and aligns imaginary with width of 5 pixels in bottom which then dragged above to the starting point of green box on the left text.The up and down line was the parameter used in determining whether the text has wide or narrow left margin, ragged or normal, or even very wide margin.Those 2 align lines moved from 0̊ to 5̊ consecutively from right to left.