【问题标题】:Plus one in calculating area of rectangle计算矩形面积加一
【发布时间】:2020-11-05 03:06:20
【问题描述】:
areas = (end_x - start_x + 1) * (end_y - start_y + 1)

以上是在下面两个不同的链接中计算非最大抑制的矩形面积的用途,为什么需要加一?

https://github.com/amusi/Non-Maximum-Suppression/blob/master/nms.py https://www.pyimagesearch.com/2014/11/17/non-maximum-suppression-object-detection-python/

【问题讨论】:

  • 这似乎已被问到in a comment,但我不确定答案是否有意义,因为我不知道上下文。
  • 你的意思是交叉路口吗?
  • 可能是拉普拉斯平滑。
  • 我认为这样一个像素的面积是1

标签: python numpy tensorflow tensorflow2.0 non-maximum-suppression


【解决方案1】:

我猜加一只是用来获得确切的面积。 例如, 宽度从像素 2 开始,到像素 4 结束。确切的宽度是 3(像素 2、3、4)。 3 等于 4 - 2 + 1。

但在我看来,不必关心这些。只需确保以相同的标准对每个区域进行校准即可。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-17
    • 1970-01-01
    相关资源
    最近更新 更多