Opencv js approxpolydp. arcLength(cnt, True) .