[common][cpu-processing][gpu-processing] Erode/dilate