+ All Categories
Home > Documents > Accurate Fruits Fault Detection in Agricultural Products...

Accurate Fruits Fault Detection in Agricultural Products...

Date post: 21-Mar-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
12
International Journal of Agricultural Management and Development, 6(2): 181-192, June, 2016. 181 Accurate Fruits Fault Detection in Agricultural Products Using an Efficient Algorithm Hamidreza Saberkari Keywords: Fault, DCT transform, Noise, Image processing Received: 24 August 2015, Accepted: 03 October 2015 T he main purpose of this paper was to introduce an efficient algorithm for fault identification in fruits images. First, input image was de-noised using the combination of Block Matching and 3D filtering (BM3D) and Principle Component Analysis (PCA) model. Afterward, in order to reduce the size of images and increase the execution speed, refined Discrete Cosine Transform (DCT) algorithm was utilized. Finally, for segmentation, fuzzy clustering algorithm with spatial information was applied on the compressed image. Implementation results in MATLAB environment and based on the gathered data showed that the proposed algorithm contains a good capability in de-noising. Also, in the proposed method, identification accuracy of faulty regions in fruit was higher than other methods. The major advantage of the proposed method was its high speed which makes it appropriate for real time applications. Abstract International Journal of Agricultural Management and Development (IJAMAD) Available online on: www.ijamad.iaurasht.ac.ir ISSN: 2159-5852 (Print) ISSN:2159-5860 (Online) Department of Electrical Engineering, Rasht Branch, Islamic Azad University, Rasht, Iran. * Corresponding author’s email: [email protected]
Transcript
Page 1: Accurate Fruits Fault Detection in Agricultural Products ...journals.iau.ir/article_523364_165e1383d13ad8a1f83d710f187a3b8c.pdf · and textile industry. Among them, one of the most

Inte

rnat

iona

l Jou

rnal

of A

gric

ultu

ral M

anag

emen

t and

Dev

elop

men

t, 6(

2): 1

81-1

92, J

une,

201

6.

181

Accurate Fruits Fault Detection in Agricultural ProductsUsing an Efficient Algorithm

Hamidreza Saberkari

Keywords: Fault, DCT transform,Noise, Image processing

Received: 24 August 2015,Accepted: 03 October 2015 The main purpose of this paper was to introduce an efficient

algorithm for fault identification in fruits images. First,input image was de-noised using the combination of BlockMatching and 3D filtering (BM3D) and Principle ComponentAnalysis (PCA) model. Afterward, in order to reduce the sizeof images and increase the execution speed, refined DiscreteCosine Transform (DCT) algorithm was utilized. Finally, forsegmentation, fuzzy clustering algorithm with spatial informationwas applied on the compressed image. Implementation resultsin MATLAB environment and based on the gathered datashowed that the proposed algorithm contains a good capabilityin de-noising. Also, in the proposed method, identificationaccuracy of faulty regions in fruit was higher than other methods.The major advantage of the proposed method was its highspeed which makes it appropriate for real time applications.

Abstract

International Journal of Agricultural Management and Development (IJAMAD)Available online on: www.ijamad.iaurasht.ac.irISSN: 2159-5852 (Print)ISSN:2159-5860 (Online)

Department of Electrical Engineering, Rasht Branch, Islamic Azad University, Rasht, Iran.* Corresponding author’s email: [email protected]

Page 2: Accurate Fruits Fault Detection in Agricultural Products ...journals.iau.ir/article_523364_165e1383d13ad8a1f83d710f187a3b8c.pdf · and textile industry. Among them, one of the most

Inte

rnat

iona

l Jou

rnal

of A

gric

ultu

ral M

anag

emen

t and

Dev

elop

men

t, 6(

2): 1

81-1

92, J

une,

201

6.

182

INTRODUCTIONIn recent decades, image processing systems

have been used in order to automatically controlmany processes and analyze them in differentfields such as food, agriculture, and pharmacyand textile industry. Among them, one of themost popular applications of image processingand machine vision is the quality inspection ofagricultural products such as fruits and vegetablesbased on shape, color, and the fault in them(Arumugam et al., 2011). For judging the qualityof this type of agricultural products, machinevision systems use digital cameras to takeimages, and then these images are analyzedthrough image processing systems (Abbot, 1999).

