如何使用Android OpenCV的教學檔?
如何使用 Android OpenCV 的教學檔?¶
介紹¶
電腦視覺是一個熱門的科技。OpenCV可以幫助你在它們的平台開發電腦視覺的應用。這裡有許多的範例可以幫助你學習如何開發電腦視覺的APP。
環境¶
作業系統: Microsoft Windows 7 Professional (64 bit) and Android 4.2.2
開發套件: OpenCV-2.4.10-android-sdk
作法¶
1.. 安裝OpenCV 管理者和範例
如果你的手機是 armeabi-v7a (ARMv7-A + NEON) ,Android 在 2.3以上,請安裝 OpenCV_2.4.9_Manager_2.18_armv7a-neon.apk.
如果你的手機是 armeabi-v7a (ARMv7-A + NEON) , Android 2.3,請安裝 OpenCV_2.4.9_Manager_2.18_armv7a-neon-android8.apk.
如果你的手機是 armeabi (ARMv5, ARMv6) , Android 2.3以上,請安裝 OpenCV_2.4.9_Manager_2.18_armeabi.apk.
如果你的手機是 Intel x86 , Android 2.3以上,請安裝 OpenCV_2. 4.9_Manager_2.18_x86.apk.
如果你的手機是 MIPS , Android 2.3以上,請安裝 OpenCV_2.4.9_Manager_2.18_mips.apk.
Open your DOS command window.
C:\Windows\system32>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
HT15TTD02887 device
C:\Windows\system32>cd C:\OpenCV-2.4.10\OpenCV-2.4.10-android-sdk\apk
C:\OpenCV-2.4.10\OpenCV-2.4.10-android-sdk\apk>adb install OpenCV_2.4.10_Manager_2.19_armv7a-neon.apk
3681 KB/s (7370623 bytes in 1.955s)
pkg: /data/local/tmp/OpenCV_2.4.10_Manager_2.19_armv7a-neon.apk
Success
C:\OpenCV-2.4.10\OpenCV-2.4.10-android-sdk\apk>cd ../samples
C:\OpenCV-2.4.10\OpenCV-2.4.10-android-sdk\samples>adb install example-15-puzzle.apk
1392 KB/s (136859 bytes in 0.096s)
pkg: /data/local/tmp/example-15-puzzle.apk
Success
C:\OpenCV-2.4.10\OpenCV-2.4.10-android-sdk\samples>adb install example-camera-calibration.apk
1391 KB/s (142513 bytes in 0.100s)
pkg: /data/local/tmp/example-camera-calibration.apk
Success
C:\OpenCV-2.4.10\OpenCV-2.4.10-android-sdk\samples>adb install example-color-blob-detection.apk
1509 KB/s (137606 bytes in 0.089s)
pkg: /data/local/tmp/example-color-blob-detection.apk
Success
C:\OpenCV-2.4.10\OpenCV-2.4.10-android-sdk\samples>adb install example-face-detection.apk
1135 KB/s (182621 bytes in 0.157s)
pkg: /data/local/tmp/example-face-detection.apk
Success
C:\OpenCV-2.4.10\OpenCV-2.4.10-android-sdk\samples>adb install example-image-manipulations.apk
1429 KB/s (137626 bytes in 0.094s)
pkg: /data/local/tmp/example-image-manipulations.apk
Success
C:\OpenCV-2.4.10\OpenCV-2.4.10-android-sdk\samples>adb install example-native-activity.apk
2602 KB/s (170563 bytes in 0.064s)
pkg: /data/local/tmp/example-native-activity.apk
Success
C:\OpenCV-2.4.10\OpenCV-2.4.10-android-sdk\samples>adb install example-tutorial-1-camerapreview.apk
1524 KB/s (135859 bytes in 0.087s)
pkg: /data/local/tmp/example-tutorial-1-camerapreview.apk
Success
C:\OpenCV-2.4.10\OpenCV-2.4.10-android-sdk\samples>adb install example-tutorial-2-mixedprocessing.apk
3024 KB/s (151763 bytes in 0.049s)
pkg: /data/local/tmp/example-tutorial-2-mixedprocessing.apk
Success
C:\OpenCV-2.4.10\OpenCV-2.4.10-android-sdk\samples>adb install example-tutorial-3-cameracontrol.apk
2530 KB/s (137344 bytes in 0.053s)
pkg: /data/local/tmp/example-tutorial-3-cameracontrol.apk
Success
2.. 實驗
example-15-puzzle
example-color-blob-detection
example-face-detection
你可以嘗試不同的範例,這將會很有趣。
例外
無
參考
[1] OpenCV-2.4.10-android-sdk documents.
致謝
感謝 (Android, OpenCV) 提供這麼棒的開發工具。