def compute_box_geometry(left_edge, right_edge): move = get_translate_matrix(*left_edge) width = right_edge - left_edge scale = get_scale_matrix(*width) transformed_box = bbox_vertices.dot(scale.T).dot(move.T).astype("float32") return transformed_box
def _compute_geometry(self, block, bbox_vertices): move = get_translate_matrix(*block.LeftEdge) dds = (block.RightEdge - block.LeftEdge) scale = get_scale_matrix(*dds) transformed_box = bbox_vertices.dot(scale.T).dot( move.T).astype("float32") return transformed_box