Integrate ITK with libSVM. Read an image, train a classifier on R,G,B values for annotated pixels. Write classified pixels as output image for a new test image.