Giter VIP home page Giter VIP logo

iscanner's People

Contributors

jeff1evesque avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

iscanner's Issues

Install, and setup Vagrant VM

Since we intend to develop non-UI logic with C++ (Objective-C for front-end), we will develop within a linux virtual machine. This will allow us to separate dependencies from different projects, and easier to deploy in a minimalistic fashion (not installing unneeded packages). Specifically, we will install, and setup Vagrant.

Note: this issue corresponds to jeff1evesque/machine-learning#1393.

Install C++ 'gcc' compiler

We need to install the C++ gcc compiler:

sudo apt-get install g++

Note: we will use C++ for non-UI code, which will allow a majority of the code base to have the possibility of being reused for android based devices.

Create 'vagrantfile'

We will create an implementation of vagrant, therefore, create a vagrantfile.

Install OpenCV

To install OpenCV, we need the following:

Install dependencies

sudo apt-get -y install libopencv-dev build-essential cmake git libgtk2.0-dev pkg-config python-dev python-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libtiff4-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev libqt4-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils unzip

Download OpenCV

mkdir opencv
cd opencv
wget https://github.com/Itseez/opencv/archive/3.0.0-beta.zip -O opencv-3.0.0-beta.zip
unzip opencv-3.0.0-beta.zip

Install OpenCV

cd opencv-3.0.0-beta
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
make -j $(nproc)
sudo make install

System Update: to get OpenCV working properly, we need to tell Ubuntu.

sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig

Add '.exe' files to '.gitignore'

Our C++ compiler will compile files into executable files with the .exe file extension. We will ignore all executable files in the main application directory.

Move 'manifests/' directory into 'puppet/'

We will create a puppet/ directory, and move the manifests/ directory into it. Then, we need to adjust the Vagrantfile, respectively.

Note: we will implement the following directory structure:

  • Vagrantfile
  • puppet
    • manifests
      • install_opencv.pp
    • modules
      • jenkins
  • README.md
  • detector.cpp

Install git via Vagrant-Puppet 'default.pp'

We need to install the git package within default.pp:

package {'git': ensure => present, }

which will be responsible for installing git. This file will need to be referenced within the vagrantfile as follows:

Vagrant.configure("2") do |config|
...
  config.vm.provision "puppet" do |puppet|
    puppet.manifests_path = "/manifests"
    puppet.manifest_file = "default.pp"
  end
...
end

Note: by default, the entry point is site.pp for a simple puppet implementation. However, when implementing puppet within vagrant, the entry point can be explicitly defined (as above).

Create wiki on 'C++'

We need to discuss the following about the gcc compiler:

  • g++ treats everything as c++ even when the extensions suggest c code (unless told otherwise), and link c++ standard libraries automatically. gcc treats everything according to known extensions (unless told otherwise) and does not automatically link c++ standard libraries.
  • using the -o flag to specify output file name:
    • g++ -o detector.exe detector.cpp pkg-config --cflags --libs opencv
  • run executable
    • CMD shell: simply run detector
    • Bash (or Bourne) shell: simply run ./detector
  • usage for pkg-config while compiling.
    • pkg-config --cflags opencv prints the list of arguments needed to allow the compiler to find the header files, and make necessary links to OpenCV
    • pkg-config --libs opencv prints the commands needed for linking
    • The following are equivalent:
      • g++ -o detector.exe detector.cpp``pkg-config --cflags --libs opencv
      • g++ -o detector.exe detector.cpp $(pkg-config --cflags --libs opencv)

Define 'Overview' in 'README.md'

We will describe the intention of using C++ for the back-end logic, is to allow the capacity to reuse code, perhaps for android based devices. For iOS devices, Obj-C would need to be used to develop the user-interface, while for android devices, the backend logic could be extended with additional C++, unless Java is preferred. However, the latter (android topic) is not a concern for this repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.