I have a code that takes a video,split it into frames and then asks me how many rectangles would i like to draw on the frame (the first one). In those rectangles the mean intensity in each frame is calculated.I would like to be able to draw a slanted rectangles too.Is there any command that can help me?Here is the part of my code that is responsible for making the rectangles:
result=input('How many rectangles would you like to draw? ');
You could call the line() command 4 times to draw the sides of your slanted rectangle in the graphical overlay above the image. Alternatively, if the user needs to adjust the vertices, you can call impoly().