Abstract:
การทำฟาร์มจิ้งหรีดได้รับความนิยมเพิ่มมากขึ้นในฐานะที่เป็นโปรตีนทางเลือก อย่างไรก็ตามพบว่าในขั้นตอนการรวบรวมและรับซื้อจิ้งหรีดเพื่อกำหนดราคารับซื้อ จำเป็นต้องตรวจสอบจำนวนและขนาดของจิ้งหรีดจากตัวอย่างจิ้งหรีด ซึ่งเกษตรกรยังคงใช้วิธีการนับจำนวนจิ้งหรีดด้วยสายตาเปล่าอยู่ ทำให้ต้องใช้เวลานานในการนับ และอาจเกิดความผิดพลาดได้ การวิจัยครั้งนี้จึงมีวัตถุประสงค์เพื่อพัฒนาโปรแกรมคอมพิวเตอร์สำหรับใช้ในการนับจำนวนจิ้งหรีดด้วยวิธีการประมวลผลภาพ เพื่อใช้เป็นเครื่องมือในการกำหนดราคาซื้อขายจิ้งหรีดให้กับเกษตรกรผู้เลี้ยงจิ้งหรีด จึงได้ทำการพัฒนาโปรแกรมคอมพิวเตอร์ด้วยภาษาไพทอน และใช้ Scikit-image เป็นโมดูลหลัก โดยได้นำเทคนิค Contour Detection เทคนิคการทำ Blob Detection โดยอาศัย Otsus thresholding และเทคนิคการทำ Colour Segmentation ร่วมกับ Blob Detection มาทำการทดสอบเพื่อหาอัลกอริทึมที่เหมาะสมในการนับจำนวนจิ้งหรีด จากการศึกษาพบว่าเทคนิคการทำ Colour Segmentation เป็นอัลกอริทึมที่เหมาะสมกับการนำมาใช้ในการนับจำนวนจิ้งหรีด จึงได้ทำการพัฒนาโปรแกรมคอมพิวเตอร์สำหรับตรวจนับจำนวนจิ้งหรีดโดยอาศัยอัลกอริทึมดังกล่าว จากนั้นได้ทำการทดสอบประสิทธิภาพการทำงานของโปรแกรม โดยการนำตัวอย่างภาพถ่ายจิ้งหรีดขนาดความละเอียดภาพ 1108 × 1478 พิกเซล จำนวนตัวอย่างละ 200 กรัม มาจัดเรียงบนถาดทดลอง โดยทำการจัดเรียงให้มีลักษณะการกระจายตัวของจิ้งหรีดที่แตกต่างกัน จำนวน 3 ระดับ ได้แก่ ตัวอย่างภาพจิ้งหรีดที่มีลักษณะการจัดเรียงตัวจิ้งหรีดแบบกระจายตัวมาก กระจายตัวปานกลาง และกระจายตัวน้อย รวมทั้งสิ้น 30 ตัวอย่างภาพ ผลการทดสอบพบว่าโปรแกรมที่พัฒนาสามารถนับจำนวนจิ้งหรีดได้อย่างแม่นยำ โดยค่าความถูกต้องจากการทดสอบการนับจำนวนจิ้งหรีดอยู่ที่ร้อยละ 94.25 , 88.47 และ 85.81 ตามลำดับ ซึ่งโปรแกรมที่พัฒนาสามารถนับจำนวนจิ้งหรีดที่มีการกระจายตัวสูงได้แม่นยำกว่าการนับด้วยสายตามนุษย์ และใช้เวลาในการนับจำนวนจิ้งหรีดน้อยกว่าการนับด้วยสายตามนุษย์ถึง 47.3 เท่า
Because of the world food-shortage crisis, cricket (Gryllus bimaculatus De Geer) or other insect consumption were recently considered as an alternative protein. However, the counting and size grading method for mass production, to determine the price, are still operating in obsolete naked-eyes practice that takes long time, causes error, increases cost, and tapers productivity. Hence, the objective of this study was to develop the computer program for counting the number of crickets via image processing approach, in an attempt to enhance the cricket farming industry. Some image processing techniques such as contour detection, Otsus thresholding with blob detection, and colour segmentation with blob detection were studied. The computer code written in Python language was developed by using the Scikit-image module. Our preliminary study showed that using of the colour segmentation technique gave the most efficiency, to count the amount of 200 grams of crickets at image resolution of 1,108 x 1,478 pixels. Then, the total 30 cricket samples were dispersed randomly and photographs taken in 3 different dispersions comprised of high, medium, and low dispersion to check the counting performance of the developed program. The result showed that the accuracy of cricket counting via the program was of 94.25%, 88.47%, and 85.81%, respectively. More accuracy obtained from the program counted on the high dispersion was observed when compared with human eyes. In addition, the developed computer could count faster than the human-labor approximately 47.3 times.