fixed compile warnings and opencv_perf_imgproc failures