<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.4 20241031//EN"
        "https://jats.nlm.nih.gov/publishing/1.4/JATS-journalpublishing1-4.dtd">
<article  article-type="research-article"        dtd-version="1.4">
            <front>

                <journal-meta>
                                                                <journal-id>jotaf</journal-id>
            <journal-title-group>
                                                                                    <journal-title>Tekirdağ Ziraat Fakültesi Dergisi</journal-title>
            </journal-title-group>
                            <issn pub-type="ppub">1302-7050</issn>
                                        <issn pub-type="epub">2146-5894</issn>
                                                                                            <publisher>
                    <publisher-name>Tekirdağ Namık Kemal Üniversitesi</publisher-name>
                </publisher>
                    </journal-meta>
                <article-meta>
                                        <article-id pub-id-type="doi">10.33462/jotaf.1165105</article-id>
                                                                <article-categories>
                                            <subj-group  xml:lang="en">
                                                            <subject>Agricultural Machine Systems</subject>
                                                    </subj-group>
                                            <subj-group  xml:lang="tr">
                                                            <subject>Tarım Makine Sistemleri</subject>
                                                    </subj-group>
                                    </article-categories>
                                                                                                                                                        <title-group>
                                                                                                                        <trans-title-group xml:lang="tr">
                                    <trans-title>Görüntü İşleme ve Geleneksel Makina Öğrenmeye Dayalı Fındıkta Kahverengi Kokarca (Halyomorpha Halys) Zararının Sınıflandırılması</trans-title>
                                </trans-title-group>
                                                                                                                                                                                                <article-title>Image Processing and Traditional Machine Learning Based Classification of Brown Marmorated Stink Bug (Halyomorpha Halys) Defected Hazelnut</article-title>
                                                                                                    </title-group>
            
                                                    <contrib-group content-type="authors">
                                                                        <contrib contrib-type="author">
                                                                    <contrib-id contrib-id-type="orcid">
                                        https://orcid.org/0000-0001-6132-4672</contrib-id>
                                                                <name>
                                    <surname>Gadalla</surname>
                                    <given-names>Omsalma Alsadig Adam</given-names>
                                </name>
                                                                    <aff>Khartoum University</aff>
                                                            </contrib>
                                                    <contrib contrib-type="author">
                                                                    <contrib-id contrib-id-type="orcid">
                                        https://orcid.org/0000-0003-2387-2322</contrib-id>
                                                                <name>
                                    <surname>Öztekin</surname>
                                    <given-names>Y. Benal</given-names>
                                </name>
                                                                    <aff>ONDOKUZ MAYIS ÜNİVERSİTESİ</aff>
                                                            </contrib>
                                                                                </contrib-group>
                        
                                        <pub-date pub-type="pub" iso-8601-date="20231225">
                    <day>12</day>
                    <month>25</month>
                    <year>2023</year>
                </pub-date>
                                        <volume>20</volume>
                                        <issue>4</issue>
                                        <fpage>784</fpage>
                                        <lpage>798</lpage>
                        
                        <history>
                                    <date date-type="received" iso-8601-date="20220822">
                        <day>08</day>
                        <month>22</month>
                        <year>2022</year>
                    </date>
                                                    <date date-type="accepted" iso-8601-date="20230204">
                        <day>02</day>
                        <month>04</month>
                        <year>2023</year>
                    </date>
                            </history>
                                        <permissions>
                    <copyright-statement>Copyright © 2005, Tekirdağ Ziraat Fakültesi Dergisi</copyright-statement>
                    <copyright-year>2005</copyright-year>
                    <copyright-holder>Tekirdağ Ziraat Fakültesi Dergisi</copyright-holder>
                </permissions>
            
                                                                                                <trans-abstract xml:lang="tr">
                            <p>Fındığın kalite kontrolü, dünyanın birçok bölgesinde, özellikle de dünyanın en büyük fındık üreticisi olan Türkiye&#039;de büyük bir problem kaynağıdır. Bu çalışma, görüntü işleme ve derin öğrenme tekniklerini kullanarak, Kahverengi Kokarca ile enfekte olmuş ve sağlıklı fındıkları birbirinden ayırarak belirlemek ve sınıflandırmak amaçlanmıştır. Kahverengi Kokarcalı fındık örnekleri, uzmanlar tarafından 2021 üretim döneminden elde edilmiştir. Fındık görüntülerini yakalamak için Guppy Pro CCD kamera tabanlı görüntü alma sistemi kullanılmıştır. Geleneksel makine öğrenme modellerini eğitmek için toplam olarak 400 RGB fındık görüntüsü alınmıştır. Fındık görüntülerinin arka plandan çıkarılması için görüntü bölüntüleme işlemi Eşikleme tekniği kullanılarak gerçekleştirilmiştir. Fındık moment özellikleri, geleneksel makine öğrenme modellerini eğitmek için kullanılmak üzere RGB ve l*a*b* renk çıkarılmıştır. Ayrıca, Boruta özellik seçim yöntemi kullanılarak en önemli ve en ayırt edici öznitelik seti seçilmiştir. Rastgele Orman, Destek Vektör Makinesi,  Lojistik Regresyon, Naive Bayes ve Karar Ağacı dâhil olmak üzere geleneksel makine öğrenme modelleri, bir kez tüm özelliklerle ve bir kez daha yalnızca seçilmiş özelliklerle olmak üzere iki kez eğitilmiştir. Genel doğruluk, karışıklık matrisinin istatistiksel özellikleri ve model eğitim süresinin tümü, modelin sınıflandırma performansını değerlendirmek ve karşılaştırmak için hesaplanmıştır. Sonuç olarak, gri seviye histogramından 50 eşik değeri belirlenmiştir ve fındık görüntüsünü arka plandan mükemmel bir şekilde ayırabilmiştir. Çıkartılmış 24 özellik arasından en ayırt edici özellik olarak sadece yedi tane renk özelliği belirlenmiştir. Tüm çıkartılmış özellikler kullandıktan sonra Destek Vektör Makinesi modeli kullanılarak, %98.75 ile en yüksek sınıflandırma doğruluğu elde edilmiştir. Aynı zamanda tüm özelliklerden sadece seçilen özellikler kullanıldığında Rastgele Orman ve Lojistik Regresyon (sınılandırıcılarının) modellerinin performansı sırasıyla %97.5 ve %96.25&#039;e kadar yükselmiştir.</p></trans-abstract>
                                                                                                                                    <abstract><p>Quality control of hazelnuts is a major concern in many regions across the world, but particularly in Turkey as the world&#039;s largest hazelnut producer. Using image processing and deep learning techniques, this study intended to detect and classify healthy hazelnuts and hazelnuts infected with the Brown Marmorated Stink Bug. Infected hazelnut samples were collected from the 2021 production period by experts. A Guppy Pro CCD camera-based image acquisition system was used to capture hazelnut images. A total of 400 RGB hazelnut images were captured to train machine learning models. Image segmentation process was carried out to subtract hazelnut images from the background using the Thresholding technique. Moment features were extracted from RGB and l*a*b* spaces to be used to train traditional machine learning models. Furthermore, the most relevant and discriminative feature set was selected using the Boruta feature selection method. Traditional machine learning models including Random Forest, Support Vector Machine, Logistic Regression, Naive Bayes, and Decision Tree were trained twice, once with all features and another with the selected feature set only. The overall accuracy, statistical characteristics of the confusion matrix, and model training time were all calculated to evaluate and compare models performances. As a result, threshold value of 50 was determined from the gray level histogram and was able to separate hazelnut image from the background perfectly. Only seven moment features were identified as the most discriminative features out of 24 features. The SVM model with all feature vectors had the greatest classification accuracy of 98.75 %. When only the selected features were employed, the performance of Random Forest and Logistic Regression models improved to 97.5 and 96.25 %, respectively.</p></abstract>
                                                            
            
                                                                                        <kwd-group>
                                                    <kwd>Support Vector Machine</kwd>
                                                    <kwd>  Hazelnut</kwd>
                                                    <kwd>  Feature selection</kwd>
                                                    <kwd>  Feature extraction</kwd>
                                                    <kwd>  Boruta</kwd>
                                            </kwd-group>
                            
                                                <kwd-group xml:lang="tr">
                                                    <kwd>Boruta</kwd>
                                                    <kwd>  Destek Vektör Makinesi</kwd>
                                                    <kwd>  Fındık</kwd>
                                                    <kwd>  Özellik seçme</kwd>
                                                    <kwd>  Özellik çıkartma</kwd>
                                            </kwd-group>
                                                                                                                                    <funding-group specific-use="FundRef">
                    <award-group>
                                                    <funding-source>
                                <named-content content-type="funder_name">Ondokuz Mayis University</named-content>
                            </funding-source>
                                                                            <award-id>Project number: PYO. ZRT.1904.21.001.</award-id>
                                            </award-group>
                </funding-group>
                                </article-meta>
    </front>
    <back>
                            <ref-list>
                                    <ref id="ref1">
                        <label>1</label>
                        <mixed-citation publication-type="journal">Akshay, S. and Hegde, A. (2021). Detection and classification of areca nut diseases. 2021 Second International Conference on Electronics and Sustainable Communication Systems (ICESC). 1-3 September, P.1-5. Kottayam, India.</mixed-citation>
                    </ref>
                                    <ref id="ref2">
                        <label>2</label>
                        <mixed-citation publication-type="journal">Ali, I. (2018). Hazelnut cultivation in Turkey. Academic Journal of Agriculture, 6(1): 1-13.</mixed-citation>
                    </ref>
                                    <ref id="ref3">
                        <label>3</label>
                        <mixed-citation publication-type="journal">Anonymous. (2019). Fındıkta ‘kahverengi- yeşil kokarca’ tehdidi. https://www.sozcu.com.tr/2019/ekonomi/findikta-kahverengi-yesil-kokarca-tehdidi-4007632/(Accessed date: December 2021).</mixed-citation>
                    </ref>
                                    <ref id="ref4">
                        <label>4</label>
                        <mixed-citation publication-type="journal">Aydinoglu, A. C. (2010). Examining environmental condition on the growth areas of Turkish hazelnut (Corylus colurna L.). African Journal of Biotechnology, 9(39): 6492-6502.</mixed-citation>
                    </ref>
                                    <ref id="ref5">
                        <label>5</label>
                        <mixed-citation publication-type="journal">Baitu, G. P., Gadalla O. A. A. and Oztekin, Y. B. (2023). Traditional machine learning-based classification of cashew kernels using colour features. Journal of Tekirdağ Agricultural Faculty, 20(1): 115-124.</mixed-citation>
                    </ref>
                                    <ref id="ref6">
                        <label>6</label>
                        <mixed-citation publication-type="journal">Balachandran, P. V., Xue, D., Theiler, J., Hogden, J., Gubernatis, J. E. and Lookman, T. (2018). Importance of feature selection in machine learning and adaptive design for materials. Materials Discovery and Design, 4(4): 100-107.</mixed-citation>
                    </ref>
                                    <ref id="ref7">
                        <label>7</label>
                        <mixed-citation publication-type="journal">Christopher. (2014). The effects of kernel feeding by brown marmorated stink bug (Halyomorpha halys:Hemiptera: Pentatomidae) on commercial hazelnuts (Corylus avellana L.). (Master of Science). Oregon State University.</mixed-citation>
                    </ref>
                                    <ref id="ref8">
                        <label>8</label>
                        <mixed-citation publication-type="journal">FAOSTAT. (2019). Crops Production Data. Retrieved fromm http://www. fao.org/faostat/en/data/QC. (Accessed date: 10 April 2021).</mixed-citation>
                    </ref>
                                    <ref id="ref9">
                        <label>9</label>
                        <mixed-citation publication-type="journal">Ghosh, S., Biswas, S., Sarkar, D. and Sarkar, P. P. (2014). A novel Neuro-fuzzy classification technique for data mining. Egyptian Informatics Journal, 15(3): 129-147.</mixed-citation>
                    </ref>
                                    <ref id="ref10">
                        <label>10</label>
                        <mixed-citation publication-type="journal">Guvenc, S. A., Senel, F. A. and Cetisli, B. (2015). Classification of processed hazelnuts with computer vision. 23rd Signal Processing and Communications Applications Conference (SIU)., 29-1 November, Germany.</mixed-citation>
                    </ref>
                                    <ref id="ref11">
                        <label>11</label>
                        <mixed-citation publication-type="journal">Hong, C., Jing, W., Qiaoxia, Y. and Peng, W. (2011). Quality classification of peanuts based on image processing, Huazhong Agricultural University Journal, 24(5): 115-121.</mixed-citation>
                    </ref>
                                    <ref id="ref12">
                        <label>12</label>
                        <mixed-citation publication-type="journal">Kalkan, H. and Çetisli, B. (2011). Online feature selection and classification. InAcoustics, Speech and Signal Processing (ICASSP), 2011 IEEE International Conference . May 22 (pp. 2124-2127), Ankara, Turkey.</mixed-citation>
                    </ref>
                                    <ref id="ref13">
                        <label>13</label>
                        <mixed-citation publication-type="journal">Kivrak, O. and Gürbüz, M. (2019). Detection of defective hazelnuts by image processing and machine learning. Natural and Engineering Sciences, 4(3): 100-106.</mixed-citation>
                    </ref>
                                    <ref id="ref14">
                        <label>14</label>
                        <mixed-citation publication-type="journal">Memoli, A., Albanese, D., Esti, M., Lombardelli, C., Crescitelli, A., Di Matteo, M. and Benucci, I. (2017). Effect of bug damage and mold contamination on fatty acids and sterols of hazelnut oil. European Food Research and Technology, 243(4): 166-181.</mixed-citation>
                    </ref>
                                    <ref id="ref15">
                        <label>15</label>
                        <mixed-citation publication-type="journal">Mitchell, P. L. (2018). Heteroptera as vectors of plant pathogens. Neotropical Entomology, 33:519–545.
