andrewssobral / bgslibrary

A C++ Background Subtraction Library with wrappers for Python, MATLAB, Java and GUI on QT
MIT License
2.19k stars 743 forks source link

error running ./run_camera.sh #71

Closed guatnutz closed 7 years ago

guatnutz commented 7 years ago

It looks like I was able to compile bgslibrary without it ending with an error.

When I run ./run_camera.sh from its default location with sudo or un-elevated I receive the following error.

Background Subtraction Library v2.0.0     
http://code.google.com/p/bgslibrary       
by:                                       
Andrews Sobral (andrewssobral@gmail.com)  
-----------------------------------------
Using OpenCV version 3.1.0
VideoAnalysis()
use_file:    0
filename:    
use_camera:  1
cameraIndex: 0
use_comp:    0
frameToStop: 0
imgref:      
VideoCapture()
FrameProcessor()
PreProcessor()
FrameDifference()
Camera index:0
Cannot initialize webcam!

Frame is not ready
Enter to continue...

I am using a virtualenv, but I've tried running it both ways and it yields the same results. I know the camera is working, it runs fine when I'm using cv2/picamera. Also, regardless of what the above output states I am running the version of code downloaded from github and not googlecode. Also, the other demo scripts seems to run without error.

guatnutz commented 7 years ago

... Now I'm getting this error...

Background Subtraction Library v2.0.0     
http://code.google.com/p/bgslibrary       
by:                                       
Andrews Sobral (andrewssobral@gmail.com)  
-----------------------------------------
Using OpenCV version 3.1.0
VideoAnalysis()
use_file:    0
filename:    
use_camera:  1
cameraIndex: 0
use_comp:    0
frameToStop: 0
imgref:      
VideoCapture()
FrameProcessor()
OpenCV Error: Null pointer (Invalid pointer to file storage) in cvWriteString, file /home/pi/opencv-3.1.0/modules/core/src/persistence.cpp, line 2965
std::exception:/home/pi/opencv-3.1.0/modules/core/src/persistence.cpp:2965: error: (-27) Invalid pointer to file storage in function cvWriteString
guatnutz commented 7 years ago

Ignore last post it's OE