Find Signature

I was asked several times if we can check a document if it’s signed or not. The answer is no, we don’t support that.
But what about an activity that will return the percentage of non-white pixels. Actually, it could be a little smarter, get the percentage of pixels different than the background. Based on this value, one could consider that we have a signature in the picture.
This could be used with formatted documents, where the signature field is fixed. Extract the image from that scope and check if it contains a signature.

How would this work? What about false positives? How would you distinguish between

some text lorem ipsum
some text lorem ipsum
signature with same % of wp
some handwritten anotation

Plese see attached invoices.
Invoice - signed.pdf (99.3 KB)
Invoice - not signed.pdf (97.0 KB)
Invoice - stamped.pdf (112.6 KB)

I have never used OpenCV or any other computer vision library, but I think that the following process is doable:

  1. User will select the rectangle where the signature is expected to be.
  2. User will select the minimum signature size, or the percentage of non-white pixels relative to image size.
  3. The algorithm will find the objects in that area.
  4. The result is computed based on the objects found and on the minimum signature size selected by user.