The scene detection problem

Detecting text that randomly appears in a scene is a problem that's harder than it looks. There are several new variables that you need to take into account when you're comparing to identified scanned text, such as the following:

The following picture, taken from Google Street View, illustrates these problems. Note how several of these situations occur simultaneously in just a single image:

Performing text detection to deal with such situations may prove computationally expensive, since there are 2n subsets of pixels, n being the number of pixels in the image.

To reduce complexity, two strategies are commonly applied:

The OpenCV 4.0 algorithm uses the second strategy by performing connected component analysis and searching for extremal regions.