You need to handle this as two completely separate searches. Train the two ROIs as separate patterns (two images), then search for each one separately. The pattern matching only works for a single rectangular ROI, so this is the only way to do it.
Bruce
Bruce Ammons
Ammons Engineering