opencv-mobile icon indicating copy to clipboard operation
opencv-mobile copied to clipboard

自己编译提供opencv-mobile-4.9.0的源码增加其他模块如objdetect和calib3d报错,

Open sajdlkasj opened this issue 10 months ago • 5 comments

error: ‘const class cv::_InputArray’ has no member named ‘isUMatVector’; did you mean ‘isMatVector’? 1061 | if( _descriptors.isUMatVector() ) | ^~~~~~~~~~~~ | isMatVector /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/features2d/src/matchers.cpp:1063:21: error: ‘UMat’ was not declared in this scope; did you mean ‘Mat’? 1063 | std::vector<UMat> descriptors; | ^~~~ | Mat /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/features2d/src/matchers.cpp:1063:25: error: template argument 1 is invalid 1063 | std::vector<UMat> descriptors; | ^ /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/features2d/src/matchers.cpp:1063:25: error: template argument 2 is invalid /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/features2d/src/matchers.cpp:1064:22: error: ‘const class cv::_InputArray’ has no member named ‘getUMatVector’; did you mean ‘getMatVector’? 1064 | _descriptors.getUMatVector( descriptors ); | ^~~~~~~~~~~~~ | getMatVector /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/features2d/src/matchers.cpp:1066:44: error: request for member ‘size’ in ‘descriptors’, which is of non-class type ‘int’ 1066 | for( size_t i = 0; i < descriptors.size(); i++ ) | ^~~~ /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/features2d/src/matchers.cpp:1068:44: error: invalid types ‘int[size_t {aka long unsigned int}]’ for array subscript 1068 | addedDescCount += descriptors[i].rows; | ^ /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/features2d/src/matchers.cpp:1071:27: error: ‘const class cv::_InputArray’ has no member named ‘isUMat’; did you mean ‘isMat’? 1071 | else if( _descriptors.isUMat() ) | ^~~~~~ | isMat /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/features2d/src/matchers.cpp:1073:40: error: ‘const class cv::_InputArray’ has no member named ‘getUMat’; did you mean ‘getMat’? 1073 | addedDescCount += _descriptors.getUMat().rows; | ^~~~~~~ | getMat In file included from /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/core/include/opencv2/core.hpp:53, from /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/features2d/include/opencv2/features2d.hpp:47, from /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/features2d/src/precomp.hpp:46, from /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/features2d/src/matchers.cpp:42: /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/features2d/src/matchers.cpp:1090:33: error: ‘const class cv::_InputArray’ has no member named ‘isUMat’; did you mean ‘isMat’? 1090 | CV_Assert( _descriptors.isUMat() || _descriptors.isUMatVector() || _descriptors.isMat() || _descriptors.isMatVector() ); | ^~~~~~ /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/core/include/opencv2/core/base.hpp:342:38: note: in definition of macro ‘CV_Assert’ 342 | #define CV_Assert( expr ) do { if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, FILE, LINE ); } while(0) | ^~~~ /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/features2d/src/matchers.cpp:1090:58: error: ‘const class cv::_InputArray’ has no member named ‘isUMatVector’; did you mean ‘isMatVector’? 1090 | CV_Assert( _descriptors.isUMat() || _descriptors.isUMatVector() || _descriptors.isMat() || _descriptors.isMatVector() ); | ^~~~~~~~~~~~ /home/lubancat/Desktop/opencv-mobile-4.9.0/opencv-mobile-4.9.0 (1)/opencv-mobile-4.9.0/modules/core/include/opencv2/core/base.hpp:342:38: note: in definition of macro ‘CV_Assert’ 342 | #define CV_Assert( expr ) do { if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, FILE, LINE ); } while(0) | ^~~~ make[2]: *** [modules/features2d/CMakeFiles/opencv_features2d.dir/build.make:370:modules/features2d/CMakeFiles/opencv_features2d.dir/src/matchers.cpp.o] 错误 1 make[2]: *** 正在等待未完成的任务.... make[1]: *** [CMakeFiles/Makefile2:807:modules/features2d/CMakeFiles/opencv_features2d.dir/all] 错误 2 make: *** [Makefile:166:all] 错误 2 希望能够解决

sajdlkasj avatar Mar 29 '24 07:03 sajdlkasj

这个问题你是否解决了呢?

yyds-zy avatar Apr 22 '24 09:04 yyds-zy

Same problem here when use Flann and calib3d

ilya-sha avatar May 12 '24 13:05 ilya-sha

见我PR

futz12 avatar Aug 12 '24 02:08 futz12

https://github.com/nihui/opencv-mobile/pull/141

futz12 avatar Aug 12 '24 02:08 futz12

见我PR

I’m also facing an issue with excessive UMAT codes; there are too many of them in the enabled module. How can I resolve this problem? I would appreciate your advice.

laverne01 avatar Oct 04 '24 09:10 laverne01