A MEASURING WEIGHT MODEL OF TIMOR'S BEEF CATTLE BASED ON IMAGE

Abstract ---This study uses a digital camera to take pictures of Beef Cattle and do image processing to determine the physical size of the body of Beef cattle that looked. On the input image that captured by the camera will do the process of image segmentation to separate the image of beef cattle from the background and eliminates the other objects in the image that are nuisance. Furthermore, with computer vision made the process of identifying specific points of physical of Cattle that used to determine body weight (computational) of Beef Cattle automatically. Determining the weight of Timor’s Beef cattle based on image, is presented by the physical characteristics of cattle that is looked: the body length and width of the chest of cattle, and compute cattle weight based on conversion formula that standardized and generally recognized. This Image analysis system is able to actualize the value of body length and width of chest from the pixel values shown in the image. The system has built two models namely Manual models and Maximum Expectations models. On manual models, the user can input a defining point of body length and width of chest in the image that appears on the computer system. In the maximum expectation, users no longer need to input these points but this image-based analysis system will do the computation automatically.


I. INTRODUCTION
Sale and purchase of cattle between farmers and buyers are often found in Timor Island Indonesia, is still based on rough estimates in determining body weight. Generally agreed price through bargaining is not based on actual body weight. In addition, to the official animal markets, measurement facilities of the weigth of Beef Cattle are not always there. Sales of cattle that are not through weighing in advance may result in damages to the breeder or buyer. Using mechanical weighing scales still have obstacles faced in conducting weighting cattle bodies, Lasfeto, et al (2008) [1] , that are: -Keep proper calibration of measuring instruments in order to know the actual weight of cattle; -When cattle forced to climb the scales then stress conditions can also affect to cattle, besides cattle is not in a fixed position and always moving can affect the reading of the actual value in the designation of measuring instruments; -Need to steer cattle to climb the scales are provided, it also requires a sizeable human assistance; -Measure the weight of cattle which is done mechanically, which generally results in cattle experienced stress, can lose weight of cattle (± 2%), in addition to other factors, such as the possibility of injuries due to friction barrier enclosure. To get a more practical and more economical, Electrical and Information Technology can be applied to provide solutions to these problems, by using image processing to determine the physical size of the body of the Beef cattle that looks and its weight.
This study aims to find another way instead of mechanical scales to measure the weight of Beef cattle. Specific targets are expected to be achieved has information technology products more efficiently and economically effective (in terms of: time, cost, and manpower) used the society, especially farmers on Timor island to measure the weight of Beef Cattle.

