1 | initial version |
You should be able to do much better with alignment and binarization. After this, use a pre-set mask to detect all 7 segment and use logical OR to detect fault.
digit OR mask = result
digit OR mask = result
Black pixel in the result reveals faults.