Among variety of agricultural products, applesuffers from so many faults. This fruit containsso many changes in skin color. Based on themarket standard published by the Europeancommission, apple quality depends on the size,color, shape and presence/absence of fault in it(Izadbakhshi and Javadikia, 2014). Traditionally,spoiled fruits are separated from high definitionones by manpower, which is very tedious andtime-consuming (Malamas et al., 2003). Thus,mechanizing this process using image processingsystems leads to increase the identification speedand in the same time, error cancelation and ac-curacy growth (Brosnan and Sun, 2002; Gravesand Batchelor, 2003). Identifying healthy fruitsfrom faulty ones faces major challenges, whichsome of them are (Hills, 1995; Halls et al., 1998):

• Lighting conditions when imaging the fruit:Create shadow or lighting spots on the fruit dueto glossy surface of fruits,

• Inappropriate background for the fruit whenimaging: If the background has different colorsor the same color as the fruit, fruit identificationand also finding faulty regions becomes difficult,

• Different fruits in one image: In an imagecontaining different fruits with different colors,finding fruits from the background gets difficult.For this reason, this condition is consideredthat there must be just a single type of fruit, and

• Appearance change of some fruits: Thisproblem causes different distributions of colorin different spots of the fruit, which causesproblem while extracting feature out of it.

A variety of algorithms is proposed for fruit faultidentification in references. (Linker et al., 2012)proposed an algorithm to estimate the number ofapples in color images of gardens under naturallight which consists of four min steps; identifyingpixels that belong to apples with high probability,using color and smoothness, forming and devel-oping core areas which are interconnected setsbelonging to apples with high probability, andpartitioning these seed areas into disordered partsand arcs, and combining these arcs and comparingthe obtained circles with a simple model of anapple. Although the algorithm correctly detectsmore than 85 percent of visible apples in images,straight light and color saturation leads to somany positive detections. (Payne et al., 2013)proposed a method to estimate mango crop usingimage analysis. This method is for countingmango from daily images of individual trees formachine vision goals based on estimating themango tree crops. Images of mango trees aretaken in a three-day period, three weeks beforethe commercial harvest. Fruits of one of each 15tress are counted manual, and these trees areimaged from four sides. Correlation betweennumber of trees and manual counting is strong(for two sides). Five hundred fifty five trees areimaged from one side. In these images, pixelsare partitioned using color partitioning in RGBcolor space and YCbCr color space. The obtainedpallets have been counted to achieve the numberof mangos in images. Algorithm efficiency reduceswith increasing the number of fruits of tree andwhen imaging in terms of direct sunlight. (Mizushi-ma and Lu, 2013) presented a segmentationmethod to arrange apples and classify it usingOtsu method and support vector machine (SVM)classifier. This method consists of three sections;color separation using linear SVM, color imagetransformation into gray-scale and automatic andadjustable segmentation using Otsu algorithm.This method requires the minimum number oftraining data. Also it prevents challenges thatfruit color and light conditions changes can bring.(Ramano et al., 2012) applied laser light anddigital images combination to estimate the moistcontent and color in sweet pepper. Optical devicesare increasingly used for more accuracy and

Accurate Fruits Fault Detection in Agricultural Products / Saberkari

Page 3: Accurate Fruits Fault Detection in Agricultural Products ...journals.iau.ir/article_523364_165e1383d13ad8a1f83d710f187a3b8c.pdf · and textile industry. Among them, one of the most

Inte

rnat

iona

l Jou

rnal

of A

gric

ultu

ral M

anag

emen

t and

Dev

elop

men

t, 6(

2): 1

81-1

92, J

une,

201

6.

183

faster access when monitoring the quality ofagricultural products. The main work done byis evaluation using charge-coupled device (CCD)camera along with light-emitting diode (LEDs)which their radiation wavelength is 532 nm and632 nm, respectively. So the changes in moistcontent of green, yellow and red sweet peppercan be analyzed during the drying process. Resultsshow that diffusion area and light intensity havethe ability to predict moist content of sweet pepperduring drying. In addition, light diffusion changesin accordance with different depths in the surfacethat the picture is taken. Also the result that achange in tissue structure may make photonsscatter over the surface and change distributionlevels was achieved. (Moradi et al., 2011) usedthe statistical histogram based on fuzzy-C means(FCM) to identify fault of apple. First, the inputimage is transformed from RGB workspaceinto workspace. After that, shape of the fruit isextracted by active contour model (ACM).Finally, the image is partitioned by SHFCM al-gorithm. Experimental results displays that FCMand SHFCM have equal number of repeat timesto complete the process of partitioning and theirresults are the same. However, proposed SHFCMalgorithm has a higher speed than the standardFCM. The accuracy of the proposed algorithmabout resulting images for FCM and SHFCMare 91 percent and 96 percent for intact pixelsand defective pixels, respectively. But theproblem of this algorithm is its high computationcomplexity because of using active contourmodel, and an optimal algorithm is required tominimize energy in active contour model. Inthe other work done by (Moradi et al., 2012),

