Sensorless freehand 3D ultrasound for non-monotonic and intersecting frames