After unpackaging of Challenger Kit and designing the initial database for data communication, the present blog post will show my recent step in this project. Thus, in this short post, I will install some softwares  (OS and OpenCV + Python) to the raspberry pi. In other words, my current step area is same with previous blog post shown below,

Figure 1. Current state of development (Raspberry PI OS/Softwares Installation)

 

Installation OS and SSH/VNC

Since the latest OS raspberry is Strecth (https://www.raspberrypi.org/downloads/raspbian/ ) so that I will use this OS for my project.

- OS Raspbian Stretch, IP Configuration and VNC

For simplicity, I follow the installation instruction as this link as follows:

1. Downloading Raspbian OS Stretch

2. Copying it to the SD card with Win32DiskImager

3. Enabling SSH connection with make SSH file in the installation folder

4. Scanning the IP address of raspberry using Advanced IP Scanner

Figure 2. Searching Raspi IP address using Advanced IP Scanner

 

5. Connecting by SSH with user: pi, password: raspberry

6. Change the IP address to be static with command shell

$ sudo nano /etc/dhcpcd.conf

and add line as below:

interface enxb827ebdc0d1f

static ip_address=192.168.1.15/24

static routers=192.168.1.1

static domain_name_servers=192.168.1.1

    Then we can register our wireless network by

$ sudo nano  /etc/wpa_supplicant/wpa_supplicant.conf

and add lines as below,

    network={

    ssid="my-network-name"

    psk="my-network-pass"

    key_mgmt=WPA-PSK

    }

 

7. Enabling the built-in VNC with going to raspberry config by

$ sudo raspi-config

 

8. Installing the VNC viewer to our laptop/desktop computer

9. The connection with both SSH and graphical VNC now can be accessed (for me this headless connection is more convenient)

Figure 3. Accessing Raspberry Pi using SSH

Figure 4. Accessing Raspberry Pi using VNC viewer

 

Installation  OpenCV 3.3.0 and  Python 2.7/3.0

Actually, the installation steps I used in this project following from internet resources such as https://www.pyimagesearch.com/2017/09/04/raspbian-stretch-install-opencv-3-python-on-your-raspberry-pi/  and PkLab - Install OpenCV 3.2 Python/C++ on Raspberry PI . Generally, the steps are as follows,

 

- Remove unnecessary programs such as Wolfram and Libre Office,

$ sudo apt-get purge wolfram-engine
$ sudo apt-get purge libreoffice*
$ sudo apt-get clean
$ sudo apt-get autoremove

 

- Remove existing OpenCV old version by

$ sudo apt-get remove libopencv*
$ sudo apt-get autoremove

 

- Update and Upgrade the  raspberry system

$ sudo apt-get update 
$ sudo apt-get upgrade
$ sudo rpi-update
$ sud reboot

 

- Install developer tools

$ sudo apt-get install build-essential cmake pkg-config

 

- Install I/O image and video packages

$ sudo apt-get install \
  libjpeg-dev \
  libtiff5-dev \
  libjasper-dev \
  libpng12-dev \
  libavcodec-dev \
  libavformat-dev \
  libswscale-dev \
  libeigen3-dev \
  libxvidcore-dev \
  libx264-dev \
  libgtk2.0-dev

 

- Install camera live view

$ sudo apt-get install libv4l-dev

 

- Install GTK development library

$ sudo apt-get install libgtk2.0-dev libgtk-3-dev

 

- Install extra dependencies for computing

$ sudo apt-get install libatlas-base-dev gfortran

 

- Install python

$ sudo apt-get install python2.7-dev python3-dev

 

- Grab the OpenCV file

$ cd ~
$ wget -O opencv.zip https://github.com/Itseez/opencv/archive/3.3.0.zip
$ unzip opencv.zip

 

- Add more OpenCV3 repository

$ wget -O opencv_contrib.zip https://github.com/Itseez/opencv_contrib/archive/3.3.0.zip
$ unzip opencv_contrib.zip

 

- Install python package manager

$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
$ sudo python3 get-pip.py

 

- Install numpy

$ pip install numpy

 

- Build OpenCV using 3 cores of Rasberry Pi processor

$ make -j3

 

- Install OpenCV

$ sudo make install
$ sudo ldconfig

 

Now, we are in the step of testing the installation by accessing the camera by python codes before developing the blobing technique and algorithm for detection and recognition of the main ingredient stock.

 

Closing Remarks

We have described our progress in this project including installing some software. The next stage after testing the installation and building hardware is the development of quantity scheduling algorithm based on the blob detection and recognition which will be followed by the development of communication messaging (Yowsup). Hopefully, our project can run well.