【发布时间】:2021-01-13 20:38:38
【问题描述】:
在 dlib Python API 文档中,我看到了这些内容(忽略颜色,我不知道为什么..),
(来自http://dlib.net/python/index.html#dlib.rectangles)
class dlib.chip_details
WHAT THIS OBJECT REPRESENTS This object describes where an image chip is to be extracted from within another image. In particular, it specifies that the image chip is contained within the rectangle self.rect and that prior to extraction the image should be rotated counter-clockwise by self.angle radians. Finally, the extracted chip should have self.rows rows and self.cols columns in it regardless of the shape of self.rect. This means that the extracted chip will be stretched to fit via bilinear interpolation when necessary.
__init__(*args, **kwargs)
Overloaded function.
__init__(self: dlib.chip_details, rect: dlib.drectangle) -> None
__init__(self: dlib.chip_details, rect: dlib.rectangle) -> None
ensures
self.rect == rect_
self.angle == 0
self.rows == rect.height()
self.cols == rect.width()
__init__(self: dlib.chip_details, rect: dlib.drectangle, size: int) -> None
__init__(self: dlib.chip_details, rect: dlib.rectangle, size: int) -> None
ensures
...
“->无”是什么意思?
【问题讨论】:
-
这是一个类型注解。在这种情况下,这意味着
__init__方法返回None