Molnar, T. (2010). The Brown Marmorated Stink Bug: A new Pest of Hazelnut. Journal of Food Technology, 9(1): 33-38.</mixed-citation>
                    </ref>
                                    <ref id="ref16">
                        <label>16</label>
                        <mixed-citation publication-type="journal">Narendra, V. G. and Hareesh, K. S. (2016). Prospects of computer vision automated grading and sorting systems in agricultural and food products for quality evaluation. International Journal of Computer Applications, 4(9): 75–87.</mixed-citation>
                    </ref>
                                    <ref id="ref17">
                        <label>17</label>
                        <mixed-citation publication-type="journal">Nouri, A, H., Omid, M., Mohtasebi, S. S. and Firouz, M. S. (2017). Design, development and evaluation of an online grading system for peeled pistachios equipped with machine vision technology and support vector machine. Information Processing in Agriculture, 4(4): 333-341.</mixed-citation>
                    </ref>
                                    <ref id="ref18">
                        <label>18</label>
                        <mixed-citation publication-type="journal">Onaran, I., Dulek, B., Pearson, T. C., Yardimci, Y. and Cetin, A. E. (2005). Detection of empty hazelnuts from fully developed nuts by impact acoustics. 2005International  Signal Processing Conference, Sep 4 (pp. 1-4).</mixed-citation>
                    </ref>
                                    <ref id="ref19">
                        <label>19</label>
                        <mixed-citation publication-type="journal">Özlüoymak, Ö, B. and Guzel, E. (2020). Determination of Colour and Kinetic Parameter Differences Between Aflatoxin Contaminated and Uncontaminated Pistachio Nuts Using Machine Vision. Journal of Tekirdag Agricultural Faculty, 18(1): 157-168.</mixed-citation>
                    </ref>
                                    <ref id="ref20">
                        <label>20</label>
                        <mixed-citation publication-type="journal">Pacheco, W. D. N. and López, F. R. J. (2019). Tomato classification according to organoleptic maturity (coloration) using machine learning algorithms K-NN, MLP, and K-Means Clustering. 2019 XXII Symposium on Image, Signal Processing and Artificial Vision (STSIVA), Dec30, (pp. 1-5) Bucaramanga, Colombia.</mixed-citation>
                    </ref>
                                    <ref id="ref21">
                        <label>21</label>
                        <mixed-citation publication-type="journal">Raybaut, P. (2009). (Python) (ANN) Spyder v1.0.0 released&quot;. [Press release]
