Some code for opencv 3.0 and python3