Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android ndk生成系统找不到指定的路径。make:**[o]错误1_Android_Opencv_Android Ndk - Fatal编程技术网

Android ndk生成系统找不到指定的路径。make:**[o]错误1

Android ndk生成系统找不到指定的路径。make:**[o]错误1,android,opencv,android-ndk,Android,Opencv,Android Ndk,有eclipse和cygwin 除了Android.mk,我没有改变这个项目 但是,我无法运行它,因为ndk build不工作 make: Entering directory `C:/Users/TL/Desktop/panorama-HDR-opencv-master/panoram a-HDR-opencv-master/code' [armeabi-v7a] Compile++ thumb: PanoH

有eclipse和cygwin

除了Android.mk,我没有改变这个项目

但是,我无法运行它,因为
ndk build
不工作

    make: Entering directory `C:/Users/TL/Desktop/panorama-HDR-opencv-master/panoram                                        a-HDR-opencv-master/code'
[armeabi-v7a] Compile++ thumb: PanoHDR <= PanoHDR.cpp


[armeabi-v7a] Compile++ thumb: PanoHDR <= Panorama.cpp


jni/Panorama.cpp: In function 'void find_correspondences(std::vector<cv::Mat>, s                                        td::vector<std::vector<cv::Point_<float> > >&, std::string, bool)':
jni/Panorama.cpp:26:20: error: no matching function for call to 'cv::ORB::ORB(in                                        t)'
  ORB detector (2000);
                    ^
jni/Panorama.cpp:26:20: note: candidates are:
In file included from /Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/n                                        ative/jni/include/opencv2/opencv.hpp:50:0,
                 from jni/Panorama.cpp:1:
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:254:20: note: cv::ORB::ORB()
 class CV_EXPORTS_W ORB : public Feature2D
                    ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:254:20: note:   candidate expects 0 arguments, 1 provided
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:254:20: note: cv::ORB::ORB(const cv::ORB&)
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:254:20: note:   no known conversion for argument 1 from 'int'                                         to 'const cv::ORB&'
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:254:20: note: cv::ORB::ORB(cv::ORB&&)
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:254:20: note:   no known conversion for argument 1 from 'int'                                         to 'cv::ORB&&'
jni/Panorama.cpp:26:6: error: cannot declare variable 'detector' to be of abstra                                        ct type 'cv::ORB'
  ORB detector (2000);
      ^
