Linux, OpenCV, Programming, Raspberry Pi

OpenCV 3.4.3 + Raspberry Pi 3B+

Follow these steps to install OpenCV 3.4.3 on a Raspberry Pi 3B+:

1) Install these dependencies:

$ sudo apt-get install build-essential cmake pkg-config
$ sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
$ sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
$ sudo apt-get install libxvidcore-dev libx264-dev
$ sudo apt-get install libgtk2.0-dev libgtk-3-dev
$ sudo apt-get install libatlas-base-dev gfortran
$ sudo apt-get install python2.7-dev python3-dev

2) Get OpenCV

$ wget https://github.com/opencv/opencv/archive/3.4.3.zip
$ unzip 3.4.3.zip
$ rm 3.4.3.zip
$ wget https://github.com/opencv/opencv_contrib/archive/3.4.3.zip
$ unzip 3.4.3.zip

3) Build & Install OpenCV
NOTE 1: In the cmake line there is a path to the opencv_contrib modules folder, please replace this path with the correct one for your system.

NOTE 2: The make step will take like 8-10 hours and it will crash several times due to low virtual memory. Luckily it can resume from where it crashes so I kept repeating the make command until it finished.

sudo apt-get install python-pip
pip install numpy
$ cd ~/opencv-3.4.3/
$ mkdir build
$ cd build
$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_PYTHON_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=/home/pi/Desktop/OpenCV/opencv_contrib-3.4.3/modules -D BUILD_EXAMPLES=ON ..
$ make -j4
$ sudo make install
$ sudo ldconfig

4) Confirm OpenCV installation

$ python
>>> import cv2
>>> cv2.__version__
'3.4.3'

5) Voila!

Advertisements
Kali Linux, Linux, Tech

Wireshark on Kali Linux 2008

If you encounter this issue running Wireshark on Kali Linux:

Capture

Perform the following:

  1. Edit /usr/share/wireshark/init.lua with your favourite editor
  2. Find the line (near the top) which has “disable_lua = false”
  3. Change it to “disable_lua = true”
  4. Save and close the editor
  5. Voila 🙂
Linux, Programming, Ubuntu

ISE 14.7 + Mojo V3

I wanted to play with FPGAs so I bought a Mojo V3 board (https://embeddedmicro.com/products/mojo-v3). (FYI I got cheaper from another site). To use this board you need the Xilinx ISE software which is available for free. Xilinx provides two methods:
1) Download a pre built VM with the ISE software already installed
2) Download the install files and do it your self.

The obvious choice I thought would be option 1. I download the VM from here (https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/design-tools/14_7-windows.html).

Here’s my quick review of the VM:

  • It uses Oracle Linux 6.4 running Kernel 2.6-32.358 which can’t interface with the Mojo
  • Despite my best efforts I couldn’t change enough settings to make it interface with the Mojo V3. Oracle Linux kept loading the Mojo as ttyUSB0 instead of ttyACM0, and I couldn’t change that.

After that experience I decided to build my own VM but this time use Ubuntu as the base system. I used Ubuntu 16.04 and everything worked beautifully!

Linux

Docker CE on Linux Mint 18.1

Here are the instructions to installing Docker CE on Linux Mint 18.1 Serena.

sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

The following line in the SOURCE automatically determines the distribution, which is Serena, but there are no Linux Mint packages for Docker. You have to change it to the matching Ubuntu distribution. FYI Linux Mint Serena is based on Ubuntu 16.04 Xenial.

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce

Test the Docker install with this command. It will automatically download the hello-world image and run it.

sudo docker run hello-world

SOURCE: https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository

Linux

Ubuntu 16.04 Argghh!

I have a simple request, put the minimize, maximize and close buttons on the right hand of the window. Guess what? Canonical have completely disabled the ability to do that. Argghh! For that reason I refuse to use Ubuntu. Linux is meant to be open and customizable! I’m looking for something else…I’m going to try Linux Mint 🙂