expectation-maximization (EM) segmentationalgorithm is used for fault identification inapple. In this method, the input image is trans-formed from RGB workspace into workspace.Then, fruit shape is extracted by ACM. Eventually,image is partitioned by SHEM algorithm. Resultsindicate that EM and SHEM show pretty equalperformances with equal repeats. The discussedSHEM algorithm spends less time than standardEM algorithm. The accuracy of the proposedalgorithm for EM and SHEM are respectively91.72 percent and 94.86 percent for intact pixelsand defective pixels (Rakun et al., 2011).

In this paper, an optimal algorithm is presentedin order to fault identification in fruit images.First, input image is de-noised using black matchingand 3D filtering (BM3D) and principle componentanalysis (PCA) combined model. Then, modifiedversion of discrete cosine transform (DCT) algo-rithm is used in order to reduce image size andincrease speed of the segmentation task. Finallyin partitioning stage, we have used the fuzzyclustering algorithm based on the spatial informationof neighboring pixels in the compressed image.

The rest of the paper is as follows: In Section 2,materials and methods used in this paper is presentedwhich consist of our proposed algorithm and itsdifferent steps. Implementation results consistingof two experimental phases on gathered data bythe author is expressed in Section 3. Finally, Section4 includes the conclusion of the paper.

MATERIALS AND METHODSFigure 1 shows block diagram of the proposed

algorithm. Different steps of the raised algorithmare as follows, which will be explained:

Accurate Fruits Fault Detection in Agricultural Products / Saberkari

Figure 1: Block diagram of the proposed algorithm

Page 4: Accurate Fruits Fault Detection in Agricultural Products ...journals.iau.ir/article_523364_165e1383d13ad8a1f83d710f187a3b8c.pdf · and textile industry. Among them, one of the most

Inte

rnat

iona

l Jou

rnal

of A

gric

ultu

ral M

anag

emen

t and

Dev

elop

men

t, 6(

2): 1

81-1

92, J

une,

201

6.

184

• Preprocessing step in order to remove noiseusing BM3D and PCA combined algorithm,

• Image compression to reduce its size, and• Fault identification using fuzzy clustering

algorithm with spatial data.

Preprocessing stage to De-Noise using BM3Dand PCA Combined Algorithm

In the presented algorithm, BM3D and PCAcombined model (Dabov et al., 2009) is used tode-noise the image. This model is demonstratedin Figure 2. Assume that the input image is de-molished by additive white Gaussian noise withaverage of zero and variance of σ2. The inputimage is scanned array, and for each processedpixel, the following procedure is applied:

• For each pixel being processed, adaptive-shape neighborhood with the centrality of thepixel can be found using eight-fold LPA-ICImodel based on (Foi et al., 2007). The neigh-borhood is located within a square block of afixed size. This block is called reference block.The number of pixels in the neighborhood isshown by Nel,

• Blocks similar to the reference block arefound using block-matching method and usingthe method mentioned in the previous step, weextract the adaptive-shape neighborhood fromeach one of these matching blocks. The numberof matching blocks are shown by Ngr,

• Determining a conversion and applying iton adaptive-shape neighborhoods. For this pur-pose, we consider a threshold level () and

review two states:1) If the ratio is Ngr/Nel ≥, this means that an

acceptable number of neighboring pixels areselected to estimate PCA matrix. Eigenvectorsof this matrix form base vectors of PCA. Thusin this step, only eigenvectors (which the eigen-values corresponding to them are higher thanthe defined threshold level), are selected.

2) If the ratio is Ngr/Nel <, it means that a suf-ficient number of similar neighboring pixels arenot selected as training data for PCA model. Thus,a certain amount is selected for eigenvector.

• Forming a three-dimensional array by connectingadaptive-shape neighborhoods (min Ngr, N2) withthe block reference that has the highest similarity.is a fixed parameter which limits the number offiltered neighborhoods.

• Applying the transformation used in step (3)to each one of adaptive-shape neighborhood groups.In this step, A one-dimensional orthogonal trans-formation (such as wavelet transformation) is alsoapplied to each one of three-dimensional groups,

