当前位置: 代码迷 >> 综合 >> 嵌入式实践教程--opencv4 jetson编译mjpg-streamer
  详细解决方案

嵌入式实践教程--opencv4 jetson编译mjpg-streamer

热度:23   发布时间:2023-12-11 15:28:44.0

/usr/local/bin/mjpg_streamer -i “/usr/local/lib/mjpg-streamer/input_uvc.so -n -f 10 -r 1280x720” -o “/usr/local/lib/mjpg-streamer/output_http.so -p 8085 -w /usr/local/share/mjpg-streamer/www”
http://192.168.0.229:8085

错误

/home/lzm/mjpg-streamer-master/mjpg-streamer-experimental/plugins/input_opencv/filters/cvfilter_py/conversion.cpp: In member function ‘cv::UMatData* NumpyAllocator::allocate(int, const int*, int, void*, size_t*, int, cv::UMatUsageFlags) const’:
/home/lzm/mjpg-streamer-master/mjpg-streamer-experimental/plugins/input_opencv/filters/cvfilter_py/conversion.cpp:121:92: error: invalid conversion from ‘int’ to ‘cv::AccessFlag’ [-fpermissive]return stdAllocator->allocate(dims0, sizes, type, data, step, flags, usageFlags);^
In file included from /usr/include/opencv4/opencv2/core.hpp:59:0,from /usr/include/opencv4/opencv2/core/core.hpp:48,from /home/lzm/mjpg-streamer-master/mjpg-streamer-experimental/plugins/input_opencv/filters/cvfilter_py/conversion.h:5,from /home/lzm/mjpg-streamer-master/mjpg-streamer-experimental/plugins/input_opencv/filters/cvfilter_py/conversion.cpp:4:
/usr/include/opencv4/opencv2/core/mat.hpp:475:23: note:   initializing argument 6 of ‘virtual cv::UMatData* cv::MatAllocator::allocate(int, const int*, int, void*, size_t*, cv::AccessFlag, cv::UMatUsageFlags) const’virtual UMatData* allocate(int dims, const int* sizes, int type,^~~~~~~~
/home/lzm/mjpg-streamer-master/mjpg-streamer-experimental/plugins/input_opencv/filters/cvfilter_py/conversion.cpp: In member function ‘bool NumpyAllocator::allocate(cv::UMatData*, int, cv::UMatUsageFlags) const’:
/home/lzm/mjpg-streamer-master/mjpg-streamer-experimental/plugins/input_opencv/filters/cvfilter_py/conversion.cpp:146:65: error: invalid conversion from ‘int’ to ‘cv::AccessFlag’ [-fpermissive]return stdAllocator->allocate(u, accessFlags, usageFlags);^
In file included from /usr/include/opencv4/opencv2/core.hpp:59:0,from /usr/include/opencv4/opencv2/core/core.hpp:48,from /home/lzm/mjpg-streamer-master/mjpg-streamer-experimental/plugins/input_opencv/filters/cvfilter_py/conversion.h:5,from /home/lzm/mjpg-streamer-master/mjpg-streamer-experimental/plugins/input_opencv/filters/cvfilter_py/conversion.cpp:4:
/usr/include/opencv4/opencv2/core/mat.hpp:477:18: note:   initializing argument 2 of ‘virtual bool cv::MatAllocator::allocate(cv::UMatData*, cv::AccessFlag, cv::UMatUsageFlags) const’virtual bool allocate(UMatData* data, AccessFlag accessflags, UMatUsageFlags usageFlags) const = 0;^~~~~~~~
/home/lzm/mjpg-streamer-master/mjpg-streamer-experimental/plugins/input_opencv/filters/cvfilter_py/conversion.cpp: At global scope:
/home/lzm/mjpg-streamer-master/mjpg-streamer-experimental/plugins/input_opencv/filters/cvfilter_py/conversion.cpp:167:16: error: cannot declare variable ‘g_numpyAllocator’ to be of abstract type ‘NumpyAllocator’NumpyAllocator g_numpyAllocator;

已修正源码传送门:https://github.com/lzmlzm/mjpg-streamer

  相关解决方案