Microsoft レンズが CameraX を使用してデベロッパーの生産性を向上
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。

Microsoft レンズは、書類やホワイトボードの画像を読みやすくする製品です。Microsoft レンズチームは、カメラとカメラ機能のサポートを含む Android フレームワーク API である Camera1 API が、最新の Android デバイスで動作に一貫性がないことを懸念していました。新しい技術の開発を検討した結果、最速の開発手段は CameraX を使用してカメラ付きスマートフォンの最新機能を入手することであると判断しました。
Eyecon の取り組み
Microsoft は、Microsoft レンズを使用する一連の生産性向上アプリに CameraX を使用することにしました。CameraX はオープンソースの Android Jetpack サポート ライブラリであり、デベロッパーはこれを使用して Android アプリでのカメラ機能を簡単に構築できます。CameraX は Microsoft レンズのすべてのツールと統合されており、一部のアプリで高品質の画像を使用できます。また、CameraX はよりシンプルな API を提供することでデベロッパー エクスペリエンスを向上させ、Android デバイスの 94% で機能します。CameraX に移行することで、Microsoft レンズチームは、パフォーマンスの問題を解決し、デベロッパーの生産性を向上させ、製品化までの時間を短縮することができました。
結果

Microsoft レンズのチームは、CameraX ライブラリを実装することで、テストと最適化のサイクルが減ったことで、開発者の大幅な時間の節約を実現しました。Camera2 は約 6 か月かかっていたのに対し、CameraX ではエンジニアリング チームが統合に約 4 か月かかると推定しています。
「CameraX を使用すると、統合の労力と時間に役立つ Camera1 API と比較して、解像度、アスペクト比、画像の回転、キャプチャ品質などの属性を簡単に構成できます。CameraX が内部で状態(カメラの開閉)を処理している間に、アプリを切り替えることで統合するコード行が削減されました。また、デベロッパーの生産性がアプリの状態をリセットするのではなくビジネス ロジックに集中できるようになりました」と、Microsoft のプリンシパル ソフトウェア エンジニア マネージャーである Vishal Bhatnagar 氏は語ります。

CameraX を使用することで、Microsoft は Camera1 と比較して起動とキャプチャのパフォーマンスが向上しました。最新の Android デバイスでは、リリースとキャプチャでパフォーマンスが 2 倍向上し、3 倍になったデバイスもあります(デバイスによって異なります)。さらに、コアスキャン機能の有効化は、Camera2 の推定よりも簡単でした。デバイスの断片化に関しては、CameraX により、多くの OEM デバイスにおける実装で多くのデバイスの Camera2 バリエーションが効果的に隠されます。
Microsoft チームは現在、Office、Teams、OneDrive、Word、Excel、PowerPoint、Microsoft レンズ、マイハブなどの他の Android アプリに CameraX を統合しています。これらのアプリはすべて、ドキュメント スキャンや画像からエンティティへの抽出(画像からテーブル、画像からテキストなど)での画像キャプチャ機能に CameraX を使用します。Microsoft チームは、まもなく Outlook に CameraX を実装し、Kaizala などの他のアプリへの可能性を検討する予定です。
始める
アプリに CameraX を実装する方法について詳しくは、ドキュメントをご覧ください。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2022-01-31 UTC。
[[["わかりやすい","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"]],["最終更新日 2022-01-31 UTC。"],[],[],null,["# Microsoft Lens increases developer productivity using CameraX\n\n[Microsoft Lens](https://play.google.com/store/apps/details?id=com.microsoft.office.officelens) is a product that makes images of documents and whiteboards easier to read. The Microsoft Lens team was concerned that the [Camera1](https://developer.android.com/guide/topics/media/camera) API, an Android framework API that includes support for cameras and camera features, was performing inconsistently for them on modern Android devices. They scoped out building something new and determined that the fastest development route was to use CameraX to get the modern features of a camera phone.\n\nWhat they did\n-------------\n\nMicrosoft decided to use [CameraX](https://developer.android.com/training/camerax) for their suite of productivity apps that use Microsoft Lens. CameraX is an open source [Android Jetpack](https://developer.android.com/jetpack) support library that makes it simpler for developers to build camera functionality in Android apps. CameraX integrates with all of Microsoft Lens' tools to ensure use of high-quality images across select apps. CameraX also improves the developer experience by providing a simpler API and works across 94 percent of Android devices. By switching to CameraX, the Microsoft Lens team was able to solve their performance issues, increase developer productivity, and reduce the time to go to market.\n\nResults\n-------\n\nThe Microsoft Lens team found that implementing the CameraX library saved their developers a significant amount of time, as a result of fewer testing and optimization cycles. They estimate that CameraX took their engineering team about four months of effort for integration time, compared to Camera2, which would have taken about six.\n\n\"With CameraX it is easier to configure attributes like resolution, aspect ratio, image rotation, capture quality, etc., when compared to Camera1 APIs, which helped integration effort and time. CameraX internally handling the state (to open/close camera) while users switch between the applications had reduced lines of code to integrate and also helped developer productivity to focus on business logic instead of app resetting state,\" said Vishal Bhatnagar, Principal Software Engineer Manager at Microsoft.\n\nUsing CameraX led Microsoft to better launch and capture performance compared to Camera1. Their performance on modern Android devices increased by 2X in launch and capture, and some devices even saw performance gains of 3X (although this varies by device). In addition, enabling core scan functionality was easier compared to estimates for Camera2. In terms of device fragmentation, CameraX effectively hides many devices' Camera2 variations in implementation on many OEM devices.\n\nThe Microsoft team is currently integrating CameraX into some of their other Android apps, such as Office, Teams, OneDrive, Word, Excel, PowerPoint, Microsoft Lens, and My Hub. All of these apps use CameraX for image capture functionality in scenarios such as document scan and image to entity extraction (such as image to table, image to text). The Microsoft team is also planning to implement CameraX in Outlook soon and looking into its potential for other apps, such as Kaizala.\n\nGet started\n-----------\n\nVisit our documentation to learn more about how to implement CameraX in your app."]]