use opencv to handle image format