2) added mask support to device 'transform' function 3) sample hog gpu: waitKey(1) -> waitKey(3), in other case image is not displayed.