• Applying hard-thresholding to three-dimen-sional spectrum in order to shrinkage the image,

• Applying a three-dimensional reverse trans-formation from step (5) to find estimations ineach of adaptive-shape neighborhood groups, and

• Returning obtained estimations to theiroriginal positions using weighed averaging.

Compressing the De-Noised image to reduceits size

The size of the de-noised original image is

Accurate Fruits Fault Detection in Agricultural Products / Saberkari

Figure 2: Block diagram of the proposed De-Noising algorithm

Page 5: Accurate Fruits Fault Detection in Agricultural Products ...journals.iau.ir/article_523364_165e1383d13ad8a1f83d710f187a3b8c.pdf · and textile industry. Among them, one of the most

Inte

rnat

iona

l Jou

rnal

of A

gric

ultu

ral M

anag

emen

t and

Dev

elop

men

t, 6(

2): 1

81-1

92, J

une,

201

6.

185

3264×1836, which must be compressed. Thesize of the input image is reduced because it isvery high and heavily increases computationalcost in the next steps. In this study, in additionto accurately identify faulty areas of fruits,being a real-time system contains a great im-portance. In this paper, method presented byhas been proposed which is based on theimproved version of DCT transform to compressde-noised image. DCT transformation is mainlyused for compressing signals and images due toenergy savings and lack of correlation of samples.More details of this algorithm are explained by(Saberkari and Shamsi, 2012).

Fault identification using fuzzy clustering al-gorithm with spatial neighboring information

In this paper, fuzzy clustering algorithm(Bezdek, 1987) with spatial information isapplied for segmenting the compressed images.Fuzzy clustering algorithm allocates pixels toclasses by adapting the fuzzy membership func-tions. Assume that X= (x1, x2,...xn) is an imagewith N pixels which belongs to c cluster. Fuzzyclustering algorithm attempts to perform seg-mentation by minimizing cost function. Costfunction in this algorithm is defined as follows:

(1)

which V=[v1, v2,…,vc] is cluster center vectorand N is the number of input data. ij Showsmembership of xj pixel in ith cluster. Also, m isconstant number which controls fuzziness ofpartitions. In our proposed algorithm, m changesfrom 1.2 to 5. Euclidean distance norm (||.||)which is the distance between pixels and averageof clusters is achieved as:

(2)where AD is a diagonal matrix defined as:

(3)

The deviation of xk from vi can be seen fromequation (3). Equation (1) can be rewrittenusing Lagrange multipliers as follows:

(4)

Considering above equation and the conditionsD2

ikA>0,i, k and m>1, the cost function is min-imized. Therefore, the memberships functionand cluster center are updated as follows:

(5)

The above equation displays as weighted av-erage of data points which belong to a cluster,such as weighs are the membership matrixes.

One of important characteristics of fruit imagesis high intensity correlation between a pixeland its neighbor pixels. In the other words,these neighboring pixels have similar features;in a way that the probability that a certain pixelbelongs to neighboring pixels class is high.Considering the importance of spatial dependence,the need to enter a locative parameter in seg-mentation algorithms based on intensity appears.Therefore, we enter hij spatial function intofuzzy clustering algorithm and call it fuzzyclustering algorithm with spatial information(Saberkari et al., 2015).

(6)

Nxj indicates a square window with centralityof xj in spatial field, which in this article a 5×5window is used. If majority of neighborhoodsof a pixel belong to the same class, then, spatialfunction hij will be maximum for a central pixel.Implementation process of fuzzy clustering al-gorithm with spatial data is the same as fuzzyclustering algorithm and its membership functionchanges as below:

(7)

Accurate Fruits Fault Detection in Agricultural Products / Saberkari

Page 6: Accurate Fruits Fault Detection in Agricultural Products ...journals.iau.ir/article_523364_165e1383d13ad8a1f83d710f187a3b8c.pdf · and textile industry. Among them, one of the most

Inte

rnat

iona

l Jou

rnal

of A

gric

ultu

ral M

anag

emen

t and

Dev

elop

men

t, 6(

2): 1

81-1

92, J

une,

201

6.

186

where p and q are control parameters of bothfunctions. In first step, like fuzzy clustering al-gorithm, membership functions are computed.In second step, membership function data ismapped into spatial scope and then spatial func-tion is computed out of it. The considerablenote is that in homogenous areas spatial functionis similar to original membership function. So,clustering result does not change. But for pixelscontaining noise, the equation above reducesnoisy cluster weight by labeling its neighboringpixels. As a result, incorrectly classified pixelsare easily corrected from noisy areas. Fuzzyclustering algorithm with spatial data is imple-mented as the block diagram shown in Figure 3.

