赞
踩
from collections import deque
import numpy as np
import cv2
import time
class Painter(object):
def __init__(self,img,start_point=(20,20)):
self.horizons_center = (0,0)
self.point_list = [] self.line_list = [] self.get_point_line(img,start_point)
def add_text(self,img,text,point,size=0.5,color=(0,0,255)):
cv2.putText(img,text,point,cv2.FONT_HERSHEY_COMPLEX,size,color,1)
return img
def draw_a_circle(self,img,point,radius=3,color=(255,0,0),thickness=2):
img = self.draw_a_point(img,point,radius,color,thickness)
return img
def draw_a_point(self,img,point,radius=3,color=(255,0,0),thickness=-4):
cv2.circle(img, point, radius, color, thickness)
return img
def draw_all_point(self,img):
for point in self.point_list:
if point == self.h
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。