Measurement of injury rate on fish skin and performance comparison based on L*A*B* and HSV color spaces

This paper analyses and compares the performance of L*A*B* and HSV color spaces and applies them to calculate the injury rate on fish. To do these issues, the following steps are done. An original image is transformed into L*A*B and HSV color spaces. A channel “a” is separated from L*A*B* color space. In channel a, a formula to adjust “channel a value” is proposed to realize the shapes of injury on fish clearly and a new channel a is obtained by adjusting the channel a. The new channel “a” is converted into injury binary image by manual threshold. Otsu’s method is applied converted the original channel a image of fish shape into binary image. Finally, by calculating the number of pixels of areas of shape and total injury of fish, the injury rate is calculated. The steps of image processing of HSV color space is similar to L*A*B* color space. The proposed process are tested on fish.


Introduction
"Machine vision", as a crucial part of sorting systems, enables automatic and non-destructive selecting of products that satisfy certain requirements. There are many different methodologies for image processing in recent years. Therefore, choosing a right color space in processing algorithms is crucial. Eyarkai et al. described that mangoes were measured during ripening in 24 hours and evaluated using L*A*B* and RGB color coordinates [1]. Using exactly color space is important for controlling of food quality. Ivana et al. measured color of food products by using L*A*B* and RGB color space [2]. In this paper, fruit quality based on L*A*B* color space is more accurate than RGB color space. On the other hand, Hitesh et al. used image processing technique to detect fish disease [3]. This issue is done by using image processing algorithms based on L*A*B* and HSV color spaces. A method to measure injury rate of fish surface based on K-means clustering image segmentation was represented by Sheng el at. [4]. This method calculated injury rate based on S channel of HSV color space. After that, Otsu's threshold was applied to converted S channel into binary image, and calculate injury rate by counting area pixels of injuries and total shape on fish. The results showed that the injury rate of fish could be measured using image segmentation algorithm. Generally, L*A*B* and HSV color spaces are the two frequently chosen color spaces for pre-processing step in image segmentation.
It is very important to determine which HSV color space or L*A*B* is suitable for calculating injury rate on fish. This paper compares and chooses a right color space for measurment of injury rate on fish and the steps of image processing algorithm is proposed to measure injury rate on fish in L*A*B*color space. Moreover, a value of channel "a" to realize injury on fish clearly is adjusted by the proposed algorithm. The experimental results are verified that the proposed image processing algorithm is more effective in L*A*B* color space than in HSV color space.
2 Proposed process based on L*A*B* color space L*A*B* is defined by CIE and specified by the International Commission on Illumination [5]. In the Fig. 1, the central vertical axis is lightness (L*) which have range of value from 0 to 100 (black to white). The coordinate axes follows channel "a". If value of channel" a" is positive value, color of channel "a" is red. Color of channel "a" is green if value is negative. Channel "b" is similar to channel "a". Positive value is yellow and negative value is blue. There are three channels: Luminance (L) and other two color channels are "a" and "b" known as chromaticity layers.
In this section, an image processing algoriyhm based on L*A*B* and HSV color spaces to obtain the injured rate of fish is proposed as the flowchart in Fig. 2. An original color image is transformed into L*A*B* and HSV color spaces sequentially. After separating channel "a" from L*A*B* color space, there are two tasks done in this image: Firstly, channel "a" is converted into binary image by Otsu's method. After that, area's value of the shape on the binary image is calculated by counting pixels. This step is shown in the flowchart of Fig. 2.
Secondly, a method to adjust value of channel "a" is proposed to realize injury on fish clearly after original channel "a" image applies Gaussian filter to reduce random "noises"an image applying the adjusted value is called as a new channel "a" image. The formula for adjusting value of channel "a" is as follows: where h is a coefficient which depends on conditional environment, and x and y is coordinate of pixels. The new channel "a" image adjusted by Eq. (1) applies Gaussian filter to filter the rest of noises with Kernel coefficient chosen by manual. For next step, this image is converted into binary image by choosing a manual threshold method. This threshold operation can be expressed as [6]:  Gaussian filter is applied to filter the random of noises in this image converted into L*A*B* color space and HSV color space. That is, the following Gaussian filter is applied to the images with Kernel coefficient chosen by manual [6].
where µx and µy is the mean, and σx and σy represent variances with respect to the variables x and y, respectively.
Finally, by counting the area pixels of injury and shape of fish, an injury rate of fish is calculated as follows [4]:

Experiment results and conclusions
An original color image of fish in Fig. 3 is converted into L*A*B* and HSV color spaces in Fig. 4. The original channel "a" image of fish is separated from L*A*B* color space as shown in Fig. 5a. Fig. 5b shows the new channel a image adjusting value of the original channel "a" of fish using the proposed Eq. (1). The original channel "a" image of the shape of fish is converted into binary image from by using Otsu's Method. Likewhile, the new channel "a" image of fish injuries are converted into binary images by choosing a manual threshold method using Eq. (2). Channel "a" of L*A*B* color space is sensitive to the red color, so adjusting value of channel "a" helps clear realization of injury area on fish. All of the results are presented in Fig. 6a and Fig. 6b. The image processing of HSV color space is similar to that of L*A*B* color space. The results are presented in Fig. 7, Fig. 8a and Fig. 8b. The results of counting pixels on areas of binary images of shape and injuries, and their injury rates based on L*A*B* color space and HSV color space are show in Table 1.  Finally, the injury rate based on areas of shape and total injuries of fish is calculated by Eq. (4). The proposed algorithms are tested by practical experiment on fish. There are four injury objects on the fish in Fig. 3. The proposed process of image processing applied L*A*B* color space also has four injury object as shown in Fig. 6b whereas there are six injury objects on HSV color space as shown in Fig. 6b. It means that process of image processing is effected "noise" on HSV color space. The injury rate of fish using L*A*B* and HSV color spaces is 12.17% and 15.79% on Table 1, respectively. The injury rate using the proposed image processing algorithm based on L*A*B* color space is 12.17% and is close to the real injury rate of 9.54% than that of based on HSV color space.

Conclusions
In this paper, comparison in performance using L*A*B* and HSV color spaces and measurement of injury rate on fish skin were presented. A new image processing algorithm based on L*A*B* color space is proposed to measure injury rate on fish. A new formula is proposed to adjust value of channel "a" in detecting injured areas on fish clearly. By calculating the number of pixels of areas of shape and total injury, the injury rate were calculated. By using the proposed image processing algorithm based on L*A*B* color space, the injury rate is 12.17% and close to the real injury rate of 9.54%. The experimental results showed that the proposed image processing method using L*A*B* color space is better in measuring the injury rate than that of HSV color space in this application.