added threshold function. rpesently just converts to HSV