Multiple techniques are in the OR module to allow for the right technique to be used for a project. While Haar is often used in face detection the OR module uses a modified version of this such that only a single training image can be used as apposed to the 1000s that are normally used for face detection or recognition. Thus, the OR module should NOT been seen as a face recognition module more than beyond simple cases.
If/when you get objects that are falsely detected, post them here along with the training image so that we can have a closer look. Often, false detections can be eliminated by adding additional images to train on that are distinct from the current set. Just because the module is available doesn't mean that it will work perfectly for every situation. We will often tweak the image using other modules to get a good solid recognition ... but then we have often eliminated the OR module in favor of other recognition techniques that are faster and more reliable but are specific to the context of the problem.
RR isn't limited in speed, but your computer is! RR will run as fast as the machine allows it (why wound't it? there isn't a forced delay just to make things slower!) so performance has more to do with your machine speed and how many training images/templates you are providing it. The more images you use, the more CPU power is required, the more your machine will become taxed and the slower the system will run.
I'm not sure about the VBScript statements ... I would not expect that you can create any statement within VBScript (unless its a loop) that would significantly affect performance. Most likely what is happening is that due to the result of a computation other modules are being activated and running which is causing the slowdown. Perhaps you can post an example of what you are seeing in terms of code/robofile.
There is no 'perfect' operation of really any of the modules in RR. The real world is *not* perfect and thus we can only attempt at perfection. Even the human eyesight and brain processing of those images has significant flaws so we don't even experience the world *perfectly*.
However, to get the OR module to work as best as it can (which is what I think you are asking) one would:
1. Use as few training images as possible. Also make the images the same size as what you expect to see. (If you can eliminate scale and rotation testing that will improve performance.
2. Use as low resolution an image as you can. Larger images require more processing. Often you don't need a very large image for object recognition. More pixels is NOT necessarily a good thing!
3. Crop out those portions of the image that you know will always NOT contain the object. You can also use the Display_Rectangle to draw black areas in those parts too. This helps to reduce the number of potential matches that the OR module might try when looking for objects.
4. Keep things as planar as possible. The OR module will NOT be able to understand when things turn in 3D. A persons face looks very different from the side as it does from a front view. The OR module assumes a single view of any 3D object ... which is often not appropriate. You can train it using more images as an object rotates BUT this will also slow down processing again.
5. Are you sure the OR module is the right module to use? In most of our projects we end up using very specific tests with the Blob Filter or other modules to look for objects with specific properties (i.e. color, size, intensity, shape, etc.)
6. Understanding the limitation of each of the OR methods is also ideal. The Feature points is the most generic but fails with non-textured objects. The Shape method is better for non-textured objects but is very light sensitive. The cross correlation method is also a good generic module but is very slow and does not allow for rotation.
As there is no single "best size fits all" we decided to incorporate multiple methods that are chosen depending on the context of the problem and how those methods work. We plan to add more as time continues based on need ... so if your project requires something that is unique post some sample images here for us to review ... perhaps it will lead to yet another method!