For upside down detection can you make use of the fact there is a halo effect due to capital letters and the frequency of letters like t, h, k. In your still image above the halo is below the white bands. I.e sum of areas cut in half between the white bands and brighter of two sums needs to be on top. – More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.