A robotic system is moving a getting its current location using visual odometry (incremental estimation of rotation and translation). To correct its localization, a loop closure technique may be added. However, this technique based on image comparison is costly. I want to find a way to only use this technique of loop closure only when a potential loop closure is present. Is there a way to use the $x$ and $y$ coordinates of the vehicle provided by visual odometry to say that based on their values a loop closure may have occured?
You can of course check if the robot is close to a prior position and looking in a similar direction (after he had moved away from this position sufficiently). But if your odometry was reliable enough to do this, you wouldn't really need loop closing. Loop closing was invented for exactly the reason that you cannot trust your odometry over a long time.
Well, there is an old solution that finds a possible loop closure by a growing uncertainty of the current location which was popular in EKF based SLAMs. In such way, you can reduce the number of the candidates for the place recognition. But I guess trajectory only is probably not enough for a loop closure unless you assume a special situation.
I think you should go for iterative closest point algorithm. This algorithm is used for detecting loop closing. This is not very reliable but still it work well. You can check this link Visual navigation for flying Robots