Android 適用的 EIS 快速入門導覽課程
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
- 設定電子影像穩定技術的開發環境。
- 在範例應用程式中體驗穩定的相機預覽畫面。
開啟範例專案
本快速入門導覽課程使用 OpenGL,這是用於算繪 2D 和 3D 向量圖形的程式設計介面。請先詳閱「啟用 ARCore」,再開始執行下列步驟。
使用下列指令複製存放區,取得範例專案:
git clone https://github.com/google-ar/arcore-android-sdk.git
在 Android Studio 中,開啟位於 arcore-android-sdk
目錄內 samples
子目錄中的 hello_eis_kotlin 範例專案。
執行範例
HelloEIS 範例應用程式可讓您在支援的裝置上切換相機預覽畫面的防震功能。
請確認 Android 裝置已連上開發機器,然後在 Android Studio 中按一下 Run
。
如果裝置缺少或版本過舊,系統可能會提示您安裝或更新 Google Play 服務 - AR 適用。輕觸 CONTINUE 即可從 Google Play 商店安裝。
切換 EIS
輕觸齒輪圖示並選取 Electronic Image Stabilization (EIS) 即可開啟/關閉 EIS。選取 Enable EIS 即可啟用 EIS。
![]()
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eThis guide provides steps to set up your development environment for Electronic Image Stabilization (EIS) using a sample project that leverages OpenGL for rendering.\u003c/p\u003e\n"],["\u003cp\u003eYou can experience the stabilized camera preview by running the provided HelloEIS sample app on a supported Android device with ARCore enabled.\u003c/p\u003e\n"],["\u003cp\u003eThe sample app allows you to toggle EIS on or off through a settings menu, letting you compare the stabilized and unstabilized camera feeds.\u003c/p\u003e\n"]]],[],null,["# EIS quickstart for Android\n\n- Set up your development environment for Electronic Image Stabilization.\n- Experience the stabilized camera preview in a sample app.\n\nOpen the sample project\n-----------------------\n\nThis quickstart uses [OpenGL](https://en.wikipedia.org/wiki/OpenGL), a\nprogramming interface for rendering 2D and 3D vector graphics. Review\n[Enable ARCore](/ar/develop/java/enable-arcore) before getting started with the\nfollowing steps.\n\nGet the sample project by cloning the repository with the following command: \n\n```\ngit clone https://github.com/google-ar/arcore-android-sdk.git\n```\n\nIn Android Studio, open the **hello_eis_kotlin** sample project, located in the `samples` subdirectory within the `arcore-android-sdk` directory.\n\nRun the sample\n--------------\n\nThe HelloEIS sample app lets you toggle the image stabilization for camera preview on supported devices.\n\nMake sure your Android device is connected to the development machine and click\n**Run** in Android Studio.\n\nYour device may prompt you to install or update\n[Google Play Services for AR](https://play.google.com/store/apps/details?id=com.google.ar.core)\nif it is missing or out of date. Tap **CONTINUE** to install it from the\nGoogle Play Store.\n\nToggle EIS\n----------\n\nTap the gear icon and select **Electronic Image Stabilization (EIS)** to toggle EIS on/off.\nSelect **Enable EIS** to enable EIS."]]