在用python处理图像过程中出现如下错误

python 处理图像出现The lower bounary is neither an array of the same size and same type as src, nor a scalar in function inRange

导致这个错误的原因是im是二维,而lower_green和upper_green是三维,所以无法用inRange处理。

python 处理图像出现The lower bounary is neither an array of the same size and same type as src, nor a scalar in function inRange

由上图可以看出image本来是具有高、宽、深度信息,但是经过resize之后变成只有高和宽信息导致,导致错误的原因是numpy中resize函数和cv2中resize函数不同。

这里应该用cv2.resize()

相关文章:

  • 2021-06-26
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2021-11-28
  • 2021-10-29
  • 2021-11-30
  • 2021-12-20
猜你喜欢
  • 2021-06-07
  • 2022-12-23
  • 2021-10-19
  • 2021-07-06
  • 2022-12-23
  • 2021-05-08
  • 2022-12-23
相关资源
相似解决方案