Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
  • Download OpenCV-2.4.5-android-sdk.zip from OpenCV site
  • Extract to where ever as OpenCV-2.4.5-android-sdk, mine happened to be

    /home/anthony/Documents/OpenCV-2.4.5-android-sdk/

  • Open Android Studio and choose Import

  • Select the folder to import

    /home/anthony/Documents/OpenCV-2.4.5-android-sdk/sdk/java/

        yours will be a little different, 
     don't worry, just chose where you extracted OpenCV-2.4.5-android-sdk
    
  • Once the Import wizard finishes, build the app with menu

Build -> Rebuild Project

  1. Close Project
  2. Create New or Open existing project
  3. Then File->Import Module
  4. This time select

OpenCV-2.4.5-android-sdk/sdk/java/XXX.iml

mine was sdk.iml, but yours could be anything but there will be only one

iml file

![] (/upfiles/13724316303530617.png)(http://)

  • Download OpenCV-2.4.5-android-sdk.zip from OpenCV site
  • Extract to where ever as OpenCV-2.4.5-android-sdk, mine happened to be

    /home/anthony/Documents/OpenCV-2.4.5-android-sdk/

  • Open Android Studio and choose Import

  • Select the folder to import

    /home/anthony/Documents/OpenCV-2.4.5-android-sdk/sdk/java/

      yours will be a little different, 
     don't worry, just chose where you  extracted OpenCV-2.4.5-android-sdk
    
  • Once the Import wizard finishes, build the app with menu

Build -> Rebuild Project

    • Close Project

    • Create New or Open existing project
    • Then

    File->Import Module

    • This time select

OpenCV-2.4.5-android-sdk/sdk/java/XXX.iml

/home/anthony/Documents/OpenCV-2.4.5-android-sdk/sdk/java/XXX.iml

mine was sdk.iml, but yours could be anything but there will be only one

iml file

![] (/upfiles/13724316303530617.png)(http://)

You can now start using OpenCV functions, start by typing

import org.

once you type the period Android Studio should drop a list of options one of which is

opencv

image description

The rest is up to you.