def get_area ( self ) : return ( self . p2 . x - self . p1 . x ) * ( self . p2 . y - self . p1 . y )
counting bounding box in python
Calculate area of bounding box .
def get_area(self):
        """Calculate area of bounding box."""
        return (self.p2.x-self.p1.x)*(self.p2.y-self.p1.y)