Which Type of Algorithm Did Camscanner Use for Photo to PDF Conversion?

Upload and start working with your PDF documents.
No downloads required

How To Type on PDF Online?

Upload & Edit Your PDF Document
Save, Download, Print, and Share
Sign & Make It Legally Binding

Easy-to-use PDF software

review-platform review-platform review-platform review-platform review-platform

Which type of algorithm did camscanner use for photo to PDF conversion?

This is how can scanner does it(99%). Apply Gaussian blur to filter out some noise. Then there is an edge detection algorithm which detects all the edges in the image. Loop through all the edges and find all the closed ones. Find the one with largest area/perimeter. Find the corner (four) points of the area. Crop it properly. I am not sure about the library that cam scanner uses but it can be done with the help of OpenCV. For the nerds. Edge detection is usually done by Canny edge detection (algorithm goes way over my head). This way you get all the x and y coordinates of all the edges. You loop through all the edges and find the ones where x and y are extremely close(detect if edge/contour is closed). Use l*b to find the area or 2*(l+b) to find the perimeter(fetch the largest one). Apply the perspective transform in order correct the viewing angles and get the top down view of the document. And for the color it seems like grayscale with some change in contrast? Not entirely sure about that.

Customers love our service for intuitive functionality

4.5

satisfied

46 votes

Type on PDF: All You Need to Know

You might also consider running it on a different monitor, so there won't be any artifacts since the display is not perfectly flat.