Performance Comparison of Edge Detection Method for Extracting Images of Lutjanus spp. Contour

Lutjanus spp. is one of the 72 genera of fish species which includes to the Lutjanidae family around the world. The Lutjanus spp. is healthy for consumption and suitable for fishing tourism. The production volume increased by 6.21% between 2001 and 2011 to produce over 118608 tons. However, about 10 species are experiencing population decline. This is because the data of captured fisheries production is still limited, making it challenging to identify the species resulting in overfishing of certain species. The process of identifying the species is based on morphometric characteristics using edge detection. This method involves a pattern identification technique by detecting outlines at the boundaries of objects in the image. In this research, several edge detection algorithms were conducted following many steps to clarify contour extraction of Lutjanus spp. (L. argentimaculatus, L. bohar, L. carponatatus, L. fulviflamma, and L. sebae). The steps included image preprocessing, shape extraction with edge detection algorithms involving the Sobel, Canny, and Laplacian operations, and visual evaluation. The results showed that the three algorithms could be used to extract the contours of Lutjanus spp. The Laplacian algorithm produced the best performance because it could extract the contours with a success rate of 89.88% without noise or broken contours.


I. INTRODUCTION
The Lutjanidae family is a marine fish with about 72 species, including the Snapper (Lutjanus spp.) genera. This type of fish has many unique characteristics besides being spread across the world [1]. According to [2]; [3], a total of 33 genera species live in Indonesian waters.
The Lutjanus spp. is healthy for consumption and suitable for fishing tourism [4]. The production volume increased by 6.21% between 2001 and 2011 to produce over 118608 tons [5]. However, about 10 species are experiencing population decline [6]; [7]. This is because the data of captured fisheries production is still limited, making it challenging to identify the species resulting in overfishing of certain species.
The identification process can be carried out based on morphometric characteristics [8]. [9] explained that morphometrics provides a comprehensive picture of the biota body shape, hence, it is valuable for identifying and determining the differences between fish species [10].
Contour extraction involves taking out shape features and characteristics of an object from the line and contour configurations [11]. Additionally, feature extraction involves taking the unique characteristics to obtain a value and analyze it by counting the number of points. This aims to find significant features in the image depending on the intrinsic characteristics and application. The region can be defined in a global or local environment and distinguished by shape, texture, size, intensity, statistical properties, and others [12].
Edge detection is a crucial operation that becomes the initial standard in the image pattern analysis process in contour extraction [13]; [14]; [15]. It aims at identifying geometric object information such as shape, size, and location since the image analysis results directly depend on the detection [15]; [16]. In this research, an information relevance test was conducted to determine the effectiveness of several edge detection algorithms on objects.
According to [14], image processing techniques are widely used to measure fish automatically in processing industries. This research took images involving Lutjanus spp. (L. argentimaculatus, L. bohar, L. carponatatus, L. fulviflamma, and L. sebae) fish species. However, an analytical approach was necessary to strengthen the analysis.
Several previous research obtained interesting results using edge detection algorithms. For instance, many general fields such as medical detection [17], detection of sea surface temperature using satellite imagery [18], fingerprint detection [19], and detection of road barriers in the transportation sector [20] use detection algorithms. [13] showed that the canny operating performance was better among the other algorithms tested to identify different fish categories. However, according to [21], the performance of Sobel operations proved to work better in the identification of freshwater fish species. [22] further confirmed that Laplacian operations were superior to certain object features on fish (fins).
The objective of this research was to compare the performance of edge detection involving Sobel, Canny, and Laplacian algorithms based on various image quality assessment parameters to extract object contours. However, image preprocessing and segmentation were carried out first to obtain a non-perforated binary image object. The significance of this process was to recognize the built fish image that can be utilized by various fields. The crucial point to note about this process is its impact on aquaculture economic factors such as health, condition, size, and the number of fish species [23].

