Ask Your Question
0

build opencv for android error

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

lionwes gravatar image

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

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
1

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

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

Comments

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

it?

2.I'm build OpenCV for Android is follow about : http://code.opencv.org/projects/opencv/wiki/Building_OpenCV4Android_from_trunk

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-

toolchain/bin:/home/Project/apache-ant-1.8.4/bin

export ANDROID_ABI=mips

export ANDROID_NATIVE_API_LEVEL=14

cd ./android

sh ./scripts/cmake_android_mips.sh

cd build_mips

make -j8

lionwes gravatar imagelionwes ( 2013-04-17 03:01:11 -0600 )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 -0600 )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 -0600 )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 -0600 )edit

Question Tools

Stats

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

Seen: 391 times

Last updated: Apr 16 '13