Image scaling based on Opencv