Footfall icon indicating copy to clipboard operation
Footfall copied to clipboard

Compiling on Raspberry Pi 4 - Stuck with OpenCV 3.2.0

Open klode82 opened this issue 5 years ago • 2 comments

I have a Raspberry Pi 4, and I'm trying to use this package on this device. However, there are some errors during compiling. The problem is OpenCV, where the package need to be 2.4.9, but here we have 3.2.0, and actually OpenCV is on 4.1.1.

So, I've encountered problem on CameraManager.cpp, where some methods on cv::BackgroundSubtractorMOG2 are not present, rather than 2.4.9:

/home/pi/src/openFramework/apps/Footfall/Footfall/src/CameraManager.cpp:44:16: error: ‘class cv::BackgroundSubtractorMOG2’ has no member named ‘setDouble’
     pMOG2->setDouble("fTau", _cameraConfig.shadowPixelRatio);
            ^~~~~~~~~
/home/pi/src/openFramework/apps/Footfall/Footfall/src/CameraManager.cpp: In member function ‘void CameraManager::update()’:
/home/pi/src/openFramework/apps/Footfall/Footfall/src/CameraManager.cpp:105:20: error: ‘class cv::BackgroundSubtractorMOG2’ has no member named ‘operator()’
pMOG2->operator()(combinedMask,processedMog);
                ^
/home/pi/src/openFramework/apps/Footfall/Footfall/src/CameraManager.cpp:110:20: error: ‘class cv::BackgroundSubtractorMOG2’ has no member named ‘operator()’
pMOG2->operator()(videoMatrix,processedMog);

I have substitute setDoube with setShadowThreshold, and operator() with apply(). But this has generate other errors:

/usr/include/opencv2/core/mat.inl.hpp:1204:6: note:   no known conversion for argument 1 from ‘CvMat*’ to ‘cv::Mat&&’ 
/home/pi/src/openFramework/apps/Footfall/Footfall/src/CameraManager.cpp:25:92: error: no match for ‘operator=’ (operand types are ‘cv::Mat’ and ‘CvMat*’)
combinedMask = cvCreateMat(_cameraConfig.cameraheight, _cameraConfig.camerawidth, CV_8UC1);

what's next? How can I made Footfall works on Raspberry Pi 4?

Thanks in advantage.

klode82 avatar Sep 11 '20 17:09 klode82

Did you ever get this working?

26tajeen avatar Nov 07 '20 21:11 26tajeen