Coder Social home page Coder Social logo

cq-formation-convolution's Introduction

Convolution sur une image

Dans le fichier convolution.cpp, une image est d’abord chargée en mémoire-vive. Ensuite, le calcul de convolution a lieu à partir de la ligne 104.

Essentiellement, chaque nouveau pixel est calculé en fonction des pixels voisins impliqués par un noyau de convolution de taille (2*lHalfK+1) x (2*lHalfK+1). Pour générer les noyaux de convolution :

cd noyaux
source source.sh
make
cd -

Enfin, le nom d’un fichier d’image et le nom d’un fichier de noyau de convolution sont donnés en argument lors du lancement du programme. Par exemple :

./convolution exemple.png noyaux/flou_45

Un fichier MD5 est disponible pour la validation :

md5sum -c solutions/md5/exemple_flou_45.md5

Image Convolution

In the file convolution.cpp, an image is first loaded into memory and then, starting on line 104, its convolution is computed.

Essentially, each pixel of the new image is calculated as a function of the neighbouring pixels in the original image, with the number of neighbouring pixels used determined by the kernel of size (2*lHalfK+1) x (2*lHalfK+1). To generate the convolution kernels:

cd noyaux
source source.sh
make
cd -

Finally, the name of the image file and of the convolution kernel must be given as arguments of the binary when running the program. For example:

./convolution exemple.png noyaux/flou_45

An MD5 file is available for validation:

md5sum -c solutions/md5/exemple_flou_45.md5

cq-formation-convolution's People

Contributors

bartoldeman avatar ericgig avatar mboisson avatar plstonge 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.