Detection of Fish Freshness Using Image Processing

DOI : 10.17577/IJERTCONV5IS09042

Download Full-Text PDF Cite this Publication

Text Only Version

Detection of Fish Freshness Using Image Processing

  1. Alaimahal1,S.Shruthi2, M.Vijayalakshmi3, P.Vimala4

    1Assistant professor , 2,3,4UG students Department of Electronics and Communication Engineering

    Velammal College of Engineering and Technology,Madurai-625009

    Abstract: This paper proposes an automatic, efficient and non-destructive image processing method for segmentation and calculation of freshness of the fish sample. The fish sample is automatically segmented using a clustering based method and its features are tactically extracted in the wavelet transformation domain using Haar filter. Three levels of decomposition is performed and the coefficients obtained at each level have been analyzed to calculate the freshness of the fish sample. This paper presents an ingredient-based recognition method.

    Keywords: Watershed Transformation Method, Wavelet Transformation Domain, Ingredient-Based Recognition Method


    Fisheries around the world provide food and income, along with traditional cultural identity. Constituting about 6.3 percentage of the global fish production, the sector contributes to 1.1 percentage of the GDP and 5.15 percentage of the agricultural GDP. The total fish production of 10.07 million metric tons currently has nearly 65 percentage contribution from the inland sector and nearly the same from culture fisheries. Image-based automatic systems: this kind of system explores color and morphological characteristics of an image to infer the disease. Since there is no human interaction, this kind of approach tends to be very fast. Moreover, such a high degree of autonomy means that a system like this may be used to supervise vast areas without the need for humans to go to the field.

    Fish disease is dreadful because it spreads overnight through water to neighboring aqua-farms. Therefore, high speed and precise diagnosis is required. This paper explains a new method for detecting the freshness of the fish sample provided as input. Actually this method overcomes the problem of less accuracy and favours faster detection than manual methods.


      Zhu et. all examines the structure and mechanics of fish scales (on the example of striped bass – Morone saxatilis)

      [13] with the help of image processing methodologies. This helps to carry out diagnostics fish diseases. J. Hu et. all uses computer vision to diagnose fish diseases [14]. Diagnosis process is based on classification of species of fish based on colour and texture features. Colour and texture sub images of skin of fish samples were obtained from original images. Colour & statistical texture features are obtained by a wavelet analysis. H. Yao et. all for fish disease studies about contour extraction from images [15]. In order to improve the accuracy of fish image segmentation, a new fish images segmentation method is proposed which is a combination of K-means clustering algorithm and mathematical morphology. H. Chakravorty, et. all uses various image processing methods to study fish diseases [2].

      Despite the ability of using various methods of processing and analyzing the image, how these images are displayed should be considered. The possibility of application of separate methods for analysis and image processing allows: to choose the most comprehensible method of analysis and image processing, to optimize study of fish diseases anda to increase a productivity and an overall performance of system of intellectual analysis of data. This conclusion is based on the fact that many fish disease can be observed visually where fish diseases affect the surface of the fish body which make it possible to see and analyze.

      Detection of fish freshness is done by

      1. Getting the input image and preprocessing using reshaping and Gaussian filtering process, 2)Segmentation using watershed transformation method, 3)Feature extraction 4)K-NN


        Fig (a): Flow diagram


          Image pre-processing can significantly increase the reliability of an optical inspection. Several filter operations which intensify or reduce certain image details enable an easier or faster evaluation. Here, preprocessing is done using Reshaping and Gaussian filtering process.

          Image Resizing or image interpolation occurs when we resize or alter our image from one pixel grid to another. Image resizing is necessary when we need to increase or decrease the total number of pixels, whereas remapping can occur when we are correcting for lens distortion or rotating an image.

          During Gaussian filtering each individual pixel is replaced with a Gaussian shaped blob with the same total weight as the original intensity value. This Gaussian is also known to be convolution kernel. It renders small structures invisible, and smoothens sharp edges. The size of the filter impacts the amount of blurring in result image.

          Gaussian function is defined as,

          Fig (b): Gaussian Distribution

        2. SEGMENTATION:

          We use Watershed transformation for segmentation.

          In image processing, a watershed is a transformation defined only on a grayscale image. The name literally refers to a geological watershed, or drainage divide, which separates adjacent drainage basins.

          • The watershed transformation considers the image like a topographic map, with the brightness of each point representing its height, finds the outline that run along the tops of ridges.

          • There are different technical definitions for a watershed. In graphs, watershed lines may be defined on the nodes, on the edges, or hybrid lines on nodes and edges. It may also be defined in the continuous domain.

          • There are also many algorithms to compute watersheds. Watershed algorithm is used in image processing mainly for segmentation purposes.

          Two basic approaches to watershed image segmentation.

          • The first step is to find a downstream path from each pixel of the image to a local minimum of image surface altitude.

          • A catchment basin is the set of pixels for which their respective downstream paths all wind up in the same altitude minimum.

          (, ) =





          Gaussian distribution for mean(0,0) and standard deviation=0 would be,

          While this method would work well in the continuous space with the watershed lines accurately separating the adjacent catchment basins, the watersheds in images with large plateaus may be quite thick in discrete spaces.

          The watershed transform is a unique technique for segmenting digital images that use a type of region growing methods based on image gradient.The concept of Watershed Transform is based on visualizing an image in three dimensions: two spatial coordinates vs gray levels. In such a topographic elucidation, we consider three types of points:

          (A).Points belonging to a regional minimum. (B).Points at which a drop of water, if placed at the location of any of those points, would reduce with certainty to a single minimum.

          (C).Points at which water would be likely to fall to more than one such minimum.

          For a particular regional minimum, the sets of poi ts satisfying condition (B) is called watershed of that minimum. The points satisfying condition (C) from crest lines on the topographic surface and are termed divide lines or watershed lines.

          The watershed transforms effectively combines the element from both the discontinuity and similarity based methods.Since its original development in grayscale images, the watershed Transform has been extended to applied colour mages main advantages of

          A.The resulting boundaries form closed and connected regions.Traditional edge based techniques most often form incoherent boundaries that need post-processing to produce closed regions.

  2. The boundaries of the resutling regions always correspond to contours which appear in the image as obvious contours of objects.This is in contrast to split and merge methods where the first splitting is often a simple regular partitioning of the image leading sometimes to unstable results.