RESULTES AND DISCUSSIONImage acquisition device used in this paper is

composed of a high resolution (2364×1836pixels) monochrome digital camera, four inter-ference band pass filters, a frame grabber, a dif-fusely illuminated tunnel with two differentlight sources, and a conveyor belt on whichfruits are placed. The filters are centered at 450,500, 750, and 800 nm with the bandwidths of80, 40, 80, and 50 nm, respectively This deviceis capable of acquiring only one-view imagesof fruits. Each of these one-view images wascomposed of four filter images, which had tobe separated by alignment based on patternmatching. All implementation stages of the pro-

Accurate Fruits Fault Detection in Agricultural Products / Saberkari

Figure 3: Block diagram of the modified-C means clusteringalgorithm based on spatial neighboring Information

Page 7: Accurate Fruits Fault Detection in Agricultural Products ...journals.iau.ir/article_523364_165e1383d13ad8a1f83d710f187a3b8c.pdf · and textile industry. Among them, one of the most

Inte

rnat

iona

l Jou

rnal

of A

gric

ultu

ral M

anag

emen

t and

Dev

elop

men

t, 6(

2): 1

81-1

92, J

une,

201

6.

187

posed algorithm are performed on a computerwith 3.4 GHz and the RAM memory of 1 GHz.

Experiment IIn the first test, performance of the proposed

de-noising algorithm has been compared by theother approaches. For this purpose, the followingtwo criteria have been used for quantitativecomparison. Also, some other de-noising algo-rithms (BM3D, patch based global PCA (PGPCA)and progressive image de-noising (PID) methodsproposed by (Charles et al., 2011) and (Knausand Zwicker, 2014), respectively) have beenimplemented to compare the results.

Peak signal to noise ratio (PSNR): Peak signalto noise ratio represents the ratio of maximumpossible power to noise power. Because manysignals have a wide dynamic range, this evaluationcriterion arises in the form of logarithm. Thiscriterion is often used to measure the quality ofimages after reconstruction, the higher the amountof the criterion, the higher the quality of recon-structed image. The signal to noise ratio isdefined as the mean square error. If we show theimage without noise with I and the noisy imagewith K, we have (Thu and Ghanbari, 2008):

(8)

where MAXI is the maximum possible pixelvalue, and if image pixels are 8-bit, this valuewill be 255; otherwise, equation (9) is used tocompute MAXI:

MAXI = 2B-1 (9)

Structural similarity (SSIM): This criterion isa way to measure the similarity between twoimages. This criterion is an improved versionof previous criterion and the difference is that itconsiders noises and artifacts in the image aschanges in structural information. The structuralinformation is based on the idea that pixels spa-tially close to each other are greatly dependenton one another and this dependence containsimportant information. SSIM criterion is defined

based on the following equation:

(10)

where x and x is the average of x and y, σ2x

and σ2y is the variance of x and y, respectively.σxy is the covariance between x and y. c1 and c2

are two variables which is defined as, c1=(k1l)2,c2=(k2l)2, respectively. The values of k1 and k2

are chosen as 0.01 and 0.03. Also, l is thenumber of bits of pixel.

In Figures 4, results of applying the proposedde-noising algorithm on input images are givenfor the different values of standard deviation.As can be seen, noise is greatly removed at alllevels of standard deviation.

In Tables 1 and 2, PSNR and SSIM values aregiven in the proposed de-noising and BM3D-PGPCA and PID algorithms for different standarddeviation values. The superiority of the proposedalgorithm in improving PSNR and SSIM pa-rameters can be seen in these tables and also indiagrams shown in Figures 5 and 6. For , PSNRquantities are 35.9 and 35.69 in BM3D-PGPCAand PID methods, respectively, while this valueis achieved 35.92 in the proposed algorithm.This improvement is also observed for otherstandard deviations. Similar results were obtainedin the SSIM parameter value. By choosing thestandard deviation equal to 10, the value of thisparameter in the proposed algorithm has improved5.76 percent and 0.03 percent in comparison toBM3D-PGPCA and PID methods, respectively.There is similar superiority for SSIM parameterin other standard deviation values.

Experiment IIIn this test, the performance of our algorithm

