Some optimizations to ocl::erode/dilate