Hello, it's James from XRobots here ( https://www.youtube.com/user/jamesbruton ) !
I've been aware of Myrobotlab for a while but never tried it until now - I didn't realise how versatile it was!. So I'd like to use it for some projects in my YouTube channel which need speech and vision recognition and integrate with Arduino - so it's ideal right?!
On Windows I have no problem making eveything work, I can run the Jar file and access my webcam with the OpenCV capture, use facial recognition and all the fiters. I've dabbled with the Arduino MRL code and all that works.
However I really want to make some mobile robot appliocations using Raspberry Pi. So again I have most of it working with an Arduino and it all looks good running on a Rasp Pi 3B+ with Raspbian Stretch with Desktop.
However I'm having some issues with the cameras. I have both the official Pi cam and another USB webcam. I have done the following:
-Installed the Pi cam and verified it works with the command 'raspistill'
-Installed UV4L and made the Pi cam into a webcam I can browse to from anywhere on the network. This also means I can access the MJPEG stream in Myrobotlab running on the Pi using this method: http://myrobotlab.org/content/pi-camera-streaming-uv4l-pc-mrl
-I can run the filters like facial recognition using he MJPEG stream, but it drops to about 2fps using this method and it's really laggy. But this means that openCV is working right - because otherwise it wouldn't be able to do image processing?
-However I can't get 'openCV capture' to work in the same way it does on Windows, even though UV4L makes the Pi cam apear as /dev/video0 ( and the second USB camera as /dev/video1 ) I cannot get any of the other input methods to see the camera, either as a file at those locations or just as 'camera 0' etc.
-So I spent a day following this guide: http://myrobotlab.org/content/raspberry-pi-pi-camera-opencv-310-mrl - which says I need to compile openCV separately, which takes a few hours and fails with the same errors that are mentioned. The last one I can't fix is this: https://raspberrypi.stackexchange.com/questions/42283/cant-compile-open… - The fix doesn't seem to actually fix it now, but who knows what else has changed in the last year...
However I don't really understand why I need compile and install openCV separately to make the capture work, since it's the same actual Jar file and source that I used on Windows and that just worked. Why would I need to install openCV and add Python 'import' support for openCV when Myrobotlab is written in Java anyway?. Also I know that the actual openCV processing algorithms work fine on the Pi since they work with the Pi cam using the MJPEG stream!
All I really want is direct camera access on the Pi instead of working around it and using the MJPEG stream. From other posts it looks like 'openCV capture' is quicker and it'll do processing at around 9/10 fps.
Can someone tell me how this actually hangs together please?