stb-tester[1] captures video from a set-top box or smart tv or similar appliance,
and runs automated tests against it by sending infrared signals and
analysing the captured video. It uses python and OpenCV. It is
open-source software (LGPL).
Currently stb-tester's image processing is very simple: It looks for specific, previously-captured images, accounting for some noise. But there is plenty of scope for much smarter processing: Identifying areas with text within the image, then doing OCR; or measuring some aspect of image or video quality.