Chuyển đến nội dung

Quét sang PDF

Chụp ảnh một tài liệu và có được thứ trông như một bản quét.

Xử lý trên thiết bị của bạn

Công cụ này chạy hoàn toàn trong trình duyệt của bạn. Tệp của bạn không bao giờ được tải lên, và bạn có thể tự kiểm chứng điều đó trong tab mạng của trình duyệt. Tự kiểm chứng: mở tab mạng của trình duyệt và theo dõi. Bạn sẽ thấy một yêu cầu nhỏ hỏi xem bạn còn tác vụ nào không - một tên công cụ và một mã băm, không bao giờ là tệp.

Công cụ này làm gì

Most people do not own a scanner and everybody owns a camera, but a photograph of a page is not a scan. This closes that gap in four steps: the page is found in the frame, the perspective is flattened, the text is straightened, and the image is thresholded so it reads as a document rather than as a picture of one. On a phone the camera panel captures directly; on a desktop it falls back to the file picker, because most people there are dropping photos they already took.

Use it when something has to be submitted as a scan and there is no scanner in the building: an identity document or a certificate for an application, a signed page going back to an office, a receipt for an expenses claim, or a handwritten note that has to be filed with everything else.

Cách hoạt động

  1. Take the photo here, or drop photos you have already taken. Up to 100 at a time, each up to 100 MB, and every photo becomes one page in the order they are listed.
  2. Leave find the page and straighten on. A detection the tool is not confident about is discarded rather than guessed at, and the whole frame is used instead.
  3. Choose the mode. Black and white is the default and is what makes a photograph look like a scan; grayscale suits a page with photographs on it; colour keeps a stamp or a signature in its own ink.
  4. Pick the page size. A4 or Letter puts every photo on a standard sheet; Match makes each page the shape of its own photo.
  5. Turn on the searchable-text option if you will need to find or copy words later, and pick the language.
  6. Press Scan. The pages are assembled into a single PDF and the download starts.

The four steps run in that order because each depends on the one before. The document is a bright quadrilateral somewhere in a frame that also contains a desk, so its outline is detected first. A homography then maps that trapezoid back to a rectangle, which is what removes the leaning look of a photo taken at an angle. Only then is the residual rotation measured, and it is measured from the text lines rather than the page edges, because lines of text give away the true angle more reliably than a torn or shadowed edge does.

Thresholding is the step that decides whether the result is usable. A photograph has uneven lighting, so a single global threshold turns one half of the page black and blows the other half out. An adaptive threshold compares each pixel to its own neighbourhood instead, which is why a phone photo comes out looking like a scan rather than like a photocopy of a shadow. It is also why black and white is the default rather than an option for the brave.

The mode chooses the encoding as well as the look, and that is where the file size goes. A thresholded page is two colours and compresses to almost nothing as PNG, while JPEG would put ringing artefacts around every letter. A grayscale or colour page is photographic and is the other way round, so those are written as JPEG at quality 0.85. A black-and-white scan is routinely several times smaller than the same page in colour.

Resolution is set in dpi and defaults to 200, which is enough for ordinary printed text. Raise it to 300 for small print, faint carbon copies or anything the recognition is struggling with. 400 stores four times the pixels of 200 and rarely reveals something the threshold at 200 had not already found, so it is worth checking one page before committing a hundred. EXIF orientation is read and applied before any of the geometry, so a photo your phone tagged sideways is not straightened into the wrong rectangle.

Recognition, when you switch it on, runs on the processed pages rather than the originals - that is the whole point of doing the image work first, because a straightened, thresholded page recognises far better than a photograph of one. The words are placed as an invisible text layer over the image, so the page looks exactly as it did and the text can be selected, searched and copied. Words the recogniser scored below 40 per cent are left out rather than added wrong, since a wrong word in a searchable document is worse than a missing one.