Saruhan, I. (2010). Brown Marmorated Stink Bug in Hazelnut (Palomena Prasina L. Heteroptera: Pe Tatomidae), Anatolian Journal of Agricultural Sciences, 25(&#039;2): 75-83.</mixed-citation>
                    </ref>
                                    <ref id="ref22">
                        <label>22</label>
                        <mixed-citation publication-type="journal">Senthilkumaran, N. and Vaithegi, S. (2016). Image segmentation by using thresholding techniques for medical images. Computer Science &amp; Engineering: An International Journal, 6(1): 1-13.</mixed-citation>
                    </ref>
                                    <ref id="ref23">
                        <label>23</label>
                        <mixed-citation publication-type="journal">Short., B. A. (2010). Factors affecting appearance of stink bug (Hemiptera: Pentatomidae) injury on apple. Environmental Entomology, 39: 134-139.</mixed-citation>
                    </ref>
                                    <ref id="ref24">
                        <label>24</label>
                        <mixed-citation publication-type="journal">Solak, S. and Altinisik, U. (2018). Detection and classification of hazelnut fruit by using image processing techniques and clustering methods. Sakarya University Journal of  Science, 22(1): 56-65.</mixed-citation>
                    </ref>
                                    <ref id="ref25">
                        <label>25</label>
                        <mixed-citation publication-type="journal">Taheri, G, A., Ahmadi, H., Omid, M., Mohtasebi, S. S., Mollazade, K., Smith, A. J. R. and Carlomagno, G. M. (2015). An intelligent approach for cooling radiator fault diagnosis based on infrared thermal image processing technique. Applied Thermal Engineering Jpurnal, 87(4): 434-443.</mixed-citation>
                    </ref>
                                    <ref id="ref26">
                        <label>26</label>
                        <mixed-citation publication-type="journal">Teimouri, N., Omid, M., Mollazade, K. and Rajabipour, A. (2016). An artificial neural network‐based method to identify five classes of almond according to visual features. Journal of Food Process Engineering, 39(6): 625-635.</mixed-citation>
                    </ref>
                                    <ref id="ref27">
                        <label>27</label>
                        <mixed-citation publication-type="journal">Yadhunath, R., Srikanth, S., Sudheer, A., Jyotsna, C. and Amudha, J. (2022). Detecting surface cracks on buildings using computer vision: an experimental comparison of digital image processing and deep learning. (197-210). 
In: Reddy, V. S., Prasad, V. K., Wang, J., Reddy, K. T. V. (eds) Soft Computing and Signal Processing. Advances in Intelligent Systems and Computing, vol 1340. Springer, Singapore.</mixed-citation>
                    </ref>
                            </ref-list>
                    </back>
    </article>
