Crop Rectangle returned by minAreaRect OpenCV [Python]
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: minAreaRect in OpenCV returns a rotated rectangle. How do I crop this part of the image which is inside the rectangle? boxPoints returns the co-ordinates of the corner points of the rotated rectangle so one can access the pixels by looping through the points inside the box, but is there a faster way to crop in Python? EDIT See code in my answer below. 回答1: You have not given sample code, so I am answering without code also. You could proceed as follows: From corners of rectangle, determine angle alpha of rotation against horizontal