If your objects appear in a fixed position I would follow these steps
- Given both contours, check which one is right and which one is left, by looking at the x coordinate of center
- Now for the left contour, look at all the points of your contour (loop over them) and pic the x coordinate which is smallest on the x axis compared to center.
- Do the opposite for the second contour, looking for the largest x value, and thus the point most to the right