I recently bought a nc stick and I am running into an error while trying to run the example apps. Specifically, the genderagelbp.
I am receiving the following error:
cp gendernet.graph gendergraph/graph;\n cp agenet.graph agegraph/graph;\n ./compile.sh;\n no videoio library\n Created cpp/genderagelbp executable\n making run age cd cpp; ./gender_age_lbp age; cd ..; MVNC device 0 name: 2 Successfully opened MVNC device2 Num of NCS connected: 1 Successfully Allocated Age graph for MVNC device OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /build/opencv-SviWsf/opencv-18.104.22.168+dfsg/modules/highgui/src/window.cpp, line 269 terminate called after throwing an instance of 'cv::Exception' what(): /build/opencv-SviWsf/opencv-22.214.171.124+dfsg/modules/highgui/src/window.cpp:269: error: (-215) size.width>0 && size.height>0 in function imshow Aborted (core dumped)
Running Ubuntu 16.04 on virtual box.
Any help appreciated.
@leeroy It seems that maybe you do not have a USB/web camera connected. This example uses a webcam for live inference so please make sure you have a web camera or usb camera connected and try again. By default, the camera source is set to device 0, you can try adjusting this value to 1 if 0 does not work for you.
@Tome_at_Intel Hi, I encounter the same issue even after running it by replacing define CAM_SOURCE by a 1 instead of 0. trying to find out if it is not coming from the cpp videocapture function but I'm not a cpp user. Any idea?
By the way the prototype is running very well on a computer, this issue is really raspberry pi related.
@leeroy Hi, don't know if you figured out how to handle this but in case here is what I've found.
It looks like the error comes from opencv installation. I managed to get rid of it by reinstalling opencv following this tutorial.
@Tome_at_Intel On an other hand, I managed to run the entire make all and make run for the gender_ager example on the raspberry pi but I have the following issue:
After Successfully Allocated both Gender and Age grahs, I have a quick display of the camera and then the script stopped saying : "Segmentation fault".
Maybe you have an idea of where it comes from ?
@malonzo Can you try recloning the ncappzoo from the githuub repo and try again? There was an issue with the gender_age_lbp app, but a fix was added. I can confirm that it works on my Pi.
Great timing on my part as i've just got the spare time to return to this problem. That seems a very complex way to install openCV. Although the openCV version i previously installed was an older version as instructed by pyimagesearch. I will try a fresh install on my pi today and see how things go.
Thanks for the help guys,
I've the same issue with the last version of the appzoo (ncsdk2 branch). Actually Opencv is waiting for a camera plugged in an usb port and so don't consider the piCamera. You can easily simulate an usb camera with the piCamera by running
sudo modprobe bcm2835_v4l2
before launching gender_age_lbp