simplify the kernel logic when using rect kernel or without ROI
remove the warnings in accuracy test
Merge pull request #428 from bitwangyaoyao:2.4_erode_dilate