In recent years, machine vision and optical sensors, which can be used in an autonomous weed killing equipment, are being used extensively to detect weeds from crops. In this study, seven types of weeds that grow in most of the sugar beet fields in Iran, especially in Fars province, were considered in real outdoor conditions. Several color feature extraction algorithms have also been investigated to separate soil from the plants as well as weeds from the sugar beets. The performance of the proposed algorithm was evaluated by determining correct classification rates (CCR) and misclassification rates (MCR) of the results. The findings revealed that the proposed method could successfully detect five of the seven types of the weeds, including Chenopudium album L., Amaranthus retrofelexus L., Physalis alkekengi L., Convolvulus arvensis L., Setaria vertidis L. Beauv and Echinochloa crus-gali (L.) Beauv.