Weight Measurement and Identification of Cow Type Using Computer Vision Method

Cows are farm animals that have been commonly cultivated in Indonesia and have become one of the cultures and can be used for meat and milk for consumption or cows can be used to plow rice fields, especially in areas where processing of agricultural land is still traditional, given the benefits of cattle farming. Very important in the current modern era, maintenance and feed factors are very influential on the quality of the condition of the cow that will affect the weight and size of the cow. The meat and feed processing system can now use computer technology or known as biotechnology and Smart Farmer namely the system, which can be used to monitor and identify the type of cow and even the state of the cow pen itself. Maintenance and monitoring techniques for the type and weight of cattle can use image processing techniques, where cow health and weight can be calculated by measuring the length and width of the chest circumference, the image processing system will accurately process and calculate the weight of cattle in 2D or 3D data display, segmentation process will be processed, while the introduction of the type of cow serves to determine the type, nature, and feed of the cow. This type of cattle measurement system with image processing can help farmers in this modern era to measure weight, recognize species, so as to save time and effort without hurting habitat and disrupting cattle growth.


Introduction
Computer Vision techniques are currently widely used and implemented in various fields with easy application methods and configurations, one of which is agriculture or better known as Agriculture has applied the concept of smart farming and the concept of biotechnology, by means of genetic engineering on food products from agricultural products and feed and fresh meat from livestock products. The technology is implemented in the field of animal husbandry namely on cattle, both dairy or broiler cows where there are many types of cattle in Indonesia. The different processes and types of feed affect the weight and quality of milk and meat produced to a maximum. At this time, when the process of measuring and maintaining cattle is still done manually and is expensive, the function of calculating the weight of cows is so that farmers do not lose, the current measurement process can use winter and scroll formulas with measurements of chest circumference and the length of the formula can be implemented in language programming and made into applications that can help farmers and are easy to use. Measuring the weight and body of a cow can be done by several methods namely by measuring body length and chest circumference, which will multiply the weight of the cow with a percentage of the calculation called carcass, which is the measurement of the weight of the cow minus the size between 52-58% of the weight of the cow itself [1]. At this time, farmers can measure the weight of cattle by utilizing Image Processing technique by measuring the circle of cow's chest then the data is processed with Preprocessing rocks by using the features provided namely cropping, resize and the RGB to Gray modifier feature [2]. The weight measurement system in cattle can be done by measuring the length and circumference of the chest, because it has a linear calculation and a positive correlation value. The other method used is the calculation of carcass on the calculation of the body of the cow [3]. The benefits of reducing the outward appearance of cattle can be used to make calculation about the amount of milk and meat that can be produced from cattle. A calculation that can be used as a measurement is the point of the spine until the shoulder, then the lower body that connects with the back elbow. This method can be called Pin Bone [4]. (1)

BB = Body weight (kg) FK = correction factor (cm) DD = In the chest
Another method for estimating cattle weight is using the Template Matching Technique. This method works by comparing two images captured and converted from one pixel that is converted into centimeters so that the height of the cow can be known and can be directly entered into the calculation formula [5]. Whereas, in other methods used is the use of template matching that is by comparing objects with the background from the data, then derived in the formula by selecting the area of the image. The data can be combined with the type and age constant of the cow [6].

Methodology
The following are computer vision methods to measure weight and identification of cow types. The steps above are a stage of weight measurement method and identification of cattle types with the following stages.

GLCM method
This method is widely developed and used for research that is useful for recognizing a pattern, whether it's an object. This system is expected with the computer vision method where the data taken will be extracted to eliminate noise from the background of other objects, as long as the results of the reduction of the GLCM data become more accurate.

Open CV method
Open CV or open method Computer vision is a feature that exists in image processing technology. This feature will provide a pattern or data in the form of a library as a support for the application to be created.

Weight measurement
In measuring this weight method data taken from camera input or photo is analyzed with image processing, the image data is then converted into pixels using the GLCM method, where the pixel value is converted into centimeter format, the value of the variable centimeter is then calculated by carcass weight measurement method and the winter and scroll formula, the data calculated in the form of chest circumference and cow's body length from neck to tail, measurements taken from the neck circumference because the carcass system will ignore the weight of the head and feet.

Results and Discussion
In testing the system this time, the author uses images from various sources from the internet that will be used as training data and test data which will be processed using image processing techniques and GLCM methods. This system produces weight calculations which based on pixel and area and perimeter calculations, calculated between pixel and distance of image taken. The surf algorithm method is used to identify the features of the type of cow that will be identified, the feature will look for special features in each picture of the type of cow taken from the feature shape and skin color that is converted in grey level form. In Figure 2 is the input type of cow that will be entered into the database using Image Processing technique, where the image will be entered into the database has been changed into binary numbers with more than 14 types of cattle. In Table 1 is the calculation of sample images of 14 types of cows each type has 30 samples of data that are converted into binary number form. The data is then stored into a database that will be used as a dataset. The more datasets used, it will increase the accuracy of the application to be made.  In Figure 4 is a test of data using a GUI-shaped application, identified by the system is "Scott Highland" type of cow by comparing the GLCM feature data. This Scottish type cow is calculated by comparing the data of 10 types of cattle with 480 samples of other types of cattle.  In Figure 6 is the output of a system where the calculation of cattle weight is around 416 kg. In Figure 7 is the output of a system where the calculation of cattle weight is around 260 kg. In Figure 8 is the output of a system where the calculation of the weight of the cow is about 363 kg. In Figure 9 is the process of reading GLCM data using C language which will process the image taken into several values namely 'contrast', 'correlation', 'energy', 'homogeneity'. A: In the picture above, an image of an Angus type cow that can be seen is black and has a sturdy body shape.
B: In the picture above is the process of processing data with pattern matching techniques, the system reads data features and characterizes angus type cattle ranging from the size of the head and tail of the cow's head, the data will be used as training data. C: In the picture above is a form of Brahman cow from those who have a camel-like bow with black stripes. D: In the picture above is a picture of Brahman cow. Where the computer vision data technique takes a unique form, the form of the Brahman cow reads the pattern of the shape of the cow starting from the head, horn, and tail, each of the unique feature data will be stored in the database. E: In the picture above is a Dexter type cow that has a unique feature with brown color and larger belly size. F: In the picture, a unique pattern retrieval technique from Dexter type cattle is performed, ranging from the form of the cow's head to the stomach and tail legs. In Figure 11 is a unique feature search with Computer vision technique in Dexter type cattle, the computer recognizes the "Dexter" type of cow by reading features from the shape of the ear, bow, leg, and jaw, the image used is the Dexter type of cow with an image different. In Figure 12 is a unique feature retrieval on the type of "belted" cow, a matching and unique feature found in the feathers whose pattern is the back leg. In Figure 13 is a unique feature retrieval in Brahma cows located in the lower legs and abdomen. In Figure 14 is a unique feature retrieval in Dexter type cattle that are read by a computer that is on the back, legs, and abdomen

Conclusion
From the results of the experiment, it can be concluded that, the method of measuring the weight of cattle with Computer Vision can be implemented by segmentation techniques, where the image data of cattle is converted by the GLCM method where the number of pixels converted into cm. The designed system is made in C language with output data weights and type of cow. This system is easy to use and implement. For further research, application development is made in the form of a mobile to make it easy to carry and add a dataset, so that the accuracy of the type of cow readings becomes higher, the output of the information system of the type of feed and the description of the type of disease from the cow.