Công cụ này không làm được gì

  • Page detection can fail on a low-contrast background, a page that runs off the edge of the frame, or a heavily shadowed edge. It then falls back to the whole frame and says so rather than cropping to the wrong rectangle.
  • Adaptive thresholding handles uneven light, not every kind of bad light. Hard glare, a strong reflection off glossy paper or a deep shadow across the text will still be visible in the result.
  • Capturing directly needs a camera the browser can reach and your permission to use it. On a device without one, the tool falls back to the file picker and works on photos taken elsewhere.

Câu hỏi thường gặp

Bạn chụp ảnh ngay đây được không, hay cần có sẵn ảnh?
Cả hai đều được. Trên điện thoại hoặc máy tính bảng, khung camera mở ngay trong trang, hiện đường viền trang nhận được theo thời gian thực, và chụp thẳng vào hàng đợi. Trên máy tính để bàn, hoặc bất cứ đâu trình duyệt không truy cập được camera, nó quay về bộ chọn tệp để bạn thả vào những ảnh chụp bằng thiết bị khác. Việc xử lý sau đó giống hệt nhau ở cả hai cách.
Làm sao để có kết quả trông như một bản quét thật?
Đặt trang phẳng, để nó chiếm phần lớn khung hình, và giữ cả bốn góc nằm trong ảnh để có thể tìm được đường viền. Ánh sáng đều, gián tiếp tốt hơn một ngọn đèn sáng gắt, vốn tạo một vệt bóng có mép cứng mà bước chuyển ngưỡng không xoá được. Tránh để bóng của chính bạn đổ lên trang, và giữ camera gần như song song với nó - việc chỉnh phối cảnh xử lý được độ nghiêng, nhưng nghiêng ít hơn thì phải kéo giãn ít hơn.
Nó cắt sai vùng, hoặc không cắt gì cả. Giờ làm sao?
Một kết quả nhận diện mà công cụ không chắc chắn sẽ bị bỏ đi một cách chủ ý, bởi cắt tự động sai còn tệ hơn không cắt: thay vào đó cả khung hình được giữ và kết quả cho bạn biết có bao nhiêu trang đã được cắt. Nếu một trang bị cắt sai, hãy chụp lại nó trên một nền tương phản với giấy. Nếu bạn đã cắt ảnh ở nơi khác rồi, hãy tắt hẳn "nhận diện trang".
PDF cho ra dung lượng lớn. Bạn nên đổi gì?
Chế độ trước tiên: đen trắng được ghi thành PNG của một ảnh hai màu và nhỏ hơn nhiều so với cùng trang đó ở dạng màu hay thang xám. Độ phân giải sau đó: 200 dpi là đủ cho chữ thông thường và 400 lưu gấp bốn lần số điểm ảnh. Nếu sau đó vẫn còn quá lớn, hãy đưa kết quả qua Nén PDF.
Bạn tìm được chữ sau đó không?
Được, nếu bạn bật nhận dạng trước khi chuyển đổi. Có tiếng Anh, tiếng Indonesia và cả hai cùng lúc. Những từ nhận ra được ghi thành một lớp vô hình phủ lên ảnh trang, nên tài liệu trông không đổi nhưng chữ của nó có thể chọn, tìm và sao chép. Những từ có độ tin cậy dưới 40 phần trăm bị bỏ đi chứ không đoán mò.
Ảnh của bạn có bị tải lên không, nhất là khi bật nhận dạng?
Không, và nhận dạng chính là trường hợp dễ làm sai nhất. Phần xử lý ảnh chạy trong một Web Worker trong trình duyệt của bạn, còn lõi WebAssembly của bộ nhận dạng và dữ liệu ngôn ngữ được cung cấp từ chính máy chủ của trang chứ không phải một CDN công cộng - khoảng 10,9 MB cho tiếng Anh và 3,8 MB cho tiếng Indonesia, được lưu vào bộ nhớ đệm sau lần chạy đầu tiên. Một bức ảnh hộ chiếu của bạn không bao giờ rời khỏi thiết bị.

Công cụ liên quan