A. Literature Review
Some research in the field of animal husbandry, especially in breeding beef cattle, theorized that the determination of body weight of beef cattle can be done by measuring the chest circumference and body length of the animal. Between body length, chest circumference and body weight of cattle has a linear relationship (McNitt, 1983) [2] . According to Soenarjo (1988) [3] , the chest circumference and body weight of cattle there is a positive correlation. This shows that if had known measures of livestock body can then be made an equation that describes the relationship between each the size of linear body with the weight of his body. Ensminger and Olentine (1980) [4] , revealed the method of determining the weight of beef cattle, as in Figure 1 below are: 1) measure the width of the chest, from points behind the scapula (c), down encircling the bottom of the body, behind the elbow (d); 2) measure the length of the body, which is the length from point of shoulder to the sitting bones (pin bone), namely from point a to point b. Figure 1. Determination of body length and width of chest cattle [4] According Schoorl written by Siregar (2007) [5] , the conversion of the physical size of the body that seemed to weigh cattle is (measurement formula is valid for adult beef cattle):  [6] , the body weight of cattle can be calculated by the formula: According Murtidja (1993) [7] , determination of the weight of beef cattle by size body length and width of the chest are: BW = BL x WC x 70, where: BW( kg), BL (m), WoC (m) All results of this study indicate that the body length and width of chest can be used to calculate the weight of Beef cattle. It is a reference that in this study, gain weight length and width of the chest of the Beef Cattle is the main to be achieved in image processing.
Image representation relates to characterizing the quantity represented by each pixel. The image can declare the object luminance (e.g on pictures taken with the camera), the nature of absorption by the body tissues (X-ray imaging), the temperature profile (infrared imaging) and others. In general, the image is defined as a continuous function on the light intensity f (x, y) in a two-dimensional field. The magnitude of x and y express coordinates, while the value of f at any point (x, y) expressed the intensity or brightness or degrees of gray at that point. A digital image is a continuous image is converted into a discrete form of both coordinates and intensity.Digital image can be regarded as a matrix with rows and columns indexes express the coordinates of each point in the image, and the value of each element expressed the light intensity at that point.One point on the digital image can be identified with a pixel.
Spatial characteristics of each object can be expressed by the level of gray, the joint probability distribution or spatial distribution. Feature objects simplest and perhaps most useful is the amplitude of its physical properties, such as reflectivity, transmissivity, tristimulus values (color), or responses multispekstral. For example, in the image of medical records with X-rays, the amplitude of gray levels representing the characteristics of absorption by the body tissue and can be used to distinguish between the bones with other networks or to distinguish between healthy tissue with healthy tissue (Jain, 1989) [8] .
The expected goals of the segmentation process specifically on this study was to separate the background from the object (foreground). Therefore, to be a simple segmentation process, then the segmentation using edge detection. By using edge detection process, it will be obvious differences between the objects with his background.
Image segmentation is the first step in the process of image analysis that aims to take the information contained in the image. Image segmentation divides each image into parts or objects. To what extent such distribution is carried out depends on the problem at hand. Ideally, the segmentation step is stopped when the desired object has been successfully separated.
With an effective segmentation, likely will get a good result.Segmentation algorithms for monochrome image is usually based on one of two properties of gray-level values: discontinuity and similarity. At the discontinuity, the approach taken is to separate the image based on the change in value graylevel drastic. In contrast to the similarity, the approach is based on thresholding, region growing, region splitting and merging.
Image processing can be done with a computer when the image in digital form. Computer-assisted image analysis involves the study of feature extraction, segmentation and classification techniques. In computer vision systems, carried out pre-processing on the input image. The process of pre-processing may include image restoration, image enhancement or simply adjusting data representation only. The next process is the particular feature extraction for image segmentation into its components. The image is segmented into blocks input for the classifier.
According to Gonzalez and Woods (1993) [9] , To be able to recognize objects in an image, it would require some image analysis process first. In general, the image analysis process is divided into three parts, namely: the low level processing processing intermediate level and high level processing.
Computer vision is an automated process that integrates a large number of processes for visual perception, such as image acquisition, image processing, classification, recognition, and make a decision. Computer vision consists of techniques to estimate the characteristics of the object in the image, measurement characteristics associated with the geometry of the object, and interpret the geometry information, Lee, et all (2001) [10] .
The processes in computer vision can be divided into three activities: 1. Obtain or acquire a digital image. 2. Perform a computational technique for processing or modify the image data (image processing operations). 3. Analyze and interpret the image and use the results of processing for a specific purpose, such as guiding robot, control equipment, monitoring manufacturing processes, and others.

B. Hypothesis
The results to be obtained through the image processing is to produce a body length, width of chest and weight of cattle based on standarized formula. The results were compared with the results of mechanical instrument, so the hypothesis in this study are: image processing analysis results do not differ significantly from the results of weighing using mechanical instrument.

III. METHODODOLGY
Research carried out, to determine the weight of beef cattle, based on the physical characteristics that are visible, and measurable. In this case the research object (objectimage) or a sample of Beef Cattle are: Timor's Beef Cattle and the number of beef cattle taken its image as much as 30 (thirty).
The overall structure of the image processing method to get the physical size of beef cattle that looks broadly demonstrated by the following diagram: The image of beef cattle will do image processing to get the size of the physical (body length and width of the chest) and then do the conversion process to get the cattle's body weight.
to weight Pixel to cm conversion

A. Image Acquisition
Other factors that influence the success of the system built is the distance of image capture. In this study, the acquisition of objects within the image is different. However, in saving and performance testing system, one object image taken distances are varied but measured distance acquisition. This process, described in the following table: x = distance acqusition/captured is not measured but definitely done randomly Another factor is the shooting angle. In this study, the position of the photographer and image objects, arranged in a position approximately ± 90 0 (perpendicular).In this image analysis, when use a different camera need to recalibration to get the number of pixels conversion to centimeters (cm).

