在进行测试例子的时候,总是出现TypeError

主要原因是因为cv2.resize内的参数是要求为整数

而python3中的'/'(除法),最后的结果自动转为浮点数

所以使用'//'运算,最后成功

附上错误截图

在借用GitHub上人群密度估计的mcnn实现例子时的TypeError: integer argument expected, got float

相关文章:

  • 2021-06-20
  • 2022-01-14
  • 2021-11-16
  • 2022-01-07
  • 2021-06-12
  • 2021-11-19
  • 2022-01-01
  • 2021-12-02
猜你喜欢
  • 2021-12-28
  • 2021-07-30
  • 2021-10-15
  • 2022-12-23
  • 2022-01-07
  • 2022-01-07
  • 2022-03-10
相关资源
相似解决方案