BouweCeunen / computer-vision-jetson-nano

Object detection with SSD MobileNet v2 COCO model optimized with TensorRT on NVIDIA Jetson Nano built upon Jetson Inference of dusty-nv (https://github.com/dusty-nv/jetson-inference).
40 stars 13 forks source link

Opencv error #2

Closed yuanzhedong closed 4 years ago

yuanzhedong commented 4 years ago

I'm trying to rebuild the docker image but get an error when compiling opencv

[100%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o                                                                                                                  
/app/opencv/modules/python/src2/cv2.cpp: In instantiation of ‘bool pyopencv_to(PyObject*, std::vector<_Tp>&, const ArgInfo&) [with _Tp = cv::line_descriptor::KeyLine; PyObject = _object]’:                
/app/opencv/build/modules/python_bindings_generator/pyopencv_generated_types_content.h:51642:69:   required from here                                                                                       
/app/opencv/modules/python/src2/cv2.cpp:1175:41: error: ‘ArgInfo::ArgInfo(const ArgInfo&)’ is private within this context                                                                                   
     return pyopencvVecConverter<_Tp>::to(obj, value, info);                                                                                                                                                
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~                                                                                                                                                 
/app/opencv/modules/python/src2/cv2.cpp:55:5: note: declared private here                                                                                                                                   
     ArgInfo(const ArgInfo&) = delete;                                                                                                                                                                      
     ^~~~~~~                                                                                                                                                                                                
/app/opencv/modules/python/src2/cv2.cpp:1175:41: error: use of deleted function ‘ArgInfo::ArgInfo(const ArgInfo&)’                                                                                          
     return pyopencvVecConverter<_Tp>::to(obj, value, info);                                                                                                                                                
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~                                                                                                                                                 
/app/opencv/modules/python/src2/cv2.cpp:55:5: note: declared here                                                                                                                                           
     ArgInfo(const ArgInfo&) = delete;                                                                                                                                                                      
     ^~~~~~~                                                                                                                                                                                                
In file included from /app/opencv/build/modules/python_bindings_generator/pyopencv_custom_headers.h:10:0,                                                                                                   
                 from /app/opencv/modules/python/src2/cv2.cpp:1625:                                                                                                                                         
/app/opencv_contrib-4.1.2/modules/line_descriptor/misc/python/pyopencv_LSDDetector.hpp:5:17: note:   initializing argument 3 of ‘static bool pyopencvVecConverter<cv::line_descriptor::KeyLine>::to(PyObjec\
t*, std::vector<cv::line_descriptor::KeyLine>&, ArgInfo)’                                                                                                                                                   
     static bool to(PyObject* obj, std::vector<line_descriptor::KeyLine>& value, const ArgInfo info)                                                                                                        
                 ^~                                                                                                                                                                                         
/app/opencv/modules/python/src2/cv2.cpp: In instantiation of ‘bool pyopencv_to(PyObject*, std::vector<_Tp>&, const ArgInfo&) [with _Tp = cv::Ptr<cv::linemod::Modality>; PyObject = _object]’:              
/app/opencv/build/modules/python_bindings_generator/pyopencv_generated_types_content.h:53236:75:   required from here                                                                                       
/app/opencv/modules/python/src2/cv2.cpp:1175:41: error: ‘ArgInfo::ArgInfo(const ArgInfo&)’ is private within this context                                                                                   
     return pyopencvVecConverter<_Tp>::to(obj, value, info);                                                                                                                                                
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~                                                                                                                                                 
/app/opencv/modules/python/src2/cv2.cpp:55:5: note: declared private here                                                                                                                                   
     ArgInfo(const ArgInfo&) = delete;                                                                                                                                                                      
     ^~~~~~~                                                                                                                                                                                                
/app/opencv/modules/python/src2/cv2.cpp:1175:41: error: use of deleted function ‘ArgInfo::ArgInfo(const ArgInfo&)’                                                                                          
     return pyopencvVecConverter<_Tp>::to(obj, value, info);                                                                                                                                                
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~                                                                                                                                                 
/app/opencv/modules/python/src2/cv2.cpp:55:5: note: declared here                                                                                                                                           
     ArgInfo(const ArgInfo&) = delete;                                                                                                                                                                      
     ^~~~~~~                                                                                                                                                                                                
In file included from /app/opencv/build/modules/python_bindings_generator/pyopencv_custom_headers.h:14:0,                                                                                                   
                 from /app/opencv/modules/python/src2/cv2.cpp:1625:            
...

Have you ever seen this error before? Thanks!

BouweCeunen commented 4 years ago

I know that I've encountered strange compile issues when the storage space was running low, maybe you can try to clear some disk space. It sometimes behaves very strangely at compiling. Will try to reproduce it myself.

yuanzhedong commented 4 years ago

Thanks for the reply! I endup using this scripts to compile opencv 4.1.1. Just want to check is there any specific reason you're using the opencv from https://github.com/YashasSamaga/opencv/tree/cuda4dnn-csl-low ?

BouweCeunen commented 4 years ago

I was playing around with OpenCV and CUDA/cuDNN functionalities, it is not needed anymore. I removed it from the Dockerfile and README.