close

import cv2

img = cv2.imread('test.jpg')

point1 = (50, 50)

point2 = (100, 100)

result = cv2.rectangle(img, point1, point2, (0, 0, 255), 5)

cv2.imwrite('result.jpg', result)

 

 

※查詢其他OpenCV用法如下※

openCV應用總整理: 點擊我

arrow
arrow
    文章標籤
    python opencv rectangle
    全站熱搜

    楓綺 發表在 痞客邦 留言(0) 人氣()