This paper presents an automatic system for sorting and grading lemons using computer vision. It eliminates human errors in sorting processes. Lemons are sorted into three categories; ripe, semi-ripe, and a combined class of defective and unripe. A camera is used to capture an image of the lemon, and image analysis is done using Raspberry Pi. A conveyor belt system and a mechanical pusher put the lemon into its respective class.