Methods and systems for detecting stamps in scanned documents
AssigneeNice Ltd.
InventorsAlexander Vaindiner, Vitaly Shelest, Ziv Brodie
Life of this patent
Estimating the term…
Abstract
Systems and methods for detecting stamps include if at least one regular shape in an image of a document is detected then outputting said at least one regular shape as a stamp; else: removing at least one of text, lines, and noise in the image of the document; and if at least one closed shape is remaining in the image of the document, then inscribing said at least one closed shape and outputting said at least one inscribed closed shape as a stamp; else if at least one open shape is remaining in the image of the document, then enclosing said at least one open shape and outputting said at least one enclosed shape as a stamp.
Claims19
A sequential computerized algorithmic method for detecting stamps in documents, the method comprising, using a computer processor:
- if at least one regular shape in an image of a document is detected then outputting said at least one regular shape as a stamp, wherein detecting at least one regular shape in the image of the document comprises:
- detecting edges in the image of the document;
- calculating contours in the image of the document;
- filtering the calculated contours to identify at least one closed contour;
- calculating an area of the at least one closed contour;
- iteratively comparing the area of the at least one closed contour with an area of a circumscribing shape selected from a predefined list of regular shapes to determine if the at least one closed contour is the same regular shape as the circumscribing shape;
- and
- outputting the closed contour as a regular shape stamp;
- else:
- removing at least one of text, lines, and noise in the image of the document;
- and
- if at least one closed shape is remaining in the image of the document, then inscribing said at least one closed shape and outputting said at least one inscribed closed shape as a stamp;
- else
- if at least one open shape is remaining in the image of the document, then enclosing said at least one open shape and outputting said at least one enclosed shape as a stamp.
A system for detecting stamps in documents, the system comprising:
- at least one computer processor;
- and
- a memory containing instructions which, when executed by the at least one processor, cause the at least one processor to perform a sequential algorithmic method, the sequential algorithmic method comprising the steps of:
- if at least one regular shape in an image of a document is detected then outputting said at least one regular shape as a stamp;
- else:
- removing at least one of text, lines, and noise in the image of the document;
- and
- if at least one closed shape is remaining in the image of the document, then inscribing said at least one closed shape and outputting said at least one inscribed closed shape as a stamp;
- else
- if at least one open shape is remaining in the image of the document, then enclosing said at least one open shape and outputting said at least one enclosed shape as a stamp, wherein the at least one processor is configured to enclose at least one remaining open shape in the image of the document by:
- identifying large objects in the image relative to a font size;
- detecting edges in the image of the document;
- calculating one or more contours in the image of the document;
- filtering the one or more contours to identify at least one contour with points approximating a shape selected from a predefined list of regular shapes;
- enclosing the at least one contour with the selected shape;
- determining if the at least one contour is the same shape as the selected shape;
- applying a mask of the selected shape to the image of the document and outputting the result as a stamp.
A sequential computerized algorithmic method for detecting stamps in documents, the method comprising, using a computer processor:
- if at least one regular shape in an image of a document is detected then outputting said at least one regular shape as a stamp;
- else:
- removing at least one of text, lines, and noise in the image of the document;
- and
- if at least one closed shape is remaining in the image of the document, then inscribing said at least one closed shape and outputting said at least one inscribed closed shape as a stamp, wherein inscribing at least one remaining closed shape in the image of the document comprises:
- identifying large objects in the image relative to a font size;
- detecting edges in the image of the document;
- calculating at least one contour in the image of the document;
- obtaining a convex hull of the at least one contour;
- determining a shape of the convex hull by iteratively inscribing a maximum shape selected from a predefined list of regular shapes inside the convex hull;
- and
- applying a mask of the determined shape to the image of the document and outputting the result as a stamp;
- else
- if at least one open shape is remaining in the image of the document, then enclosing said at least one open shape and outputting said at least one enclosed shape as a stamp.
A sequential computerized algorithmic method for detecting stamps in documents, the method comprising, using a computer processor:
- if at least one regular shape in an image of a document is detected then outputting said at least one regular shape as a stamp;
- else:
- removing at least one of text, lines, and noise in the image of the document;
- and
- if at least one closed shape is remaining in the image of the document, then inscribing said at least one closed shape and outputting said at least one inscribed closed shape as a stamp;
- else
- if at least one open shape is remaining in the image of the document, then enclosing said at least one open shape and outputting said at least one enclosed shape as a stamp;
- and
- detecting at least one colored stamp in the image of the document, said detecting comprising:
- converting the image of the document to an HSV color space;
- selecting a first predefined H value interval;
- for the selected H value interval:
- calculating an S component which minimizes a quantity of white pixel blobs in the converted image of the document;
- binarizing a resulting image having said S component;
- inverting the binarized image;
- applying an OR mask to the image of the document using the inverted image;
- and
- detecting at least one regular shape in the masked image of the document and outputting said at least one regular shape as a colored stamp;
- and
- iteratively repeating for a different H value interval if no colored stamp is output.
Dependencies are inferred from the claim text.