B. Measurement
At this stage, do measurement of the physical object as the body length, and the width of the chest of all the samples of cattle that become the object image.These measurements will be useful in the testing phase,as a comparison to measure the success of image processing systems are built.

C. The Design of The System
Perform image processing by using edge detection and image segmentation techniques to get physical features seen in cattle in accordance with the provisions in describing the physical weight of the cattle. Furthermore, we will convert the detection results of image processing into cattle weights.
In general, a system built through the groove in Figure 3.

Figure3.Diagram of image processing procedures
On the input image from the camera will do the process of image segmentation to separate the beef cattle'simage from the background and eliminates the other objects in the image that are nuisance. Furthermore, with computer vision made the process of identifying specific points of physical of Cattle that used to determine body weight (computational) of Beef Cattle automatically.

IV. RESULT AND DISCUSSION
This image analysis system is built using MATLAB programming language to implement image processing systems in computing the weight of the beef cattle. Input IAS (Image Analysis System) is a raster image of beef cattle and the output is weight in kilograms. image acquisition remains set at an angle perpendicular. The initial view of the IAS user interface found in Figure 4.

Computati-on Process
Segmentation process

Identificati-on Process
Figure4. The Interface of IAS This system is by inputting its own image in this case it is necessary keystrokes load. Once the button is pressed, the load will be asked to input image to be processed.After the image is processed dinputkan IAS built into it, will continue in the mode of choice to use the manual and automatic mode selection to perform an analysis of the images of cattle being processed. Load button reading the image using imread function in image processing tool box. Imread function syntax is: varout=imread(filename).
Imread function to read the string file (the file name) and provide output matrix image on varout. Because image acquisition results have RGB format then varout the matrix dimensions m x n x b with respectively m is the length of the image, n is the width of the image, and color fields. In this research, the resolution of the images of cattle processed is 538 x 403 pixels.

A. Calibration process
Basic Mathematical Analysis :

Thus obtained relation:
Magnitude P'is a lenght of projection of P on the distance D'. By using the above evidence, the calibration process can be described in the following steps.. Ilustration the outdoor acqusition process of beef cattle image : Figure 6.Ilustration the outdoor acqusition process of beef cattle image The projection of P on the field taking the shortest distance D1, might look like the followingpicture:  Option of this computation program based on the formula that desribed before. When using the formula 2 or all 3 can be moved choice options that exist, and it will automatically display the value of the weight of beef cattle.

C. Maximum Expectation Model
In the maximum expectation model, without input the point of forming a body length and width of chest ofBeef cattle, but the system will automatically perform image analysis process after the beef cattle's image is inputted into the system. Image analysis models that have been implemented for the process automation of physical weighting of beef cattle using themaximum expectation method described in the following algorithm: xcut = logical (all index x that greater than T) count index x = sum(xcut) early index = (P(x,:) = min[P(x,length(P)-count indexx : length(P)))] end index= (P(x,:) = max[(P(x,length(P)-count indexx : length(P)))] The points to determine line of chest of body are P(early index) and P(end index). 7.
Compute the distance of point A to B and C to D use Euclidean (Ahmad, 2005) [11] : Based on the findings and analysis conducted can be concluded as follows: 1. The process of camera calibration and image system to get the actual value of beef cattle's specifically body length and width of chest of beef cattle is very fundamental to the success of the analysis of this image, because the pixel values of the beef cattle's image that captured greatly affects the actual value of the body length and width of chest of the beef cattle. 2. The use informatics techniques of image-based to determine the weight of Timor's beef cattle, can be done in two modes namely, the manual mode by means of inputting the defining point of body length and width of chest of beef cattle on cattle image that displayed on the computer monitor, and can also be done automatically without inputting the point. This automatic system that we proposed namely the maximum expectation mode. 3. Determine the weight of Timor's beef cattle done with image-based method using conversion formula that standardized and generally recognized ACKNOWLEDGMENT This study was supported by Ministry of Research, Technology, and Higher Education of Republic of Indonesia in 2016