plateform: raspberry pi3 model B
storage: 32GB SD card
OS: ubuntuMATE for pi3
check have enough space
df -h
like mine 3.8G Available
/dev/root should have more than 2GB
if no see here to enlarge space
my environment base on duckietown-bunny image
here
https://hackmd.io/p/SJbHPc-p#/2
sudo apt-get install python3.5-dev
vl4
Check prerequisites (with sudo raspi-config):
in terminal type sudo raspi-config
install stuff for v4l
sudo apt-get -y install libv4l-dev v4l-utils
Enable the kernel module:
sudo modprobe bcm2835-v4l2
test module
v4l2-ctl --list-devices
you would see
I'm using ps3eye webcam
dowload .zip source here
I put opencv-3.3.0.zip.zip under /home/user/
unzip opencv-3.3.0.zip
config cmake with NEON,TBB, v4l enable
check no error with generation complete
then
make -j4
this step took about 40mins
(future may cross compile)
after make without error
sudo make install
opencv stuff would move to these path
mostly we utilize pkg-config to compile openCV code
configure OpenCV. open the opencv.conf file with the command
/usr/local/lib
This set the .so (dynamic link library) searching path.
it will search opencv___.so from the path
Remember we alread copy .so to /usr/local/lib when typing sudo make install in previous stage.
sudo ldconfig
now, edit ~/.bashrc
this would auto load terminal environment for pkg-config
add at the bottom
Horay! we've got opencv-3.3.0 on pi3!
Inside ~/opencv-3.3.0/samples/
have dnn sample
copy it to ~/
cd ~/opencv-3.3.0/samples/
cp -r dnn ~/
cd dnn
now build the examble with pkg-config
Now download data set(opencv-dl-data) and put your executable into correspondent folder
data set:
.caffemodel, .prototxt
https://drive.google.com/open?id=0BwY-lpO6tzxHVUZqN1pXc0xZdDQ
we are in dnn folder
inside ~/dnn/opencv-dl-data/ssd_mobilenet_object_detection/
connect your webcam to pi3 first run it
./ssd_mobilenet_object_detection -video=/dev/video0 -model=MobileNetSSD_train.caffemodel -proto=MobileNetSSD_300x300.prototxt
Have fun!
protobuf use for serialization
means to put parameter original store in hard disk in to memory
reference:
https://hackmd.io/s/S1gWq7BwW#
http://pklab.net/?id=392&lang=EN
sudo apt-get install ros-kinetic-perception
cv_bridge depends on opencv-3.2.0
https://github.com/ros-perception/vision_opencv/issues/162
make opencv run fast
https://www.slideshare.net/embeddedvision/making-opencv-code-run-fast-a-presentation-from-intel
opencv3.3.0 with deep learning
issue
https://hackmd.io/s/H1tfSqYv-#
opencv2.x opencv3.x mix
https://hackmd.io/EwVgxgnApghjYFoBsATMMEBYkEYMA5MQUEAGGUsYJAZimADMB2EIA===
opencv3.3.0
pi3