changed for osx version of opencv