Another thing you can try is an active contour.
This is basically a curve that is defined by a number of points and iteratively optimised to "match" the shape of some image feature.
The procedure that optimises the location of the points is driven by two opposing "forces". One force is responsible for advancing the curve and one force is responsible for inhibiting it. For example, at each iteration, repelling forces may be assigned on the points that make them want to move away from each other, but, at the same time, another set of repelling forces could be established, this time away from identified edges on an image.
It's a bit easier to imagine how this works in 3 dimensions if you think of a balloon inside an object which you inflate and its surface, gradually, takes the shape of the space it is enclosed in. Similarly, you can think of a balloon that is over-inflated around an object and it is gradually deflated and traces the surface of the object it envelopes.
In this particular case and since the lemniscate is mostly convex, perhaps the "deflating" active contour will work best. You can find the bounding box by tracing the extrema of the curve as it is traced by the data and use the diagonal and centre of the bounding box to place an active "circle" around the curve which will eventually trace it.
Hope this helps.