This will call train() with phSimpleVision_ADD in place for the 'add_or_set' variable. This can be useful if one doesn't desire to alter the threshold values and attempt to match several different colors. Be careful how often you call this method if you are training in a loop. You could potentially flood the blob_Filter with so many colors to match that it takes too long to run the algorithm for it to be useful for anything. It would be best to call 'train()' if you are using a loop for that simple reason and then call 'applyTraining' after the loop has ended.
Valid values for colorspace are: phSimpleVision_RGB phSimpleVision_HSV (*)
- Return values:
-
Definition at line 1128 of file phSimpleVision.cpp. |