README.md 2.11 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Usefull tools
=============

Check temperature : `vcgencmd measure_temp`

Check the frequency: `sudo cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq`

Python 3.7
==========

```
sudo apt-get install build-essential libc6-dev
sudo apt-get install libncurses5-dev libncursesw5-dev libreadline6-dev
sudo apt-get install libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev
sudo apt-get install libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev

wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
tar -zxvf Python-3.7.0.tgz
cd Python-3.7.0
./configure       # 3 min 13 s
# Let's use 4 threads
make -j4          # 8 min 29 s
sudo make install # ~ 4 min
cd ..
sudo rm -fr ./Python-3.7.0*
# upgrade:
sudo pip3 install -U pip
sudo pip3 install -U setuptools
```   

Arnaud Blanchard's avatar
Arnaud Blanchard committed
31 32 33 34 35 36
Setup the raspberry has an access point
=======================================

More details here in the original tuatorial ( https://github.com/SurferTim/documentation/blob/6bc583965254fa292a470990c40b145f553f6b34/configuration/wireless/access-point.md )


Arnaud Blanchard's avatar
Arnaud Blanchard committed
37 38
Video tracking
==============
Arnaud Blanchard's avatar
Arnaud Blanchard committed
39

Arnaud Blanchard's avatar
Arnaud Blanchard committed
40 41
Activating video
----------------
Arnaud Blanchard's avatar
Arnaud Blanchard committed
42 43 44 45

    sudo modprobe bcm2835-V4l2 
    v4l2-ctl --set-fmt-video=pixelformat=UYVY,width=64,height=64

Arnaud Blanchard's avatar
Arnaud Blanchard committed
46
Sometime it needs reboot
Arnaud Blanchard's avatar
Arnaud Blanchard committed
47 48

    i_v4l2_camera -o/img | f_raspinobo_object -o/object -u0 -U70 -v110 -V160 
Arnaud Blanchard's avatar
Arnaud Blanchard committed
49

Arnaud Blanchard's avatar
Arnaud Blanchard committed
50
A blc channel **/pinobo.coord** is created with the center of gravity of the color `<x uchar><y uchar>`.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
51
The thresholds for the color in YUV format is: u for U min, U for U max, v for V min and V for V max.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
52
You can use the parameter `-p/color` to have a blc_channel `/color` where you can dynamicaly change the threholds of the color.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
53 54 55
**/object** is the image of the object where each pixel is set to 255 if the color is in the selected range. 
It is used for debug.

Arnaud Blanchard's avatar
Arnaud Blanchard committed
56
Activate the head (the target /pinobo.coord is updated by f_raspinobo_object )
Arnaud Blanchard's avatar
Arnaud Blanchard committed
57
    ./run.sh raspinobo -T/pinobo.coord
Arnaud Blanchard's avatar
Arnaud Blanchard committed
58
    
Arnaud Blanchard's avatar
Arnaud Blanchard committed
59 60
Display the image
-----------------
Arnaud Blanchard's avatar
Arnaud Blanchard committed
61 62 63 64 65 66 67

    o_gtk_image /img
    
Display the detected object
---------------------------

    o_gtk_image /object
Arnaud Blanchard's avatar
Arnaud Blanchard committed
68
    
Arnaud Blanchard's avatar
Arnaud Blanchard committed
69
- [Illustration sacades caméléon](https://www.facebook.com/100024954756073/videos/492851038223384/?t=0)
Arnaud Blanchard's avatar
Arnaud Blanchard committed
70