II. RELATED WORKS
In this research, we will compare the performance of 3 edge detection algorithms, namely Canny, Sobel and Laplacian, for contour extraction on Lutjanus spp. Several studies have used edge detection algorithms, namely: [24] used the Sobel, Prewitt, Roberts, and Canny algorithms to detect numbers from motorbike plates; in this study, the data used were 50 images of motorbike plates. Then it can be concluded that Sobel's algorithm has better accuracy than Priwit, Robert, and Canny, namely an accuracy of 90%.
[25] study used the Sobel, Prewitt, Roberts, Laplacian, and Canny algorithms to detect facial image contours. In this study, the data used were two facial images, namely Trisha and Diya. Then it can be concluded that Canny's algorithm has the best performance with entropy and PSNR on Tisha images 1.5701 and 10.9043 and Diya images 1.5477 and 9.6982. [26] study used the Sobel, Prewitt, Roberts, Laplacian, and Canny algorithms to detect Acropora branches underwater. In this study, 100 Acropora branching image data were used. Then it can be concluded that the Canny algorithm is better at removing most of the noise in underwater images than the other algorithms used. Besides being better at eliminating noise, Canny also had better MSE and PSNR values, namely 0.010 and 67.99.
In [27] research , the Canny, Sobel, Prewitt, Roberts, and Laplacian algorithms were used to extract shapes from 720 images consisting of 10 categories, namely: the bed, bird, fish, guitar, hammer, horse, sink, teddy, TV and toilet. The results obtained show that Laplacian has the best performance. In the [14] study, the Sobel, Prewitt, Roberts, Laplacian, and Canny algorithms were used to detect edges in Rohu and Tuna fish; this study used data from the QUT fish database. Then it can be concluded that the Laplacian algorithm has a lower MSE and a higher PSNR, namely 0.0451 and 51.59.
Based on this research, it can be concluded that the best results from the edge detection algorithm can vary depending on the data or object to be detected to find out the best edge detection algorithm for contour extraction in Lutjanus species (L. argentimaculatus, L. bohar, L. carponotatus, L. fulviflamma, and L. sebae) so in this study, the capabilities of the Sobel, Canny, and Laplacian algorithms were tested. The aim is to find the best algorithm that can detect the contours of the Lutjanus species without any noise and broken contour lines.

III. PROPOSED METHODS
The stages involved in this research included data acquisition, image preprocessing, morphological operations, shape extraction, thinning, analysis and evaluation. The flow of the research stages is shown in Figure 1.

B. Image preprocess
The preprocessing stage was crucial in preparing the image before entering the segmentation stage. This stage also involved image conversion, image scaling, and thresholding. Image conversion was performed by converting the original image into a grayscale image, while image scaling involved proportionally changing the image size, 256 x 256 pixels. Additionally, thresholding was performed to convert grayscale into a binary image with a threshold value ranging from 1 to 255.

C. Operation morphology
At this stage, the morphological operation technique is a digital image processing technique based on the shape of segments. This method was used to correct the incomplete fish binary image or noise (there is still a black dot in the middle of the fish image) [28]. Additionally, segmentation was performed by distinguishing between objects and backgrounds. The morphological operation consists of dilation, erosion, closing, and opening operations [29]. The dilation operation was performed to enlarge the object by adding layers around the object (equation 1) [28]. Additionally, the erosion operation was carried out to reduce the object by decreasing the layer around the object (Equation 2) [28]. The closing operation was a combination of the dilation and erosion operations where the image around the object was first reduced and then the result enlarged (Equation 3) [28]. Furthermore, the opening operation was a combination of erosion and dilation operations, which involved the enlargement of the image around the object and the result reduced (Equation 4) [28].

D. Sobel operation
At this stage, the Sobel operation technique was used to extract the shape image of the Lutjanus species. It is a matrix formed from the first partial derivative of a function on each of its elements. The Sobel operation used a 3×3 kernel for pixel gradient calculations where the axis direction was used as filters, as shown in Figure 3 [30]. The Sobel operation performs edge detection by paying attention to the vertical and horizontal edges. The calculation involved multiplying the neighbor matrix with the axis, which resulted in a horizontal search. Thereafter, a multiplication was conducted between the neighbor matrix with the axis, which resulted in a vertical search. The results were then added together to produce the horizontal and vertical searches, as seen in Equation 5 [31].

E. Canny operation
The stage involved the shape extraction of the Lutjanus spp. fish using the canny operation technique. This technique (optimal edge detection) is an edge detection operation that uses a multi-stage algorithm to detect various edges in an image.
The canny operation has 3 criteria as follows: • Maximizing the value of the signal to noise ratio to enable proper detection such that there is no different • Having minimal distance between the edge pixel position and the edge position (preferably 0) • Responding to a single edge Based on these criteria, the following Equation 6 was generated: h(x) = a1e α cos(wx) + a2e α sin(wx) + a3e −α cos(wx) + a4e −α sin(wx) (6) However, the equation was quite challenging to implement, thus, the canny operation used a gaussian filter to reduce noise. The Canny operation technique is able to detect the exact points even when the object has noise with a minimum error rate [32].

F. Laplacian operation
At this point, the shape extraction of the Lutjanus spp. used the Laplacian operation technique formed from the second derivative, with properties that are more sensitive to noise besides producing a double edge. Therefore, Laplacian operations in edge detection are generally not used directly but are combined with a kernel. The representation of the second derivative in the form of a Laplacian operating kernel is shown in Figure 4.

G. Thinning
The image resulting from the edge detection operation was threshold with an intensity value below 100, after which the fast parallel thinning algorithm was used. The Thinning method was used based on the Zhang and Suen algorithm (Equation 8). This involves changing the image resulting from morphological operations into an image that displays object boundaries making one pixel thick [33]. B(P 1 ) = P 2 + P 3 + P 4 + ⋯ + P 8 + P 9 (8)

H. Visual evaluation
During this stage, a visual evaluation of the segmented image was carried out using edge detection algorithms (Sobel, Canny, and Laplacian). This was needed to compare the performance of the three algorithms in extracting contours.

