Ask Your Question

build opencv for android error

asked 2013-04-16 04:32:41 -0500

lionwes gravatar image

updated 2013-04-16 05:47:23 -0500

Andrey Pavlenko gravatar image

Hi All :

I download 4223a59497ae369142af48a1e53e4c3720bfc47b this version OpenCV for android to build, -- Platform: -- Host: Linux 2.6.32-33-generic x86_64 -- Target: Linux 1 mips

Native API level: android-14 -- SDK target: android-15

error log : [ 42%] [ 43%] /home/Project/OpenCV/opencv/modules/features2d/src/descriptors.cpp: In member function 'void cv::DescriptorExtractor::compute(const cv::Mat&, std::vector<cv::keypoint>&, cv::Mat&) const': /home/Project/OpenCV/opencv/modules/features2d/src/descriptors.cpp:65:52: error: 'numeric_limits' is not a member of 'std' /home/Project/OpenCV/opencv/modules/features2d/src/descriptors.cpp:65:72: error: expected primary-expression before 'float'

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2013-04-16 05:46:43 -0500

Andrey Pavlenko gravatar image
  1. this commit is in the master branch that is unstable right now, use 2.4. branch instead
  2. target Linux 1 seems to be embedded linux, not android; use the following CMake options to generate makefile for Android-mips

    -DCMAKE_TOOLCHAIN_FILE=../$OPENCV_DIR/android/android.toolchain.cmake -DANDROID_ABI="mips"

edit flag offensive delete link more


Thanks! But i have another issue.

1.How you know the target Linux 1 is mean embedded linux, not android? where is the code detect


2.I'm build OpenCV for Android is follow about :

So,the above method is error?

My build step :

export ANDROID_SDK=/home/Project/android-sdk-linux

export ANDROID_NDK=/home/Project/android-ndk-r8d

export ANDROID_STANDALONE_TOOLCHAIN=/home/Project/android-toolchain

export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools:/home/Project/android-


export ANDROID_ABI=mips


cd ./android

sh ./scripts/

cd build_mips

make -j8

lionwes gravatar imagelionwes ( 2013-04-17 03:01:11 -0500 )edit

if you cloned the OpenCV git repo, just run git checkout 2.4 in the opencv dir to switch to '2.4' branch

Andrey Pavlenko gravatar imageAndrey Pavlenko ( 2013-04-17 03:09:01 -0500 )edit

clean-up the build dir, run cmake and provide the full cmake output here for analysis

Andrey Pavlenko gravatar imageAndrey Pavlenko ( 2013-04-17 03:11:03 -0500 )edit

I switch to 2.4 is Ok now ,thanks.

But How you know the target Linux 1 is mean embedded linux, not android? where is the code detect it?

lionwes gravatar imagelionwes ( 2013-04-17 21:23:13 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2013-04-16 04:32:41 -0500

Seen: 275 times

Last updated: Apr 16 '13