KWH METER IMAGE ENHANCEMENT USING COLOR SPACE TRANSFORMATION FOR IMPROVING CHARACTER SEGMENTATION ACCURACY

This study proposes an approach to enhance image quality of power meter (KWH meter) using a color space transformation. Power meter is used to measure the power consumption of the customer. The amount of usage can be seen by looking at the character of numbers as indicators of measurement. Billing can be done automatically using character recognizer on imaging device by applying digital image processing techniques. Acquired image of the power meter may have poor quality because data acquisition process is very sensitive to light and noise. Appliance power meter is covered with glass that can reflect light, so that the quality of the acquired image varies depends on the lighting conditions at the time of acquisition. Color space transformation widen the color contrast of KWH meter image. The performance of the proposed approach is evaluated using a data set of KWH meter images of Smart Meter Indonesia models contains 30 RGB color model images. Before performs the proposed method, segmentation effectivesess is 93%. The experimental results shows an improvement of image quality that affect the character segmentation results up to 97%. Color space transformation is proven effective for the improvement of image quality and segmentation of KWH meter.


INTRODUCTION
Nowadays electricity has become a necessity of life where the use of electronic equipment has become the daily life of human beings.Almost every place provides electricity for electronic appliances at their disposal.To measure the amount of electrical energy used in each electrical installation, a tool commonly used is kilo watt hour meter (KWH meter).This tool is used as an indicator of electricity consumption to be paid by the customer.The traditional electric meter is an electronic mechanical device [1], which shows the amount of electricity consumed then notice and recorded by the officer.This way can lead to errors in measurements with respect to human negligence and may less efficient in time for processing where the data need to be transfer manually.This existing problem requires a methodology for solving.The rapid development of current technology allows automation in reading KWH meters to replace manual process and improve its effectiveness and efficiency.Implementation of information technology in electronics industry can optimize energy efficiency and real time information exchange between producer and consumer by integrating information technology and communication in power installation [2].
In Indonesia, the electricity industry is managed by state-owned electricity company PLN.A customer must register to PLN in order to get electricity installation at their house or building.Then they pay to PLN monthly for electricity usage based on installed KWH meter measurement.At the end of the month, the officers will read the KWH meter manually which can lead to negligence in reading and recording as well as delays in data transmission to PLN server for processing the bill.This condition provides shortcomings for PLN and consumers or end users such as deficiency or over payment [3].PLN commits to providing excellent service to consumers or end users.It has two type of payment for power usage, Prepayment and Post Payment.Prepayment means the customer needs to buy a voucher of power before they can use it, when the voucher is out off credit then the power will stop automatically.It doesn't need to wait till the end of the month or till the officer come, so this an efficient way for billing.But, for post payment the problem still exist as before.For that, a more effective and efficient method by utilizing smart technology is needed.In spite of text processing, image processing is a promising problem solver.Image is used in wide area for documentation [4] and also specific for KWH meter record.
KWH meter image processing method has been implemented in few studies.Such as pattern recognition and character segmentation [1][2][3] [5].Principal Component Analysis for pattern recognition has been proven its effectiveness [6] [7], but the accuracy still need improvement at preprocessing phase that affect recognition phase.The output of preprocessing will be processed by recognizer.False recognition occur when the feature extracted from input is not good enough for character segmentation and recognition.The experimental result shows its accuracy up to 65% for recognition of the segmented characters.Segmentation results have not achieved optimum output because the acquired input image for preprocessing has noises.The electric meter is covered with reflective glass, so the resulting image quality varies depending on the conditions at the time of acquisition.The image of KWH meter needs to be enhanced in order to improve the results of character segmentation process.This study proposes an approach to enhance image quality of power meter using color space transformation from RGB to HSV model.The method is proven effective to improve image quality [8][9] [10].The experiment are tested using a data set contains KWH meter image of RGB color model in JPEG format.In term of effectiveness, performance of proposed method is evaluated by MSE and PSNR.Segmentation accuracy is also calculated for evaluation of improvement then previous study [5].
This paper discusses a study that perform transformation to color space of the KWH meter image from the RGB color space to the HSV and grayscale for image quality enhancement that affects character segmentation results.This paper is divided into 4 sections, introduction, methodology, result and discussion, and the conclusion at the end of this paper.

RESEARCH METHODOLOGY
The purpose of this study is to segment the characters in area that contain numerical characters on KWH meter image represents power consumption which has to be paid by consumer.Having an improvement in segmenting those numerical characters compared to previous study becomes the target of this study.
This study proposes color transformation for improving segmentation result.The combination between color transformation and histogram equalization is used as part of prepocessing stage.The proposed methodology applied in this study contains 3 (three) stages; image acquisition, color space transformation process, and numerical character segmentation process of KWH meter image.Each stage deliver output which is used as input for the next stage.Each stages is described as followed.

