some modifications induced by new opencv release