is compared with other methods in identifyingthe fruit fault. For this purpose, two followingevaluation criteria are utilized. Also two ap-proaches, conventional FCM and Otsu algorithms,are implemented.

Segmentation matching factor (SMF): Thisparameter measures pixel that have beenwrongly segmented and is defined as follows(Ahmed et al., 2002):

Accurate Fruits Fault Detection in Agricultural Products / Saberkari

Page 8: Accurate Fruits Fault Detection in Agricultural Products ...journals.iau.ir/article_523364_165e1383d13ad8a1f83d710f187a3b8c.pdf · and textile industry. Among them, one of the most

Inte

rnat

iona

l Jou

rnal

of A

gric

ultu

ral M

anag

emen

t and

Dev

elop

men

t, 6(

2): 1

81-1

92, J

une,

201

6.

188

Accurate Fruits Fault Detection in Agricultural Products / Saberkari

De-Noised Image Original ImageDisrupted Image by AWGN

Figure 4: Results of applying the proposed De-Noising algorithm for differentlevels of standard deviation

Page 9: Accurate Fruits Fault Detection in Agricultural Products ...journals.iau.ir/article_523364_165e1383d13ad8a1f83d710f187a3b8c.pdf · and textile industry. Among them, one of the most

Inte

rnat

iona

l Jou

rnal

of A

gric

ultu

ral M

anag

emen

t and

Dev

elop

men

t, 6(

2): 1

81-1

92, J

une,

201

6.

189

(11)

where and are binary versions of segmentedand actual images. For SMF parameter we have:

• If SMF=100%, we have full matching ofimages,

• If SMF > 50%, segmentation result is ac-ceptable, and

• If SMF < 50%, segmentation result is weak. Concordance correlation (Pc): this criterion de-

termines the concordance between actual and seg-mented images. This criterion is applied to evaluatereproducibility of presented segmentation algorithms.

Accurate Fruits Fault Detection in Agricultural Products / Saberkari

PGPCA PID Proposed

PSNR (σ=5)

39.09 39.08 39.39

PSNR (σ=10)

35.09 35.65 35.92

PSNR (σ=15)

32.90 33.79 34.02

PSNR (σ=25)

29.67 31.36 31.56

PSNR (σ=40)

26.65 28.88 29.16

PSNR (σ=50)

25.40 27.66 27.99

Table 1: Quantitative amounts of PSNR achieved by applying the presented De-Noising algorithm andcomparing it with other methods

PGPCA PID Proposed

SSIM (σ=5)

0.94899 0.95686 0.95772

SSIM (σ=10)

0.8732 0.9232 0.92352

SSIM (σ=15)

32.90 0.89424 0.89562

SSIM (σ=25)

0.80685 0.83709 0.843

SSIM (σ=40)

0.59105 0.7538 0.77505

SSIM (σ=50)

0.53284 0.70451 0.73687

Table 2: Quantitative amounts of SSIM achieved by applying the presented De-Noising algorithm andcomparing it with other methods

Page 10: Accurate Fruits Fault Detection in Agricultural Products ...journals.iau.ir/article_523364_165e1383d13ad8a1f83d710f187a3b8c.pdf · and textile industry. Among them, one of the most

Inte

rnat

iona

l Jou

rnal

of A

gric

ultu

ral M

anag

emen

t and

Dev

elop

men

t, 6(

2): 1

81-1

92, J

une,

201

6.

190

Pc is defined as (Lehmussola et al., 2006):

(12)

where A and B are two samples, and arethe average amounts, SA and SA standard deviationof samples. The higher amount of Pc leads tothe better the performance of the algorithm.

In figure 7, results of applying our algorithm

and also Otsu and FCM segmentation methodsin fault identification of fruit images are com-pared. To assess the stability of the proposedalgorithm in dealing with noise, fruit imagehave been destroyed with additive white Gauss-ian noise with the signal to noise ratio of 1, 3,5, 7 and 9 (dB). In Tables 3 and 4, amounts ofSMF and Pc are given for the proposed algo-rithm, Otsu segmentation and FCM methods.As seen, by increasing signal to noise ratio,

Accurate Fruits Fault Detection in Agricultural Products / Saberkari

Figure 5: PSNR versus different levels ofstandard deviation of AWGN

Figure 6: SSIM versus different levels ofstandard deviation of AWGN

Original Image Otsu Method FCM Method Proposed Algorithm

Figure 7: Results of performing the presented algorithm and comparing it with other methods infruit images

