An efficient algorithm for the computation of the metric average of two intersecting convex polygons, with application to morphi