C.The union of all the regions forms the e ntire image region.



      In general, the mean value theorem states that for a given a planar arc between two endpoints, there is at least one point at which the tangent to the arc is parallel to the secant through its endpoints.

      This theorem is used prove that a function on an interval starting from local hypotheses about derivatives at points of the interval.

      More precisely, if a function f [display style], which is continuous on the closed interval[a, b]

      and differentiable on the open interval ( a , b ) then there exists a point c in (a,b) such that,

      () ()

      Standard deviation

      In statistics, the standard deviation represented by the letter sigma , is a measure that is used to quantify the amount of variation or dispersion of a set of data values.

      A low standard deviation represents that the data points tend to be close to the mean (also called the expected value) of the set, while a high standard deviation indicates that the data points are spread out over a wider range of values.

      Variance :

      Mainly, the algorithms for calculating variance play a major role in computational statistics.

      An important difficulty in the design of good algorithms for this problem is that formulae for the variance may involve sums of squares, which can lead to numerical instability and also toarithmetic overflow when dealing with large values.

      Local Binary Pattern :

      Local Binary Pattern (LBP) is a simple and very efficient texture operator which labels the pixels of an image by thresholding the neighborhood of each pixel and considers the result as a binary number. Due to this discriminative power and computational simplicity, LBP texture operator has become a popular approach in various applications. It can be a unified approach to the traditionally divergent statistical and structural models of texture analysis. But, the most important property of the LBP operator in real- world applications is its robustness to monotonic gray- scale changes caused, like illumination variations. It is also computational simple, which makes it possible to analyze images in challenging real-time settings.

      • Algorithms for calculating variance play a major role in computational statistics.

      • A key difficulty in the design of good algorithms for this problem is that formulas for the variance may involve sums of squares, which can lead to numerical instability as well as to arithmetic overflow when dealing with large values.


In pattern classification, the k-nn algorithm is a technique for classifying objects based on closest training examples in the problem space.

The k-nearest neighbor algorithm is the simplest of all machine learning algorithms: an object is classified by a majority choice of its neighbors, with the object being assigned to the class most common amongst its k nearest neighbors. If k = 1, then the object is assigned to the class of its nearest neighbor.

This algorithm functions as follows [12]:

  1. Compute Euclidean or Mahalanobis distance from target plot to sampled image part.

  2. Order samples according to the calculated distances.

    () =

  3. Pick heuristically optimal k nearest neighbor based on RMSE done by cross validation technique.

  4. Compute an inverse distance weighted average with the k-nearest multivariate neighbors

The k-NN algorithm is also adapted for use in estimating continuous variables. One such execution uses an inverse distance weighted average of the k-nearest multivariate neighbors.KNN can be used for both classification and regression predictive problems. The KNN algorithm is first implemented by introducing some notations S = (xi, yi), i = 1,2,N is considered the training set, where xi is the d- dimensional feature vector, and yi {+1, 1} is associated with the observed class labels. For simplicity, here we consider a binary classification. It is supposed that all training data are iid samples of random variables (X, Y) with unknown distribution.

With former labeled samples as the training set S, the KNN algorithm constructs a local subregion P(x)d of the input space, which is situated at the estimation point x. The predicting region P(x) contains the closest training points to x, which is written as follows:


