边界框坐标中的字符串

Strings in bounding box coordinates

我在标记图像上使用了 regionsprops 函数来获取边界框坐标和大小。当我访问边界框坐标时,我得到一个包含字符串 "L" 的元组。我不明白为什么元组中会有一个字符串用于坐标和大小。

打印边界框坐标 returns (0L, 393L, 29L, 463L),而如果它返回 (0, 393, 29, 463) 会让生活更轻松。

我无法绘制边界框,因为该元组不被视为数字元组 TypeError: points is not a numerical tuple。如何使用此元组在图像上绘制边界框。

properties = skimage.measure.regionprops(labelled_image)
boundingbox = properties[0].bbox

print boundingbox # returns (0L, 393L, 29L, 463L)

后缀Ll表示long整数。
long 在 Python 中与 int 合并 3.

如果您使用 Python 2.x,这些数字应该不会造成任何问题,并且可以 像整数一样对待