Giter VIP home page Giter VIP logo

3d-computer-vision's Introduction

3D-Computer-Vision

OpenCV C++ code where I create 3D computer vision application modules. Repo contains calls that use basic as well as advanced openCV libraries. Modules could be further customized and/or cascaded to achieve complex 3D computer vision purposes.

Usage

In order to run any of the files you will have the file_name listed as a target in the Makefile. check the Makefile for dependencies and make sure all libraries are installed and are in the right place.

What I learned

Installation of OpenCV

OpenCV is a bit complex to install due to its numerous dependencies and the vast possible flags/switches that can be enabled/disabled at installation time. My recommendation in reference to installation of OpenCV is accessible in a comment, here.

Steps to building dynamic library (shared object .so)

Shared objects are dynamic libraries. They get linked to programs at runtime hence the term "dynamic linking". To build a shared object from cpp files follow the following procedure:

gcc -c function1.c function2.c -fpic    //Produces object files function1.o and function2.o
gcc function1.o function2.o -shared -o lib_calc.so    //Creates the shared library lib_calc.so
gcc -c main.c -o main.o    //Compiles main.c and outputs main.o
gcc -o output main.o -L. -l_calc    //Links main.o with the shared library

The final executable of main (i.e. the file named output in the last command) is linked with the library lib_calc.so. To check the dependencies of the file output

ldd output    //Shows dynamic dependency of the file output

Note that the loader must see lib_calc.so in /usr/lib. Alternatively, the loader path that contains lib_calc.so must be added to LD_LIBRARY_PATH, in a terminal do this:

export LD_LIBRARY_PATH=:/dir/where/lib_calc.so/exists
echo $LD_LIBRARY_PATH

Steps to building static library (.a)

source code file .c -> |compiler| -> object file .o + library -> |linker| -> executable code Linker makes available of library functions at runtime. Library function code doesn't execute (can't be executable) normally because it contains no main()

gcc -c lib_add.c -o lib_add.o
gcc -c lib_sub.c -o lib_sub.o
ar rcs lib_calc.a lib_add.o lib_sub.o    //Creates static library lib_calc.a
gcc -o main.c main.o -L. lib_calc.a

Solving 3D computer vision problems

For example, camera calibrarion, estimating fundamental matrix from essential matrix, uncalibrated stereo.

3d-computer-vision's People

Contributors

sherif-elshafei avatar

Watchers

 avatar Kostas Georgiou avatar

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.