sod_img sod_grayscale_image(sod_img input);
Convert a given image to gray color model. A grayscale (or graylevel) image is simply one in which the only colors are shades of gray. Grayscale images are very common & entirely sufficient for many tasks such as face detection and so there is no need to use more complicated and harder-to-process color images. A typical input image should look like the following after processing:
After Processing via sod_grayscale_image()
Grayscale single channel image is returned in an instance of the sod_img object. if something goes wrong during processing, then an empty image is returned via sod_make_empty_image(). Once done, you must release the memory allocated to this object via sod_free_image() to avoid memory leaks.