Image Acquisition
The first step on vision system is image acquisition.The real object which is a continuous image must be captured by digital imaging device such as camera and converted into manageable digitized image.This process is known as image acquisition.Image acquisition process consists of three steps; energy reflected from the object of interest; an optical system which focus the energy and finally a sensor which measures the amount of energy [11].Different optical system will produce different types and data format of images.
Image can be classified into three categories according to type of interaction between source of radiation, property of the objects, and relative positioning of image sensor [12]: Reflection Images that are the results of radiation that has been reflected from the surface of objects.The image contains information about color, shape, and also texture that can be extracted.Emission images, usually beyond visible light range, such as infrared images.The last type, Absorption images, are the result of radiation that passes through an object.The most common absorbtion images example is X-ray image.It can show object inside human body that absorb radiation and reflect it into the imaging system.
This study uses a dataset contains 30 samples of reflection images whose 640 x 480 pixel in size.KWH meter images is digitized into JPEG data format.The image is captured using s digital camera and taken from KWH meter of SMI (Smart Meter Indonesia) model containing the number indicates the power usage.The following Figure 1 illustrates the image acquisition environment.Digital camera as the optical system aquired power consumption indicator area on KWH Meter.Having day light as enery source, the camera positioned perpendiculularly above the KWH meter and the distance between camera and surface was about 15cm.

Figure 1. KWH meter image acquisition
This stage produce a data set contains RGB color image of KWH meter that will be processed in the next stage.

Color Space Transformation
Perception of color starts with chromatic light source emitting approximately 400-700 nm wavelength of electromagnetic radiation.The reflected radiation to human eye by object will rise a color sensation.The color to which the sensor on human eyes respond strongly are known as primary colors and have been standardized as Red, Green, and Blue [13], known as RGB color space.Color space is a specification of a coordinate system and subspace within that system where each color is represented by a single point.
In the previous study, The RGB color image of KWH meter also used without any transformation.Color atribute on image was extracted and used for characters segmentation.RGB color was used because it is the true color responded by human eye.But, based on previous study, it is known that RGB color space is not good enough for KWH meter image segmentation.It needs to be transformed into another model or format.This study transform RGB to HSV color image in order to improve feature extraction result for segmentation.
RGB (Red-Green-Blue) Color Space that represents the color space of acquired power meter image as the output of first stage is transformed into HSV (Hue-Saturation-Value) color model.HSV color model is more suitable for image processing [12] where the colors are natural color.Hue corresponds to pure color attribute, Saturation represents the degree of purity of color to white.Intensity is the size of the color brightness.The HSV color space model is illustrated as Figure 2 and the transformation of the RGB color space to the HSV can be done by the formula as in Eq. 1-6.After transformed into HSV color model, histogram equalization (HE) is also performed for contrast enhancement.HE is proven its effectveness for contrast stretching [14][15].This method will sharpen the difference between background and the character on image also among characters.Histogram equalization is a transformation that normalize the distribution of intensity on image that can be perform by using formula Eq.7 [8].
Where   is the intesity level of image.For 8 bit grayscale image, it has 256 level of color, and rk = 0 to 255.Distribution of intensity   can be formulated as probability (  ) of intensity on n-pixels image.(  ) is   piksel number of   -intensity portion in -pixels image.The color image is converted to grayscale color space before adjusted.Histogram equalization adjusts the original intensity value that lies between the initial value interval to the newly specified value range so as to increase the contrast.To evaluate the proposed method, Mean Square Error (MSE) and Peak Signal to Noise Ratio (PSNR) is calculated using Eq. 8 and Eq.9 [15].
MSE finds the difference between    pixels image before ( 1 ) and after ( 2 ) enhancement.R is the maximum fluctuation in the input image data type.For an 8-bit unsigned integer type, R is 255.The transformation of color space stage rearranged and adjusted image color value to make a sharper and clearer boundary between the objects, especially the numeric character that represents the amount of power used by the consumer.The result of this stage will be used as input for next process, which is character segmentation process.

