I need to extract a object of interest (a vehicle ) from a large picture, now I know the 4 coordinates of this vehicle in the picture. How could I crop the image of this vehicle in the picture and then rotate it to 90 degree as shown below

[![enter image description here](https://i.stack.imgur.com/F7EL3.png)](https://i.stack.imgur.com/F7EL3.png)

I need to program it in python, but I don’t know which library to use for this functionality ?