A. Image preprocess
Before the segmentation process, the image was first scaled by changing the image size from 1450×1080 pixels to 256×256 pixels to help to save the execution time. The results of image scaling are shown in Figure 5. Afterwards, removing the background was conducted to get a white background. This was necessary to obtain different intensities between objects and the background. The results of background removal are shown in Figure 6. The image obtained after the completion of the two processes was converted into a grayscale object. This helped to simplify the image model into a 1-layer matrix since grayscale objects have a choice of red, green, and blue channels. This research used the combination of the 3 channels because the color of each fish species is different. The results of change the input image to grayscale are shown in Figure 7.

B. Segmentation process
After obtaining the grayscale image, the following step involved fish contour extraction using an edge detection algorithm. First, the thresholding process was conducted to have a binary image using a thresholding value in the range of 235 -245, as shown in Figure 8. The binary image was reprocessed using morphological operations (dilation and erosion) to repair the hollow object (the presence of a white image on the object) and obtain the morphological results as shown in Figure 9. The parameters of the threshold value, the size of the disc dilation, and erosion were different for each sample. After obtaining a non-perforated binary image, the contour extraction was conducted using Sobel, Canny, and Laplacian edge detection algorithms. The first experiment was conducted using the Sobel operation technique, and the results showed the technique was excellent at extracting fish contours, as shown in Figure 10. However, there were still some broken contours resulting in a thickness of 3-4 pixels. The second experiment involved the Canny detection technique, which results showed the absence of broken contours and the resulting noise (white dots inside the detected contour). The results of Canny detection segmentation are shown in Figure 11. Furthermore, the results obtained from the use of Laplacian surgery had no trace of broken contours. However, the thickness of the resulting contour was 3-4 pixels, as shown in Figure 11. The difference between these three algorithms is based on the thickness of the detected contours, where the Sobel and Laplacian had a thickness of 3-4 pixels while the Canny was 1-2 pixels. The edge detection algorithms results showed that Sobel detects contours with a thickness of 3-4 pixels with a few broken lines. Therefore, to optimize the performance of the algorithm, it is necessary to repair the broken contours using thresholding and past parallel thinning technique to thin out the contour to 1 pixel. The treatment on the results of the Laplacian segmentation requires thinning the contour to 1 pixel. Contour thinning helps extract geometric features of objects. The results of contour improvement and thinning are shown in Figure 13.

C. Visual evaluation
The three detection algorithms were implemented on five species of Lutjanus spp. with 122 fish image samples. The visual evaluation was performed by providing 1, 2, and 3 assessments based on the extracted contours. The available image samples included L. argentimaculatus, L. bohar, L. carponotatus, L. fulviflamma, and L. sebae. Assessment 1 was conducted in case there were broken contours and noise (Figure 7a), assessment 2 was given if there were broken contours or noise (Figure 7b), and assessment 3 in case the contours were extracted perfectly (Figure 7c).
Each species was calculated as a total sample with a assesment of 1, 2, and 3 follwed by percentage calculation (Figure 8) because the data from each of the Lutjanus spp. species was different.  Figure 8 shows that 14.2 for L. carponotatus is the highest percentage for assessment 1 using the Sobel operation edge detection algorithm. The results indicate that Sobel operation is not good in extracting the L. carponotatus contours. Furthermore, the highest percentage for assessment 3 is 100 for L. bohar using the Sobel operation edge detection algorithm. This shows that the Sobel operation technique is exceptional in extracting L. bohar contours. The highest percentage of assessment 3 is L. bohar (100%) using the Laplacian operation edge detection algorithm. This shows that the Laplacian operation technique extracts L. bohar contours perfectly. The average percentage of success in extracting the contours of Lutjanus spp. from each detection algorithm based on the visual assessment results helped to calculate the whole data ( Figure 9). The results showed that the Laplacian operation algorithm had 89.88% as the highest average percentage in assessment 3, followed by Canny detection at 70.56%, and finally, Sobel operation at 0%. This indicated that the Laplacian operation was the best in extracting the contours of the Lutjanus spp. fish species. Furthermore, Figure 9 also shows that none of the edge detection algorithms using Laplacian operation was included in the assessment category 1.

A. Conclusions
The Sobel, Laplacian, and Canny algorithms were used to evaluate the extraction of contour images of five species which include to the Lutjanus spp. The algorithms are used to extract images based on their group structure. For instance, the Sobel operation uses the first partial derivative, and Laplacian is formed through the second derivative, while Canny uses a multi-stage algorithm. The results showed that the Laplacian algorithm had the best performance at 89.88% without noise and broken contours. These findings will help taxonomists to identify the species Lutjanus spp. automatically.

B. Suggestions
This study has succeeded in extracting the contours of Lutjanus spp.. The edge detection algorithm with the best performance is Laplacian, so Laplacian is good to use for further research aiming to extract contour features of Lutjanus spp..