Character Segmentation
This stage process binary enhanced image and localize the region of interest (ROI) where characters are detected.ROI is detected when it contains maximum connected pixels in the middle to top of image.It contains 580 x 150 pixels of RGB features of localized characters represents amount of power consumption.Connected pixel are observed from 8 neighbours of pixel.Some groups of connected pixel are detected as candidate of numeric character which will be segmented.
The process is continued for characters segmentation process by finding the center of each group of connected pixels in ROI which has greatest amount of pixels to be segmented into few images contained 40 x70 pixels for each.It because the target contains pixel more than 40 pixels in width and 70 pixel in height.Otherwise, it is false target.KWH meter uses 6 (six) numerical characters to represent the measurement of power usage.Segmentation must capture all of them accurately.
At the end of this stage, some characters are segmented and evaluated its accuracy.The propose method effectiveness is evaluated by finding out how many characters can be segmented accurately compared to the previous study.

RESULT AND DISCUSSION
The color transformation method for KWH meter image enhancement proposed in this study is implemented in an application prototype and tested using a data set contains 30 (thirty) RGB color images.The experimental result samples are shown in the following Table 1.The first coloum represents the sample of aquired data which converted form RGB to Grayscale image.Second coloum represents the result of first and second stage in this study, where the image in first coloum is converted into HSV model and enhanced using histogram equalization for contrast streching in order to sharpen the boundery between the target of pixel object non target.Morphological opening is performed on sharpen image.The morphological open operation is an erosion followed by a dilation.
Visually it can be seen that the enhanced image in the second column is sharper then before , where the contrast between character object and background or non characters is improved and the ROI of numerical character is getting clear.This enhanced image is used as input for the last stage which is started by detecting ROI of numerical characters target that represent amount of power usage.
ROI is recognized as the amount of electricity usage recorded on the KWH meter device.It is the main focus of this study that will be segmented.Figure 3 illustrates the image grayscale color histogram (a) before and (b) after to show the difference of 5th image sample on Table 1 before and after enhancement using proposed method this study.It can be seen histogram become uniform or normalized where the range of intensity is wider from 0 to 255.It reduces frequency of intensities that more dominance then others.This process affect the contrast of image as shown in previous Table 1.

Before Enhancement
After Enhancement PSNR also calculated to evaluate the performance of proposed method.Peak Signal to Noise Ratio (PSNR) is used to measure the quality of reconstruction image after color transfomation from RGB to HSV and continued by performing histogram equalization.PSNR between original grayscale image and enhanced image for ten samples is illustrated in Figure 4.  PSNR shows that there is significant difference between KWH image before and after enhancement using proposed color space transformation.To test the quality of the enhancement result, the image is used as input for segmentation of numeric character on localized ROI.The segmentation performance obtain its accuracy up to 97% for testing 30 images on dataset.The sample of segmentation result for 1st and 5th images from Table 1 is shown as in the following Figure 5.

Figure 5. Image Samples Segmentation Results
Detailed result for each stage proposed in this study is illustrated in the following Figure 6.It shows work flow for 5th image sample in Table 1.The experimental result shows an improvement in segmentation accuracy, miss segmentation occurs on a sample (Figure 7a).Before enhancement, the segmentation method can detect 5 of 6 numeric characters (Figure 7b).Its effectiveness is improved.Error occurs because it fails to segment the last character on ROI as the the effect of noise.After enhanced using proposed method, all characters on ROI are successfully segmented.For 30 images, previous study efective to segments 6 characters for each data.Its efectiveness is up to 93%.In this study, the terget of numerical character segmentation on KWH meter image of data set effectiveness is improved up to 97%.

CONCLUSION
This study discusses KWH meter image enhancement by transforming color space model from RGB to HSV and grayscale model.Image color is adjusted by performing histogram equalization that improved contrast on image.Research methodology consist of three stages; image acquisition, color space transformation, and character segmentation.By performing color space transform, numeric characters represent power usage on KWH meter images are getting clear and the boundary between characters is sharpen for segmentation process.The proposed method is implemented and tested using dataset contains 30 (thirty) samples of KWH meter image of SMI model.The experimental result shows that the proposed method effectively improves characters segmentation accuracy up to 100%.Before enhancement, the segmentation fails to segment the last character in a test sample and only reach 93% of effectiveness.
These results are expected to improve the effectiveness of character recognition on segmented image in future research and compared to the other method for image enhancement.

Figure 6 .
Figure 6.Characters segmentation process Image acquisition stage captures RGB color model of KWH meter, converted into grayscale image, and enhanced by transforming its color model into HSV continued by adjusting the histogram.ROI is extracted from enhanced image based on connected pixel feature of each characters on image.ROI is detected when it contains maximum connected pixels in the middle to top of image.It contains 580 x 150 pixels.At the end, ROI is segmented for each detected characters based on connected 8neighbour pixel.The experimental result shows an improvement in segmentation accuracy, miss segmentation occurs on a sample (Figure7a).

Figure 7 .
Figure 7. (a) original Image (b,c) Segmentation results before and after enhancement