Illumination plays a vital role in quality of image. So here proper illumination is adjusted with the help of available light sources. Rice grains are positioned beneath the focus of a camera against a contrasting background. This repeatable, reliable and easy-to-use setup minimizes the pre-processing operations required by maximizing the contrast between target grains and the background[17].