DETEKSI TAHU AMAN KONSUMSI DENGAN CITRA DIGITAL OBJEK MENGGUNAKAN METODE K-NEAREST NEIGHBOR
In Indonesia, tofu has two color variants, white tofu and yellow tofu. White tofu is the result of processed soybeans without coloring mixture while yellow tofu is the result of processed soybeans added with coloring, usually turmeric is used as a natural dye from yellow tofu. Nowadays a lot of cheating is done by tofu producers such as using textile dyes as a substitute for food coloring, where textile dyes have a bad impact on health if consumed continuously. Therefore, further research is needed regarding tofu coloring. This study aims to identify the safe consumption of tofu, namely tofu with natural dyes and tofu that is unsafe consumption, namely yellow tofu given synthetic dyes using textile dyes. Identification using tofu features such as contrast, energy, correlation, and homogenity to get the GLCM value, then the value is analyzed using the K-Nearest Neighbor (K-NN) method. The research begins with the stage of taking object images from know. The next step is doing image analysis. The final stage of this analysis is to draw conclusions to distinguish safe tofu consumption and know unsafe consumption. Previously conducted training of 42 tofu data to get knowledge base by using order feature feature extraction, then performed tests on 11 random data tofu images. The test results with the K-Nearest Neighbor method with k = 7 obtained an accuracy of 90.91%.