Page 11: Accurate Fruits Fault Detection in Agricultural Products ...journals.iau.ir/article_523364_165e1383d13ad8a1f83d710f187a3b8c.pdf · and textile industry. Among them, one of the most

Inte

rnat

iona

l Jou

rnal

of A

gric

ultu

ral M

anag

emen

t and

Dev

elop

men

t, 6(

2): 1

81-1

92, J

une,

201

6.

191

SMF mount in the presented algorithm increases.For instance, by choosing SNR value equal to7, SMF parameter in the presented algorithmimproves by factor of 1.13 and 1.08 in com-parison to Otsu and FCM, respectively. Thisshows that the proposed algorithm has goodstability against noise.

CONCLUSIONA new segmentation algorithm has been pro-

posed in this paper to detect faults in the fruits.The algorithm is consisted of three steps. First,to eliminate the background noise, we haveused the combination of BM3D and PCA model.Then, we have performed our new compressionapproach to compress the de-noised image.This leads to increase the execution speed. Fi-nally, the modified version of fuzzy-C meansalgorithm has been utilized to classify the pixelsinto foreground and background regions. Sim-ulation results showed that the accuracy of theproposed algorithm is reached to 98.3% com-pared to other methods. One of the major ad-vantages of our algorithm is its high speedcharacteristic which results in reduction of therun process. This leads to implementation ofthe hardware architecture of this algorithm todesign an on-line fruit fault embedded identifiersystem. The other advantage is its stability rel-

ative to different levels of noise sources. As wehave calculated, our proposed algorithm hasthe highest amounts of PSNR and SSIM pa-rameters. Segmentation of different kinds offruits with different skin colors is one of ourmajor works for future.

ACKNOWLEDGEMENTThe author would like to acknowledge M.S.

Alireza Farrokhinia for his guidance to improvethe language of the manuscript. I also thank theanonymous reviewers of the paper for theirvaluable comments and suggestions.

REFERENCES1- Abbot, J.A. (1999). Quality Measurement offruits and vegetables. Postharvest Biology and Tech-nology, 15, 207-225.2- Ahmed, M.N., Yamany, S.M., Mohamed, N., &Farag, A. (2002). A modified fuzzy c-means algorithmfor bias field estimation and segmentation of MRIdata. IEEE Transactions on Medical Imaging, 21,193–199.3- Arumugam, N., Mohamed Arshad, F., Chiew, E.,& Mohamed, Z. (2011). Determinates of fresh fruitsand vegetables (FFV) farmers participation in contrastfarming in Peninsular Malaysia. International Jornalof Agricultural Management and Development, 1(2),65-71.4- Bezdek, J.C. (1987). Pattern recognition with

Accurate Fruits Fault Detection in Agricultural Products / Saberkari

SNR Otsu FCM Proposed

13579

78.278.982.286.189.6

SD=4.8389

81.286.687.189.992.5

SD=4.2253

92.693.495.297.498.3

SD=2.4641

Table 3: Quantitative amounts of SMF achieved by applying the presented algorithm andcomparing it with other methods (SD indicates the standard deviation)

SNR Otsu FCM Proposed

13579

78.278.982.286.189.6

SD=4.8389

81.286.687.189.992.5

SD=4.2253

92.693.495.297.498.3

SD=2.4641

Table 4: Quantitative amounts of Pc achieved by applying the presented algorithm andcomparing it with other methods (SD indicates standard deviation)

Page 12: Accurate Fruits Fault Detection in Agricultural Products ...journals.iau.ir/article_523364_165e1383d13ad8a1f83d710f187a3b8c.pdf · and textile industry. Among them, one of the most

Inte

rnat

iona

l Jou

rnal

of A

gric

ultu

ral M

anag

emen

t and

Dev

elop

men

t, 6(

2): 1

81-1

92, J

une,

201

6.

192

