当前位置:   article > 正文

opencv 绘制坐标曲线_opencv画坐标系(便于与世界坐标转化)、检测色块(目标物体)...

opencv画坐标系

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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/119730
推荐阅读
相关标签
  

闽ICP备14008679号