This is a simple structure that represents a rectangle.
|
|
|
|
|
|
|
|
|
|
|
|
|
overlap(self,
rect2)
Compute an overlap measure for two detection rectangles. |
source code
|
|
|
similarity(self,
rect)
Compute the similarity of the rectangles in terms of overlap. |
source code
|
|
|
rescale(self,
scale)
Expand or contract the size of the rectangle by a "scale"
while keeping the Rect centered at the same location. |
source code
|
|
|
asInt(self)
Return a dictionary representing the rectangle with integer values |
source code
|
|
|
|
|
|
|
box(self)
Get this rectangle as a bounding box as expected by many PIL
functions. |
source code
|
|
|
asOpenCV(self)
@returns a representation compatible with opencv. |
source code
|
|
|
|
|
asCenteredTuple(self)
@returns a tuple (cx,cy,w,h). |
source code
|
|
|
|
|
|
|
__mul__(self,
val)
Multiply the rectangle by a constant. |
source code
|
|
|
__rmul__(self,
val)
Multiply the rectangle by a constant. |
source code
|
|
|
__div__(self,
val)
Divide the rectangle by a constant |
source code
|
|