In file included from /Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/n                                        ative/jni/include/opencv2/opencv.hpp:50:0,
                 from jni/Panorama.cpp:1:
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:254:20: note:   because the following virtual functions are p                                        ure within 'cv::ORB':
 class CV_EXPORTS_W ORB : public Feature2D
                    ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:292:26: note:        virtual void cv::ORB::setMaxFeatures(int                                        )
     CV_WRAP virtual void setMaxFeatures(int maxFeatures) = 0;
                          ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:293:25: note:        virtual int cv::ORB::getMaxFeatures() co                                        nst
     CV_WRAP virtual int getMaxFeatures() const = 0;
                         ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:295:26: note:        virtual void cv::ORB::setScaleFactor(dou                                        ble)
     CV_WRAP virtual void setScaleFactor(double scaleFactor) = 0;
                          ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:296:28: note:        virtual double cv::ORB::getScaleFactor()                                         const
     CV_WRAP virtual double getScaleFactor() const = 0;
                            ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:298:26: note:        virtual void cv::ORB::setNLevels(int)
     CV_WRAP virtual void setNLevels(int nlevels) = 0;
                          ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:299:25: note:        virtual int cv::ORB::getNLevels() const
     CV_WRAP virtual int getNLevels() const = 0;
                         ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:301:26: note:        virtual void cv::ORB::setEdgeThreshold(i                                        nt)
     CV_WRAP virtual void setEdgeThreshold(int edgeThreshold) = 0;
                          ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:302:25: note:        virtual int cv::ORB::getEdgeThreshold()                                         const
     CV_WRAP virtual int getEdgeThreshold() const = 0;
                         ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:304:26: note:        virtual void cv::ORB::setFirstLevel(int)
     CV_WRAP virtual void setFirstLevel(int firstLevel) = 0;
                          ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:305:25: note:        virtual int cv::ORB::getFirstLevel() con                                        st
     CV_WRAP virtual int getFirstLevel() const = 0;
                         ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:307:26: note:        virtual void cv::ORB::setWTA_K(int)
     CV_WRAP virtual void setWTA_K(int wta_k) = 0;
                          ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:308:25: note:        virtual int cv::ORB::getWTA_K() const
     CV_WRAP virtual int getWTA_K() const = 0;
                         ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:310:26: note:        virtual void cv::ORB::setScoreType(int)
     CV_WRAP virtual void setScoreType(int scoreType) = 0;
                          ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:311:25: note:        virtual int cv::ORB::getScoreType() cons                                        t
     CV_WRAP virtual int getScoreType() const = 0;
                         ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:313:26: note:        virtual void cv::ORB::setPatchSize(int)
     CV_WRAP virtual void setPatchSize(int patchSize) = 0;
                          ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:314:25: note:        virtual int cv::ORB::getPatchSize() cons                                        t
     CV_WRAP virtual int getPatchSize() const = 0;
                         ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:316:26: note:        virtual void cv::ORB::setFastThreshold(i                                        nt)
     CV_WRAP virtual void setFastThreshold(int fastThreshold) = 0;
                          ^
/Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/open                                        cv2/features2d.hpp:317:25: note:        virtual int cv::ORB::getFastThreshold()                                         const
     CV_WRAP virtual int getFastThreshold() const = 0;
                         ^
jni/Panorama.cpp:33:61: error: no match for call to '(cv::ORB) (__gnu_cxx::__all                                        oc_traits<std::allocator<cv::Mat> >::value_type&, cv::Mat, __gnu_cxx::__alloc_tr                                        aits<std::allocator<std::vector<cv::KeyPoint> > >::value_type&, __gnu_cxx::__all                                        oc_traits<std::allocator<cv::Mat> >::value_type&)'
  detector(inputImages[0], Mat(), keypoints[0],descriptors[0]);
                                                             ^
jni/Panorama.cpp:35:62: error: no match for call to '(cv::ORB) (__gnu_cxx::__all                                        oc_traits<std::allocator<cv::Mat> >::value_type&, cv::Mat, __gnu_cxx::__alloc_tr                                        aits<std::allocator<std::vector<cv::KeyPoint> > >::value_type&, __gnu_cxx::__all                                        oc_traits<std::allocator<cv::Mat> >::value_type&)'
   detector(inputImages[i], Mat(), keypoints[i],descriptors[i]);
                                                              ^
make: *** [obj/local/armeabi-v7a/objs/PanoHDR/Panorama.o] Error 1
make: Leaving directory `C:/Users/TL/Desktop/panorama-HDR-opencv-master/panorama                                        -HDR-opencv-master/code'
谁能告诉我哪里出了问题?
谢谢。

您使用的OpenCV版本与基于此版本的项目的版本不同,因此您不能假设代码可以正常工作。具体来说,我认为您应该使用静态方法
ORB::create
,而不是试图直接构造
ORB
实例。请参阅OpenCV文档。谢谢michael,我会尝试的
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
OPENCV_LIB_TYPE=STATIC
# Tegra optimized OpenCV.mk
include /Android/OpenCV-3.1.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/OpenCV.mk
# Linker
LOCAL_LDLIBS += -llog

# Our module sources
LOCAL_MODULE    := PanoHDR
LOCAL_SRC_FILES := PanoHDR.cpp Panorama.cpp HDR.cpp NativeLogging.cpp

include $(BUILD_SHARED_LIBRARY)