14 lines
303 B
Python
14 lines
303 B
Python
from cv_analysis.utils.rectangle import Rectangle
|
|
|
|
|
|
def is_square_like(box: Rectangle):
|
|
return box.width / box.height > 0.5 and box.height / box.width > 0.5
|
|
|
|
|
|
def is_wide(box: Rectangle):
|
|
return box.width / box.height > 1.5
|
|
|
|
|
|
def is_tall(box: Rectangle):
|
|
return box.height / box.width > 1.5
|