fuzzy objective function algorithms. New York/London, UK, Plenum.5- Brosnan, T., & Sun, D.W. (2002). Inspection andgrading of agriculture and food products by computervision system-A reviews, Computer and Electronicin Agriculture. 36, 193-213.6- Charles, D., Salmon, J., & Dalalyam, A. (2011).Image denoising with patch based PCA: local versusglobal. In Jesse Hoey, Stephen McKenna andEmanuele Trucco, Proceedings of the British MachineVision Conference, pages 25.1-25.10. BMVA Press.7- Dabov, K., Foi, A., Katkovnik, V., & Egiazarian,K. (2009). BM3D image denoising with shape-adaptive principle component analysis. PROC. work-shop on signal processing with adaptive sparsestructured presentations (SPARS’09). 8- Foi, A., Katkovnik, V., & Egiazarian, K. (2007).Pointwise shape-adaptive DCT for high-quality de-noising and deblocking of grayscale and colorimages. IEEE Transactions on Image Processing.16, 1395.1411.9- Graves, M., & Batchelor, B. (2003). Machinevision for the inspection of Natural products. London,Springer.10- Halls, L., Evans, S., & Nott, K. (1998). Meas-urement of textural changes of food by MRI relax-ometry. Magnetic Resonance Imaging, 16, 485-492.11- Hills, B. (1995). Food processing and MRI per-spective. Trends in Food Science and Technology.6, 111-117.12- Izadbakhshi, M., & Javadikia, H. (2014). Appli-cation of hybrid feed-forward neural network (ffnn)-genetic algorithm for predicting evaporation instorage dam reservoirs. Agricultural Communications,2, 57-62.13- Knaus, C., & Zwicker, M. (2014). Progressiveimage denoising. IEEE Transactions on Image Pro-cessing, 23, 3114-3125.14- Lehmussola, A., Ruusuvuori, P., & Yli-Harja,O. (2006). Evaluating the performance of microarraysegmentation algorithms. Bioinformatics, 22(23),2910-2917.15- Linker, R., Cohen, O., & Naor, A. (2012). De-termination of the number of green apples in RGBimages recorded in orchards. Computers and Elec-tronics in Agriculture, 81, 45–57.

16- Malamas, E.N., Petrakis, E.G.M., Zervakis, M.,Petit, L., & Legat, J.D. (2003). A survey on industrialvision systems, applications and tools. Image andVision Computing, 21,171–188.17- Mizushima, A., & R. Lu. (2013). An image seg-mentation method for apple sorting and grading usingsupport vector machine and Otsu’s method. Computersand Electronics in Agriculture, 94, 29–37.18- Moradi, G., Shamsi, M., Sedaghi, M. H., & Alsharif,M.R. (2011, April). Fruit defect detection from colorimages using ACM and MFCM algorithms. InternationalConference on Electronic Devices, Systems and Applications(lCEDSA), 2011 International Conference on (pp. 182-186). IEEE.19- Moradi. G., Shamsi, M., Sedaaghi, M.H. Moradi,S., & Alsharif, M. R. (2012). Apple defect detectionusing statistical histogram based EM algorithm. 19th

Iranian Conference on Electrical Engineering (ICEE).20- Payne, A.B. Walsh, K.B., Subedi, P.P., & Jarvis,D. (2013). Estimation of mango crop yield usingimage analysis– Segmentation method. Computersand Electronics in Agriculture, 91, 57–64.21- Rakun, J., Stajnko, D., & Zazula, D. (2011).Detecting fruits in natural scenes by using spatial-frequency based texture analysis and multiviewgeometry. Computers and Electronics in Agriculture,76, 80-88.22- Romano, G. Argyropoulos, D., Nagle, M., Khan,M.T., & Muller, J. (2012). Combination of digitalimages and laser light to predict moisture contentand color of bell pepper simultaneously duringdrying. Journal of Food Engineering, 119, 438–448.23- Saberkari, H., & Shamsi, M. (2012). Comparisonof different algorithms for ECG signal compressionbased on transfer coding. IEEE Symposium on In-dustrial Electronics and Applications (ISIEA 2012),23-26.24- Saberkari, H., Bahrami, S., Shamsi, M.,Amoshahy, M.J., Badri Ghavifekr, H., & Sedaaghi,M.H. (2015). Fully automated complementary DNAmicroarray segmentation using a novel fuzzy-basedalgorithm. Journal of Medical Signals and Sensors,5(3), 182-191.25- Huynh-Thu, Q., & Ghanbari, M. (2008). Scopeof validity of PSNR in image/video quality assessment.Electronics Letters, 44(13), 800-801.

Accurate Fruits Fault Detection in Agricultural Products / Saberkari

How to cite this article:Saberkari, H. (2016). Accurate fruits fault detection in agricultural products using an efficient algorithm.International Journal of Agricultural Management and Development, 6(2), 181-192.URL: http://ijamad.iaurasht.ac.ir/article_523364_1e3fd111ae7252ac9e78b912e568ef69.pdf


Recommended