透過集合功能整理內容 你可以依據偏好儲存及分類內容。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\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 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\nKey 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\nCustomization\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\nExample 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| | |"]]