The demand is to locate the invoice within a camera captured image about that invoice. The invoice is always a white paper with printed black or blue characters, tables and red stamps. Sometimes the background behind the invoice is dark(about 60% of all the samples), but others are not. Sometimes there is shadow on it. The question is how to detect the vertices, edges and corners of the invoice in this image? What algorithms should be applied? The android application CamScanner seems to have this function but not is effective every time. So does the CIDetector interface on iOS. What algorithms does CamScanner or iOS use(traditional or deep)?