python-seetaface2
python-seetaface2 copied to clipboard
Python setup.py install 报错
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:92:5: error: ‘UMatData’ does not name a type
UMatData* allocate(PyObject* o, int dims, const int* sizes, int type, size_t* step) const
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:106:5: error: ‘UMatData’ does not name a type
UMatData* allocate(int dims0, const int* sizes, int type, void* data, size_t* step, int flags, UMatUsageFlags usageFlags) const
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:139:19: error: ‘UMatData’ has not been declared
bool allocate(UMatData* u, int accessFlags, UMatUsageFlags usageFlags) const
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:139:49: error: ‘UMatUsageFlags’ has not been declared
bool allocate(UMatData* u, int accessFlags, UMatUsageFlags usageFlags) const
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:147:21: error: ‘UMatData’ has not been declared
void deallocate(UMatData* u) const
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp: In constructor ‘NumpyAllocator::NumpyAllocator()’:
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:89:39: error: ‘getStdAllocator’ is not a member of ‘cv::Mat’
NumpyAllocator() { stdAllocator = Mat::getStdAllocator(); }
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp: In member function ‘bool NumpyAllocator::allocate(int*, int, int) const’:
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:144:65: error: no matching function for call to ‘cv::MatAllocator::allocate(int*&, int&, int&) const’
return stdAllocator->allocate(u, accessFlags, usageFlags);
^
In file included from /home/zh/python-seetaface2/src/include/ndarray_converter.h:5:0,
from /home/zh/python-seetaface2/src/api/ndarray_converter.cpp:4:
/usr/include/opencv2/core/core.hpp:1471:18: note: candidate: virtual void cv::MatAllocator::allocate(int, const int*, int, _Atomic_word*&, uchar*&, uchar*&, size_t*)
virtual void allocate(int dims, const int* sizes, int type, _Atomic_word*& refcount,
^
/usr/include/opencv2/core/core.hpp:1471:18: note: candidate expects 7 arguments, 3 provided
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp: In member function ‘void NumpyAllocator::deallocate(int*) const’:
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:152:22: error: request for member ‘urefcount’ in ‘* u’, which is of non-class type ‘int’
CV_Assert(u->urefcount >= 0);
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:153:22: error: request for member ‘refcount’ in ‘* u’, which is of non-class type ‘int’
CV_Assert(u->refcount >= 0);
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:154:15: error: request for member ‘refcount’ in ‘* u’, which is of non-class type ‘int’
if(u->refcount == 0)
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:156:41: error: request for member ‘userdata’ in ‘* u’, which is of non-class type ‘int’
PyObject* o = (PyObject*)u->userdata;
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp: At global scope:
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:165:16: error: cannot declare variable ‘g_numpyAllocator’ to be of abstract type ‘NumpyAllocator’
NumpyAllocator g_numpyAllocator;
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:86:7: note: because the following virtual functions are pure within ‘NumpyAllocator’:
class NumpyAllocator : public MatAllocator
^
In file included from /home/zh/python-seetaface2/src/include/ndarray_converter.h:5:0,
from /home/zh/python-seetaface2/src/api/ndarray_converter.cpp:4:
/usr/include/opencv2/core/core.hpp:1471:18: note: virtual void cv::MatAllocator::allocate(int, const int*, int, _Atomic_word*&, uchar*&, uchar*&, size_t*)
virtual void allocate(int dims, const int* sizes, int type, _Atomic_word*& refcount,
^
/usr/include/opencv2/core/core.hpp:1473:18: note: virtual void cv::MatAllocator::deallocate(_Atomic_word*, uchar*, uchar*)
virtual void deallocate(_Atomic_word* refcount, uchar* datastart, uchar* data) = 0;
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp: In static member function ‘static bool NDArrayConverter::toMat(PyObject*, cv::Mat&)’:
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:334:7: error: ‘class cv::Mat’ has no member named ‘u’
m.u = g_numpyAllocator.allocate(o, ndims, size, type, step);
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:334:63: error: no matching function for call to ‘NumpyAllocator::allocate(PyObject*&, int&, int [33], int&, size_t [33])’
m.u = g_numpyAllocator.allocate(o, ndims, size, type, step);
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:139:10: note: candidate: bool NumpyAllocator::allocate(int*, int, int) const
bool allocate(UMatData* u, int accessFlags, UMatUsageFlags usageFlags) const
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:139:10: note: candidate expects 3 arguments, 5 provided
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp: In static member function ‘static PyObject* NDArrayConverter::toNDArray(const cv::Mat&)’:
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:351:12: error: ‘class cv::Mat’ has no member named ‘u’
if(!p->u || p->allocator != &g_numpyAllocator)
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:357:33: error: ‘class cv::Mat’ has no member named ‘u’
PyObject* o = (PyObject*)p->u->userdata;
^
CMakeFiles/seetaface.dir/build.make:86: recipe for target 'CMakeFiles/seetaface.dir/src/api/ndarray_converter.cpp.o' failed
make[2]: *** [CMakeFiles/seetaface.dir/src/api/ndarray_converter.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/seetaface.dir/all' failed
make[1]: *** [CMakeFiles/seetaface.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "setup.py", line 106, in
try opencv-3.4.2