Showing posts with label raspberry pi. Show all posts
Showing posts with label raspberry pi. Show all posts

Thursday, 29 September 2016

Installing NodeJS on Raspberry PI

Things you will need:


1- Putty(SSH Client)
2- Internet connectivity on your pi

1- Update and install all the essential files needed for the build

sudo apt-get update
---wait for the update to finish


sudo curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
sudo apt-get install -y nodejs

To confirm the installation enter following

node -v

I have a different version


2- Install the RPI-GPIO to access the Raspberry pins via nodejs

sudo npm install rpi-gpio


Sunday, 21 August 2016

Installing OpenCV on Raspberry Pi

OpenCV is one of the most powerful libraries for image processing, providing many functions such as facial recognition to object detection and many more check here . In Order to use it with your raspberry pi you need to follow some steps to enable your py script to use it.

Things you will need:

1- Putty(SSH Client)
2- Internet connectivity on your pi

STEPS TO INSTALL:

1- Expand memory

Log in with your pi account through SSH (username=pi , password=raspberry)by default,

Enter  

sudo raspi-config


Expand Filesystem and press Enter , finish then reboot your pi by entering the following command

sudo reboot



2- Update and install all the essential files needed for the build


sudo apt-get update
---wait for the update to finish


sudo apt-get install build-essential cmake pkg-config python-dev libgtk2.0-dev libgtk2.0 zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libjasper-dev libavcodec-dev swig unzip
sudo apt-get install libopencv-dev python-opencv python-dev


3- Download the opencv zip file from server


wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.9/opencv-2.4.9.zip

unzip opencv-2.4.9.zip
---unzips the compressed file

4- Installing OpenCV



cd opencv-2.4.9
---changes directory to the location where opencv is downloaded


cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_PERF_TESTS=OFF -DBUILD_opencv_gpu=OFF -DBUILD_opencv_ocl=OFF
---After the completion of above step

Enter 


make
---This process is a little time consuming

After this Enter

sudo make install
---This final step will install the opencv

If the installation was successful the following command will show the current installed version of OpenCV


pkg-config --modversion opencv 



















Happy coding ;)