Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Công cụ quét tài liệu
Số hoá tài liệu vật lý, cho phép người dùng chuyển đổi tài liệu vật lý thành định dạng kỹ thuật số, đã trở thành một hành trình rất phổ biến của người dùng trên các ứng dụng dành cho thiết bị di động.
API trình quét tài liệu của Bộ công cụ học máy cung cấp một giải pháp toàn diện với luồng giao diện người dùng chất lượng cao, nhất quán trên các ứng dụng và thiết bị Android. Sau khi quy trình quét tài liệu được kích hoạt từ ứng dụng của bạn, người dùng sẽ nắm toàn quyền kiểm soát quá trình quét. Họ có thể tuỳ ý cắt tài liệu đã quét, áp dụng bộ lọc, xoá bóng hoặc vết ố và dễ dàng gửi lại các tệp đã số hoá về ứng dụng của bạn.
Luồng giao diện người dùng, mô hình học máy và các tài nguyên lớn khác được phân phối bằng Dịch vụ Google Play, tức là:
Ảnh hưởng của kích thước tệp nhị phân thấp (tất cả mô hình học máy và tài nguyên lớn sẽ được tải xuống tập trung trong Dịch vụ Google Play).
Không cần quyền sử dụng máy ảnh – trình quét tài liệu sẽ tận dụng quyền truy cập vào máy ảnh của Dịch vụ Google Play và người dùng có quyền kiểm soát tệp nào cần chia sẻ lại với ứng dụng của bạn.
Toàn bộ quy trình quét tài liệu hoạt động trên thiết bị.
Giao diện người dùng chất lượng cao và nhất quán để số hoá tài liệu thực.
Chụp tự động nhờ tính năng phát hiện tài liệu.
Phát hiện cạnh chính xác để có kết quả cắt tối ưu.
Tự động phát hiện chế độ xoay để hiển thị tài liệu theo chiều dọc.
Các chức năng chỉnh sửa để cắt, áp dụng bộ lọc, xoá bóng, làm sạch vết bẩn và gửi các tệp số hoá về lại ứng dụng của bạn một cách liền mạch.
Xử lý trên thiết bị, bảo vệ quyền riêng tư của người dùng.
Ứng dụng của bạn không cần quyền sử dụng máy ảnh.
Ảnh hưởng của kích thước nhị phân APK thấp.
Tuỳ chỉnh
API trình quét tài liệu cung cấp luồng giao diện người dùng hoàn chỉnh, chất lượng cao và nhất quán trên các ứng dụng Android. Tuy nhiên, bạn cũng có thể tuỳ chỉnh một số khía cạnh về trải nghiệm người dùng:
Số trang tối đa:
Đặt giới hạn về số trang được quét.
Nhập thư viện:
Bật hoặc tắt tính năng nhập từ thư viện ảnh.
Chức năng chỉnh sửa:
Tuỳ chỉnh các chức năng chỉnh sửa mà người dùng có thể sử dụng bằng cách chọn trong số 3 chế độ sau:
SCANNER_MODE_BASE: các chức năng chỉnh sửa cơ bản (cắt, xoay, sắp xếp lại trang, v.v.).
SCANNER_MODE_BASE_WITH_FILTER: thêm bộ lọc hình ảnh (thang màu xám, tính năng nâng cao hình ảnh tự động, v.v.) vào chế độ SCANNER_MODE_BASE.
SCANNER_MODE_FULL (mặc định): thêm khả năng làm sạch hình ảnh bằng công nghệ học máy (xoá vết ố, vân tay, v.v.) vào chế độ SCANNER_MODE_BASE_WITH_FILTER. Chế độ này cũng sẽ cho phép tự động thêm các tính năng chính trong tương lai cùng với bản cập nhật Dịch vụ Google Play, trong khi 2 chế độ còn lại sẽ giữ nguyên các bộ tính năng hiện tại và chỉ nhận được một số tinh chỉnh nhỏ.
Chế độ cơ sở
Chế độ cơ sở có bộ lọc
Chế độ hoàn chỉnh
Kết quả mẫu
Ảnh gốc
Tài liệu đã quét đã chỉnh sửa phối cảnh, xoá nếp nhăn và áp dụng bộ lọc thang màu xám
Ảnh gốc
Tài liệu đã quét tự động xoay để loại bỏ vết bẩn và áp dụng bộ lọc màu
Ảnh gốc
Giấy tờ đã quét đã loại bỏ vết bẩn và áp dụng bộ lọc tự động
Ảnh gốc
Tài liệu đã quét tự động xoay với phần bóng đổ và áp dụng bộ lọc tự động
Ảnh gốc
Tài liệu đã quét tự động xoay bằng cách bỏ ngón tay và áp dụng bộ lọc tự động
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eML Kit's Document Scanner API enables digitization of physical documents within Android apps, providing a high-quality and consistent user interface.\u003c/p\u003e\n"],["\u003cp\u003eThe API offers on-device processing, ensuring user privacy and eliminating the need for camera permissions from the app.\u003c/p\u003e\n"],["\u003cp\u003eUsers have control over the scanning process, including cropping, applying filters, removing imperfections, and sharing the digitized files.\u003c/p\u003e\n"],["\u003cp\u003eCustomization options are available to tailor the user experience, such as limiting pages, enabling gallery imports, and adjusting editing functionalities.\u003c/p\u003e\n"],["\u003cp\u003eThe API leverages Google Play services for model delivery, minimizing app size and enabling automatic updates for enhanced features.\u003c/p\u003e\n"]]],["The document scanner API allows users to digitize physical documents within Android apps. Key actions include automatic document capture, edge and rotation detection, and editing features like cropping, filtering, and stain/shadow removal. The API operates on-device and uses Google Play services, ensuring low binary size impact and eliminating the need for camera permissions. Customization options are provided for the maximum number of pages, gallery import, and three editing modes, with the full mode offering the most feature set.\n"],null,["Document scanner\n----------------\n\n| This API is offered in beta, and is not subject to any SLA or deprecation policy. Changes may be made to this API that break backward compatibility.\n\nDigitizing physical documents, which allows users to convert physical documents\ninto digital formats has become a very common user journey in mobile apps.\nML Kit's document scanner API provides a comprehensive solution with a\nhigh-quality, consistent UI flow across Android apps and devices. Once the\ndocument scanner flow is triggered from your app, users retain full control over\nthe scanning process. They can optionally crop the scanned documents, apply\nfilters, remove shadows or stains, and easily send the digitized files back to\nyour app.\n\nThe UI flow, ML models and other large resources are delivered using Google Play\nservices, which means:\n\n- Low binary size impact (all ML models and large resources are downloaded centrally in Google Play services).\n- No camera permission is required - the document scanner leverages the Google Play services' camera permission, and users are in control of which files to share back with your app.\n\nThe entire document scanner flow operates on-device.\n\n[Android](/ml-kit/vision/doc-scanner/android)\n\n### Key capabilities\n\n- High-quality and consistent user interface for digitizing physical documents.\n- Automatic capture with document detection.\n- Accurate edge detection for optimal crop results.\n- Automatic rotation detection to show documents upright.\n- Editing functionalities to crop, apply filters, remove shadows, clean stains, and seamlessly send digitized files back to your app.\n- On-device processing, preserving user's privacy.\n- No camera permission is needed from your app.\n- Low apk binary size impact.\n\n### Customization\n\nThe document scanner API provides a high-quality fully fledged UI flow that is\nconsistent across Android apps. However, there is also room to customize some\naspects of the user experience:\n\n- **Maximum number of pages:** \n\n Set a limit to the number of pages scanned.\n\n- **Gallery import:** \n\n Enable or disable the capability to import from the photo gallery.\n\n- **Editing functionalities:** \n\n Customize the editing functionalities available to the user by choosing\n from 3 modes:\n\n - `SCANNER_MODE_BASE`: basic editing capabilities (crop, rotate, reorder pages, etc...).\n - `SCANNER_MODE_BASE_WITH_FILTER`: adds image filters (grayscale, auto image enhancement, etc...) to the `SCANNER_MODE_BASE` mode.\n - `SCANNER_MODE_FULL` (default): adds ML-enabled image cleaning capabilities (erase stains, fingers, etc...) to the `SCANNER_MODE_BASE_WITH_FILTER` mode. This mode will also allow future major features to be automatically added along with Google Play services updates, while the other two modes will maintain their current feature sets and only receive minor refinements.\n\n| Base mode | Base mode with filter | Full mode |\n|-----------|-----------------------|-----------|\n| | | |\n\n### Example results\n\n| Original picture | Scanned document with perspective corrected, wrinkle removed and grayscale filter applied |\n|------------------|-------------------------------------------------------------------------------------------|\n| | |\n\n| Original picture | Scanned document auto-rotated with stain removed and color filter applied |\n|------------------|---------------------------------------------------------------------------|\n| | |\n\n| Original picture | Scanned document with stain removed and auto filter applied |\n|------------------|-------------------------------------------------------------|\n| | |\n\n| Original picture | Scanned document auto-rotated with shadow removed and auto filter applied |\n|------------------|---------------------------------------------------------------------------|\n| | |\n\n| Original picture | Scanned document auto-rotated with finger removed and auto filter applied |\n|------------------|---------------------------------------------------------------------------|\n| | |"]]