International Journal of Electrical and Computer Engineering (IJECE) Vol. No. February 2017, pp. ISSN: 2088-8708. DOI: 10. 11591/ijece. Identity Analysis of Egg Based on Digital and Thermal Imaging: Image Processing and Counting Object Concept Sunardi1. Anton Yudhana2. Shoffan Saifullah3 Department of Electrical Engineering. Universitas Ahmad Dahlan Master of Informatics Engineering. Universitas Ahmad Dahlan Article Info ABSTRACT Article history: This research was conducted to analyze the identification of eggs. The research processes use two tools, namely thermal imaging camera and smartphone camera. The identification process was done by using Matlab prototype tools. The image has been acquired by means of proficiency level, then analyzed and applied several methods. Image acquisition results of thermal imaging camera are processed using morphological dilation and do the complement in black and white (BW). While the digital image uses the merger method of morphological dilation and opening, and it doesn't need to be complemented. Labeling process is done, and the process of determining centroid and bounding box. The process has been done and it can be applied for identifying of chicken eggs with the accuracy rate of 100%. There are different methods of both images is obtained area . which is equivalent to the difference is very small as 6 x 10 -3. Received Sep 22, 2016 Revised Nov 28, 2016 Accepted Dec 15, 2016 Keyword: Centroid and bounding box Digital image Morphology Thermal imaging Copyright A 2017 Institute of Advanced Engineering and Science. All rights reserved. Corresponding Author: Shoffan Saifullah. Master of Informatics Engineering. Universitas Ahmad Dahlan. Jl. Prof. Soepomo. Janturan-55164. Yogyakarta . Indonesia. Email: shoffan_s@yahoo. INTRODUCTION Image processing can be done with an object that has been formed into a digital image. In the digital image formation, it can be performed by using the image capture tools. Image acquisition is done with thermal imaging . ased on hea. and ordinary image . uch as a real objec. Thermal imaging is a technique using infrared energy that is not visible to the human eye, emitted by the object is then converted into heat visual image . Basically, every object above a temperature of 0 absolute emits thermal energy in the form of infrared. So, every object can be identified by using a thermal imaging camera. The digital image is an image taken with a smartphone camera that produces images exactly in accordance with the state of the The concept of digital image is a reflection like a mirror, which describes the real object looks like the The concept of thermal imaging explains that the objects are above a temperature of 0 . may be inanimate objects or living things, including chicken eggs. The object-shelled eggs that contain a live embryo produced by poultry . hickens, ducks, birds, etc. ) . Chicken eggs under normal circumstances . ot an engine coolin. or when incubated have hot temperatures. For that enables the identification of eggs image processing by using a thermal imaging camera. The use of this camera does not produce any radiation or negative effects on the eggs and the environment because it does not emit infrared rays or other electromagnetic waves, but absorbs infrared rays from the heat radiation emitted by the objects . The eggs image processing analysis process conducted by using thermal imaging technology based on the identification manual. Eggs are an analog image which must be converted into digital images for image processing . o-called imagin. The imaging process using a thermal imaging camera and a Journal homepage: http://iaesjournal. com/online/index. php/IJECE IJECE ISSN: 2088-8708 smartphone camera. So, it gets two different digital image processing to be performed comparison good image of the thermal imaging camera image and the image of the smartphone camera. With the digital technology based on heat . hermal imagin. can be used to detect the chicken eggs that emit heat. This technology is used to assist in the imaging process prior to the testing process until the image preprocessing and conducted comparing with ordinary digital images ranging from the process of image analysis, image acquisition, the resulting histogram, and image processing methods used and the results. Image Acquisition Color Image (RGB) Grayscale Image Threshold Otsu Image Acquisition Color Image (RGB) Histogram Grayscale Image RESEARCH METHOD The methodology was used is shown in our previous research . The data collection was done by taking a picture of chicken eggs using an FLIR thermal imaging camera and a smartphone camera at the position . rder of different egg. The analysis will facilitate the design of the system to be created. As well as the methods used for the comparison of image processing on the thermal imaging camera and a smartphone camera. The system use Matlab application to create a prototype in performing image processing stages chicken eggs. The design is done with two grooves research methods by a process flow as in Figure 1. The test system is done by processing image data using Matlab as a prototype application. Histogram Threshold Otsu Image Black White Black White Image Dilation & Opening (Morpholog. DIlation (Morphology Centroid & Bounding Box Centroid & Bounding Box Labelling Labelling . Figure 1. Steps Design of Image Processing Chicken Eggs . Ordinary image, . Thermal Imagery Based on the above picture can be seen the difference of two image processing. In ordinary image using morphological dilation and opening (Figure 1. ), while the thermal image using dilation only (Figure 1. The process of determining centroid and bounding box directly processed, while the thermal image of the complement process must be done in advance, that is, change the value to the image of black and white (BW) which was originally 1 was changed to 0 and vice versa. Quality classification of eggs based on the cleanliness of the eggshell using a sample consisting of 90 eggs from each of 30 chicken eggs quality I. II, and i. The algorithm used is a first order statistics and the second order for feature extraction, and K-Nearest Neighbor (KNN) as a Euclidean-based classification The success rate of research is 88. 89% . The application of computer vision and segmentation techniques in classifying the physical size of eggs by weight. This research was conducted by using a web camera tool and processes using image segmentation method for image sharing, according to the criteria of similarity and color intensity to approach regression analysis weighting based on the number of pixels the Testing the classification of 36 samples of chicken eggs shows the accuracy rate of 100% and accuracy of 42% weighting approach . The detection system of the embryo in an egg carried by webcam, the detection process egg embryos using thresholding method to identify eggs by separating the egg with a background object and calculating the number of pixels of the object being formed. The process of detection using a threshold of 50 eggs on egg embryos, which have a success rate of 100%. The process of egg detection on the condition of broken eggs obtained a success rate of 91. So from all of the data retrieval with all conditions of eggs obtained the error of 1. 8% and a success rate of 98. 2% . Classification of chicken eggs and quail eggs using connected component analysis method, this method was successfully applied to the segmentation Identity Analysis of Egg Based on Digital and Thermal Imaging: Image Processing and . (Sunard. A ISSN: 2088-8708 process chicken eggs and quail eggs with the black background. The resulting level of accuracy of 100% and able to give a classification on some type of egg based weighting approach. If detected not a chicken or quail eggs, then the program will not perform the calculation of the number of eggs . The introduction of the eggs can be done by using a feature extraction based on the characteristics of the color image. The method used is the centroid classifier and preprocessing is done by changing the image of RGB into HSV (Hue. Saturation, and Valu. The results obtained are duck eggs have an average hue characteristic between 0. 089 to 0. 094 and an average saturation of between 0. 12 to 0. Domestic chicken eggs have an average hue characteristic between 0. 033 to 0. 053 and an average saturation of between 0. 52 to 62, while the chicken eggs have an average hue characteristic between 0. 061 to 0. 068 and an average saturation of between 0. The introduction of the usual types of chicken eggs and chicken eggs omega-3 using the method of statistical analysis that is using the first-order differences in physical shape and color of the eggs. The method used in image processing that is changing the value of gray, image contrast enhancement, filtering with a Gaussian filter, histogram equalization, thresholding segmentation Otsu, and the first-order statistics in the classification. The result is able to distinguish ordinary chicken eggs and chicken eggs omega-3 with the difference in the value of statistics . Thermal imaging technology can be used to detect hatching eggs in the incubator for 16 days. The state of the eggs in the incubator for 4-16 days to do research with thermal imaging technology. The analysis was conducted based on the curve of the cold, cold regions, development, oval shape and morphology of the eggs, as well as the extraction of eggs using Region of Interest (ROI). In this research shows that the egg is not fertilized within 4 days was 89. 6%, and the embryo eggs in 16 days was 96. 3% of the total . Determination of fertility egg and early embryo using hyperspectral imaging with sample data used are 170 chicken eggs . eggs were fertile, and 18 are not fertil. The method used using Region of Interest (ROI) in the extraction characteristics and K-Means to its classification. Research is showing the results of classification for all the eggs on each day of incubation is the day 1st is 65. 29%, the 2nd day is 61. 18%, the 3rd day that is 72. 94%, and the 4th day is 84. Lower classification results on Day 1 and Day 2, which shows that embryonic development is difficult to detect during the first 2 days at the time the eggs were in the incubator . The use of thermal imaging in identifying and filtering on the fertile eggs. Image processing using the Sobel operator to search for an outside line on the eggs and fuzzy theory is used to obtain the best threshold values on the broken egg is using grayscale matrix co-occurrence. Then the system can make an assessment of whether each egg is good or bad. The accuracy of the system can reach 96%, and the detection rate of 2-3 seconds . The use of a simple morphological characteristic measurements of the leaf shapes . sing parameter2/are. , had effectiveness between 52% and 74% in differentiating the two types of plants depending on the size of the plant. And the neural network allows the system to learn and distinguish between species with an accuracy more than 75% . Segmentation of retinal vessels is done, and propose two automatic blood vessel segmentation methods. The first proposed algorithm starts with the extraction of blood vessel centerline pixels. The final segmentation is obtained using an iterative region growing method . se binary images on on normalized retinal image. In the second proposed algorithm the blood vessel is segmented using normalized modified morphological operations and neuro fuzzy classifier. Normalized morphological operations are used to enhance the vessels and neuro fuzzy classifier is used to segment retinal blood vessels. The results demonstrate that the first algorithms are very effective methods to detect retinal blood vessels . A novel segmentation method based on combination local mean of grey-scale and local variance of gradient magnitude. The proposed extraction begins with normalization of the fingerprint. Then, it is followed by foreground region separation from the background. Finally, the gradient coherence approach is used to detect the noise regions existed in the foreground. Experimental results on NIST-Database14 fingerprint images indicate that the proposed method gives the impressive results . A new algorithm based on empirical mode decomposition algorithm for the histogram of the input image will generate the number of clusters and initial centroids required for clustering. It overcomes the shortage of random initialization in traditional clustering and achieves high computational speed by reducing the number of iterations. The experimental results show that multiple feature Fuzzy Cmeans has segmented the microarray image more accurately than other algorithms . The method aims at detecting defective areas in a tile, based on extracting features of edge defects. In the proposed method, first, in order to extract frequency characteristics resistant against transference. Undecimated Discrete Wavelet Packets transform is applied on images. Later, by computing local entropy values on high-frequency sub-bands images, those which appropriately include images defects are chosen to extract statistical features. Finally. Back propagation neural network method is used to determine segmented images containing defective areas. The obtained results, both visually and computationally indicate the higher efficacy of this method compared with the related state of the art methods . IJECE Vol. No. February 2017 : 200 Ae 208 IJECE ISSN: 2088-8708 Based on the research conducted, researchers will make a difference in image processing from the use of methods, analysis, and use methods that have been done but by combining them. In a study done by using centroid and the bounding box in determining the object and the area of chicken eggs, and used comparison preprocessing process, the methods used, and the results of image processing between the thermal imaging and digital image of the ordinary. Image Acquisition The image is a representation . , likeness or imitation of an object . Image acquisition is the initial stage to get a digital image. The purpose of image acquisition to determine the necessary data and choose the method of digital image recording. The histogram is defined as a statistical probability distribution of each level of gray . in the digital image . By using this method can be performed for flattening the histogram of the image exist, so that the image can be grouped by level of the intensity values of pixels of different colors. In the gray image (Grayscal. 8 bits, there are 256 levels of intensity values different intensity. Morphology and Image Segmentation Morphology is an image processing technique that is based on the shape of a segment or region . In morphology there are several operations of which are used in this study are dilation operation erosion operation and opening operation. Image segmentation is done to separate the object with the background. The separation process aims to simplify the process so that the object classification and counting of eggs in the image can be grouped appropriately and were counted accurately. Segmentation has been done to the clustering process . Operation binarisms is the segmentation process of a grayscale image to produce a binary image. Binaries process requires a threshold value (T), the process of finding the threshold value is called thresholding the Image thresholding is a simple, yet effective, way of partitioning an image into a foreground and background . Centroid and Bounding Box The centroid is the middle value of an object is detected, and the bounding box is a function that serves to make the appropriate box the size of the object identified . And to assist in the process of determining the centroid and the bounding box required regionprops process. Regionprops is a method used to measure a set of properties from every region that have been labeled in the matrix label . , . RESULTS AND ANALYSIS Results obtained from the study with a prototype using Matlab will be presented starting from preprocessing to image processing and get the result. Preprocessing (Original (Colo. Image becomes Grayscal. The process preprocessing of the captured image FLIR thermal imager camera and image capture results from a smartphone camera. The initial process is to change the color image (RGB) into a gray image . to flatten the intensity of color possessed by the color image . The imagery used is the image of a chicken egg that had been taken from two of these tools. Image processing on the initial preprocessing process is done by changing the image of a chicken egg into a grayscale image as can be seen in Figure 1. Figure 2. Image with Thermal Imaging Camera . Color Image, . Grayscale Image. and Smartphone Camera . Color Image, . Grayscale Image Identity Analysis of Egg Based on Digital and Thermal Imaging: Image Processing and . (Sunard. A ISSN: 2088-8708 Figure 2 shows the results of the conversion of a color image into a grayscale image. For the imagery of thermal imaging showed a significant difference between the color image (Figure 2. ) with a grayscale image (Figure 2. ), but to the image of the smartphone camera showed the same results (Figure 2. and Figure 2. ) when viewed with the naked eye, because the eggs are taken sample is an egg that has a white color and the background approaching grayish black stripes. Histogram Analysis of Chicken Eggs Image Thermal Image Original image (Figure 3. ) and grayscale image (Figure 4. ) give different histogram. Original image show histogram with all of image component (Red. Green, and Blu. Based on the comparison of Figure 3. and Figure 4. obtained the result that the grayscale image histogram, average pixel intensity obtained in a given area between range 0-256. Figure 3. Original Image (Colo. , . Histogram Color Image (Composit. , . Histogram Each Color . Figure 4. Grayscale Image, . Histogram Image Grayscale Digital Image Based on the comparison of Figure 5. and Figure 6. obtained the result that the grayscale image histogram, average pixel intensity obtained as well as in the thermal image. But in this case, the histogram looks almost the same as the original image is similar to a grayscale image that resembles the color components over a grayscale image. Histogram color images of both thermal and ordinary image obtained from combining each color histogram of each color image based on RGB (Red. Green. Blu. in Figure 3. and Figure 5. Each color made its histogram are then combined into one (Figure 3. and Figure 5. Figure 5. Original Image (Colo. , . Histogran Color Image (Composit. , . Histogram Each Color IJECE Vol. No. February 2017 : 200 Ae 208 IJECE ISSN: 2088-8708 Figure 6. Grayscale Image, . Histogram Image Grayscale The sample used in the analysis is the image eggs histogram taken from the thermal imaging camera (Figure 3. and Figure 4. ) and smartphone camera (Figure 5. and Figure 6. Based on comparative analysis of the histogram of color and grayscale, grayscale images . sing a threshold Ots. obtained the intensity of the color is flatter than the color image histogram is apparent that the color histogram produces color spreads (Figure 5. ), and grayscale images closer section (Figure 6. , which is denser and has a flat The Process of Dilation at Grayscale Image The process of egg produced dilation image shown in Figure 7. Figure 7. Results of Operations Image Processing with Dilation to the morphology . Thermal image, . Ordinary Image Dilation operation performed to enlarge the size of the segment. In this image (Figure 7. ) of the dilation process is carried out using Strel 'diamond', so that in the picture there are a lot of parallelograms (Figure 7. Convert Image Into a Grayscale Image Black White (BW) The results of the process of dilation converted to images in black and white (Figura 8. ), and then do the complement (Figure 8. ) will be used for calculating the centroid that exist in the image thermal, white color represents a value of 1 indicating that there are objects and will look for value centroidnya, and black represents a value of 0 which is background exists in the image. As for the usual image (Figure 9. ) of the opening process for separating objects that merge or eliminate small objects . preads nois. so that the object detected is egg alone (Figure 9. Figure 8. Thermal Images . Results of Conversion to BW, . Complement of BW Identity Analysis of Egg Based on Digital and Thermal Imaging: Image Processing and . (Sunard. A ISSN: 2088-8708 . Figure 9. Ordinary Image . Results of Conversion to BW, . dilation of Grayscale and Opening of BW Results Labeling. Centroid Determination Process and Bounding Box Image processing results obtained from the object recognition eggs image (Figure . Image processing group . here are 6 egg. showed 6 egg object is obtained. The result of labelling, centroid and bunding box have shown in Figure 10. with label 1a until 6a from thermal image, and Figure 10. with label 1b until 6b from digital image. Figure 10. Image Processing Group Eggs with Centroid and Determination of Places with Label . Thermal Image, . Digital Image Table 1. Results of Image Processing Rated Centroid (X. Y) and Total area (Pixe. Data Label Name Label 2 Label 4 Label 6 Label 1 Label 3 Label 5 Label 1 Label 4 Label 6 Label 2 Label 3 Label 5 Centroid 157,4644 252,8494 316,6732 242,5348 439,646 226,9189 150,2861 131,9372 311,1539 114,8167 435,1202 80,8753 292,8835 568,9425 745,0305 590,7513 1062,455 635,166 355,0213 220,1738 710,2647 239,8836 1049,499 285,3825 Total Area (Pixe. 1089,0033 1103,0033 1117,0033 1082,0033 1096,0033 1110,0033 1082,0027 1103,0027 1117,0027 1089,0027 1096,0027 1110,0027 Centroid X and Y with the value of reading is started from matrices . , wherein the matrix starting at the top left corner point. From Table 1 it can be seen that by using a thermal image and ordinary image obtained data have Total Area (Pixe. Equivalent (O) or close to the same. So as to obtain the ratio of the area as Table 2. IJECE Vol. No. February 2017 : 200 Ae 208 IJECE ISSN: 2088-8708 Table 2. Comparison of Total Area (Pixe. Based on Table 2 and Figure 10 . Data Data Figure . Label 2 Label 4 Label 6 Label 1 Label 3 Label 5 Label 2 Label 4 Label 6 Label 1 Label 5 Label 6 Total Area Equivalent . Pixel Pixel 1089,0033 1089,0027 1103,0033 1103,0027 1117,0033 1117,0027 1082,0033 1082,0027 1096,0033 1096,0027 1110,0033 1110,0027 Based on an egg-based image processing of thermal imaging and outstanding image that has been done, it can be concluded that the image processing can be done and get the results can determine the number of eggs in the capture with the FLIR thermal imaging camera and a smartphone camera. The use of methods that distinguish for image processing. The comparison is shown in Table 3. Table 3. Comparison of Image Processing and Results Thermal Image Image Digital Morphological Dilation Morphological Dilation and Opening Complement Indetified Indetified Total Area (Pixe. is known Total Area (Pixe. is Note Differences in morphological image processing that is used is the usual image needs to be done to separate the process of opening and objects that combine or eliminate noise. The thermal image process must be done complement of BW image that has been processed to be a recognizable object to be determined value of the centroid and the bounding box. All the images can be identified for all objects eggs that have been Of the two images obtained Total Area equivalent. CONCLUSION The Result shows that the identification process chicken eggs using a thermal imaging camera and a smartphone camera can work 100% with the obtained difference morphological processes and analysis of objects by changing to complement. So from the image processing centroid and the bounding box can be seen and count of object. Although there are differences, the results of the counting area . of both are equivalent to the difference is very small as 6 x 10-3. REFERENCES