在特定坐标处绘制图像

时间:2019-07-19 08:00:17

标签: python image

我有一个要倾斜绘制的图像。我有四个角的通缉坐标(它们不平行,因此imshow的“范围”不起作用)。如何强制图像定位?

我在拐角处的坐标是:

def check_input(tested_sentence: str, result: str = "Too short"):
    if len(tested_sentence) >= 10:
        if "X" in tested_sentence:
            result = tested_sentence + "\nX spotted!"
        else:
            result = tested_sentence
    return result


def main():
    while True:
        sentence = input("Write something (quit ends): ")
        if sentence == "quit":
            break
        print(check_input(sentence))

if __name__ == '__main__':
    main()

0 个答案:

没有答案
相关问题