Accurately extracting traits from rice grains is of importance for effective crop management and yield estimation, providing valuable understanding for improving agricultural practices. However, manual intervention in these tasks is labor-intensive, time-consuming, and error-prone. This research proposes a new approach that leverages low-cost digital cameras and deep learning technology for counting and extracting rice grain traits. Our study introduces a preprocessing step to separate rice grain regions from the input image background using color space conversion. After that, a deep learning image segmentation model based on YOLOv8 is utilized for the extraction of both the number and morphological traits of the grains. The accuracy of the proposed method was experimented on 88 different rice varieties provided by the Plant Resource Center in Hanoi. The experimental results show that the proposed approach is high-accurate and high-throughput for low-cost extraction of rice grain traits from color digital images, which is potentially helpful in facilitating effective evaluation in rice breeding programs and functional gene identification of rice varieties.