【发布时间】:2020-02-13 14:57:42
【问题描述】:
我有我正在从事的车辆检测项目的热图数据,但我不知道下一步该去哪里。我想在图像的“最热”部分周围绘制一个广义边界框。我的第一个想法是在所有重叠的部分上画一个框,但有些东西告诉我有一种更准确的方法可以做到这一点。任何帮助,将不胜感激!不幸的是,我的名声阻止了我发布图片。以下是我创建热图的方式:
# Positive prediction window coordinate structure: ((x1, y1), (x2, y2))
def create_heatmap(bounding_boxes_list):
# Create a black image the same size as the input data
heatmap = np.zeros(shape=(375, 1242))
# Traverse the list of bounding box locations in test image
for bounding_box in bounding_boxes_list:
heatmap[bounding_box[0][1]:bounding_box[1][1], bounding_box[0][ 0]:bounding_box[1][0]] += 1
return heatmap
【问题讨论】:
-
你能展示这样一张热图和想要的结果吗?
标签: python numpy opencv object-detection