Solved by ptrblck in post #4 
              
              
                Thanks for the information. 
I would try to avoid the preprocessing with bounding boxes, as this would give you more flexibility but would also add more complexity to the code, which is apparently not needed for your use case. 
Since the digits are located in the same zones, you could write a slice_…