I have two lists of coordinates of different lengths representing points on a graph and I need them to be the same length:
x = [[10, 20], [15, 22]...] #len == 1200
y = [[12, 12], [16, 21]...] #len == 1300
Whilst researching I came across the Ramer–Douglas–Peucker algorithm (https://pypi.org/project/rdp/) and this seemed promising in that it smoothed the curves and reduced the number of points, the issue is I need the algorithm to return a fixed number of points. Is this at all possible?
Edit:
Data comes from opencv contour operation on two separate images, plotted below as the green and red line, note I dont just need this to work for this image but for multiple images I have