小编rob*_*ver的帖子

OpenCV 矩形填充

在此处输入图片说明我正在尝试填充矩形,但即使在更改代码(将厚度更改为 -10)之后也没有效果。我觉得这跟全球有关系。

我附上了下面的代码。

import cv2
import os
import numpy as np
from .utils import download_file

initialize = True
net = None
dest_dir = os.path.expanduser('~') + os.path.sep + '.cvlib' + os.path.sep + 'object_detection' + os.path.sep + 'yolo' + os.path.sep + 'yolov3'
classes = None
COLORS = np.random.uniform(0, 255, size=(80, 3))




def draw_bbox(img, bbox, labels, confidence, colors=None, write_conf=False):

    global COLORS
    global classes

    if classes is None:
        classes = populate_class_labels()

    for i, label in enumerate(labels):

        if colors is None:
            color = COLORS[classes.index(label)]            
        else: …
Run Code Online (Sandbox Code Playgroud)

python video opencv image cvlib

7
推荐指数
2
解决办法
3万
查看次数

标签 统计

cvlib ×1

image ×1

opencv ×1

python ×1

video ×1