The detailed algorithm for k nearest neighbour algorthim is given below:

Fig (d): KNN classifier


    For the verification of the proposed method, we measured the proper detection performance and correct recognition rate. In the comparison, we counted as success detection if gill area is detected and recognition rate are measured for all extracted regions.

    First, the measured correct detection rate is 90% where only 3 images of 30 test images are failed.

    In this paper, we proposed an image processing based fish disease diagnosis system which allows prior treatment of infected fish to prevent the spread of disease.

    using Watershed clustering technique, The segmented input image into three clusters in Figure 5 and it is clear that Cluster1correctly segment the diseased portion. In this experiment , we are partitioning the input images into Cluster 1,2 and 3 yields good segmentation as per requirement. Watershed clustering algorithms technique used successfully in shrimp having infected part detection in the detection of the fish freshness


In this work, we consider the prospect of using digital image processing methodology to detect and diagnose fish diseases by determining the infected areas on fish body. To do this, we proposed an image processing based fish disease diagnosis system which helps earlier treatment of infected fish to prevent the spread of disease. The system is composed of extracting affected area from the image and making final diagnosis from results of clustering.By applying the series of image processing techniques, we can computerize the procedure of fish disease diagnosis. Experimental results show that the proposed system is more convenient, consistent, and rapid in the diagnosis fish disease rather than general diagnosis method byfish- veterinarians.


  1. Jeong-Seon Park,Myng-Joo and Soonhee Han, Fish Disease Diagnosis System Based on Image Processing of Pathogens Microscopic images, Frontiers in the convergence of Bioscience and Information(2007).

  2. Hitesh Chakravorthy, Rituraj Paul,Prodipto Das, Image Processing technique to detect fish disease, International Journal of Computer science &Security(2015).

  3. XU Miao-jun,ZHANG jian-ke,LI Hui , A \Method for Fish Diseases Diagnosis Basedon Rough set and FCM clusteringAlgorithm , Third international ConferenceSystem Design and Engineering Application(2013).

  4. Valentine Lyubchenko, RamiMatarneh,Oleg Kobylin,VyacheslavLyashenko, Digital Image Processing Techinique for Detection and Diagnosis of

  5. Disease, Internatinonal Journal of Advanced Reasearch in Computer Science and Software Engineering(2016).

  6. Band, Sowmya, Sheelarani, B., 20 09. Colour image segmentation using soft computing techniques. Int. J. Soft Comput. Appl. 4, 69e80. Das, T., Pal, A.K., Chakraborty, S.K., Manush, S.M., Sahu, .P., Mukherjee, S.C., 2005.

  7. Thermal tolerance, growth and oxygen consumption of Labeo rohita fry (Hamilton, 1822) acclimated to four temperatures. J. Therm. Biol. 30 (2005), 378e383.

  8. Dubey, Shiv Ram, Jalal, Anand Singh, 2014. Fruit disease recognition using improved sum and difference histogram from images. Int. J. Appl. Pattern Recognit. 1 (2), 199e220.

  9. J.G.A.Barbedo ,2013: Digital image processing techniques for detecting, quantifying and classifying plant diseases. Springer Plus 2013 2:660.

  10. Computer-Aided Disease Diagnosis In Aquaculture: Current State And Perspectives For The Future Jayme G. A. Barbedo_Brazilian Agricultural Research Corporation (Embrapa)Revista Innover, Volume 1, Número 1, Março 2014.

  11. D.A.Bashish, ,M.Braik and S.Bani-Ahmed, 2011Detection and Classification of Leaf Diseases using K-means-based Segmentation and Neural-networks-based Classification,Information Technology Journal 10 (2) : 267

    – 275, 2011. ISSN 1812-5638/DOI:10.3923/itj.2011.267.275

    @ 2011 Asian Network for Scientific Information

  12. Liu Yang. Department of Computer Science and Engineering,Michigan State University, 2006.Distance metric learning: a comprehensive survey.

  13. Bishop CM Pattern Recognition and Machine learning (Information Science and Statistics) New York,USA:Springer;2007.

  14. Zhu, D., Ortega, C. F., Motamedi, R., Szewciw, L., Vernerey, F., Barthelat, F. (2012). Structure and mechanical performance of a modern fish scale. Advanced Engineering Materials, 14(4), B185-B194.

[15] Hu, J., Li, D., Duan, Q., Han, Y., Chen, G., Si, X. (2012). Fish species classification by color, texture and multi-class support vector machine using computer vision. Computers and electronics in agriculture, 88, 133-140.

[16] S.W.Lee,J.S.Park,2011.,"MicroscopicImageRecognitionbase dFishDiseaseDiagnosisSystem,JournalofConvergenceInfor mationTechnology(JCIT) Volume6, Number10, October2011 doi:10.4156/jcit.vol6.issue10.45.

Leave a Reply