#include <Kernel.hpp>
Dérivée par Millie::KernelGaussian, Millie::KernelLaplace, Millie::KernelMDIF, Millie::KernelMediumSmooth, Millie::KernelPrewittHorizontal, Millie::KernelPrewittVertical, Millie::KernelSobelHorizontal, et Millie::KernelSobelVertical.
Graphe d'héritage de Millie::Kernel:


Fonctions membres publiques | |
| Kernel (int taillex, int tailley, int originex, int originey, const float *data) | |
| Construit un noyau. | |
| Kernel (int taillex, int tailley, int originex, int originey, const float *datax, const float *datay) | |
| Définie un noyau séparable. | |
| virtual | ~Kernel () |
| Destructeur. | |
| Kernel (const Kernel &k) | |
| Constructeur par recopie. | |
| Kernel & | operator= (Kernel &origine) |
| int | getXOrigin () const |
| int | getYOrigin () const |
| Permet de récuperer l'origine verticale. | |
| int | getWidth () const |
| Recupère la largeur. | |
| int | getHeight () const |
| Recupère la hauteur. | |
| virtual float | operator() (int x, int y) const |
| permet de lire un élément du noyau | |
| int | getTopPadding () const |
| permet de lire le padding supérieur | |
| int | getBottomPadding () const |
| permet de lire le padding inférieur | |
| int | getLeftPadding () const |
| permet de lire le padding gauche | |
| int | getRightPadding () const |
| permet de lire le padding droite | |
Fonctions membres protégées | |
| bool | isSeparable () const |
| Kernel (int taillex, int tailley, int originex, int originey) | |
| virtual void | setValue (int x, int y, float value) |
| permet de modifier un élément du noyau | |
Attributs protégés | |
| bool | _isSeparable |
| DataBuffer< float > | _data |
| DataBuffer< float > | _dataX |
| DataBuffer< float > | _dataY |
| int | _originex |
| int | _originey |
| int | _largeur |
| int | _hauteur |
Typiquement, la classe peut s'utiliser comme suit :
Noyau : [0 -1 0]
[-1 -4 -1]
[0 -1 0]
float f[] = {0,-1,0,-1,4,-1,0,-1,0}; Kernel k(3, 3, 1, 1, f); int i1 = k(0,0); // retourne 0 int j1 = k.getLeftPadding() //retourne 1 //parcourt du noyau for(int j = 0; j< k.getHeight(); j++) for(int i=0; i < k.getWidth(); i++) ... = k(i,j);
Définition à la ligne 63 du fichier Kernel.hpp.
| Kernel::Kernel | ( | int | taillex, | |
| int | tailley, | |||
| int | originex, | |||
| int | originey | |||
| ) | [protected] |
Méthode interne pour les classes qui héritent pour permettre de ne pas définir immédiatement le noyau
Définition à la ligne 40 du fichier Kernel.cpp.
Références _data, _hauteur, _isSeparable, _largeur, _originex, _originey, getHeight(), Millie::DataBuffer< T >::getSize(), getWidth(), et Millie::DataBuffer< T >::resize().
| Kernel::Kernel | ( | int | taillex, | |
| int | tailley, | |||
| int | originex, | |||
| int | originey, | |||
| const float * | data | |||
| ) |
Construit un noyau.
| taillex | la largeur du noyau | |
| tailley | la hauteur du noyau | |
| originex | le centre horizontal du noyau | |
| originey | le centre vertical du noyau | |
| data | le tableau à une dimension contenant le noyau |
| Millie::NullPointer | si data == NULL | |
| Millie::IllegalArgument | si taillex ou tailley inférieur ou égale à 0 | |
| Millie::IllegalArgument | si originex=>taillex | |
| Millie::IllegalArgument | si originey=>tailley | |
| Millie::IllegalArgument | si originex<0 | |
| Millie::IllegalArgument | si originey<0 |
float f[] = {0,-1,0,-1,4,-1,0,-1,0}; Kernel k(3, 3, 1, 1, f);
[a, b, c]
[d, e, f]
[g, h, i]
float f[] = {a,b,c,d,e,f,g,h,i};
Définition à la ligne 63 du fichier Kernel.cpp.
Références _data, _hauteur, _isSeparable, _largeur, _originex, _originey, getHeight(), Millie::DataBuffer< T >::getSize(), getWidth(), et Millie::DataBuffer< T >::resize().
| Kernel::Kernel | ( | int | taillex, | |
| int | tailley, | |||
| int | originex, | |||
| int | originey, | |||
| const float * | datax, | |||
| const float * | datay | |||
| ) |
Définie un noyau séparable.
| taillex | la largeur du noyau | |
| tailley | la hauteur du noyau | |
| originex | le centre horizontal du noyau | |
| originey | le centre vertical du noyau | |
| datax | le noyau séparé pour l'horizontal | |
| datay | le noyau séparé pour l'horizontal |
| Millie::NullPointer | si datax==NULL | |
| Millie::NullPointer | si datay==NULL | |
| Millie::IllegalArgument | si taillex<=0 | |
| Millie::IllegalArgument | si tailley<=0 | |
| Millie::IllegalArgument | si originex=>taillex | |
| Millie::IllegalArgument | si originey=>tailley | |
| Millie::IllegalArgument | si originex<0 | |
| Millie::IllegalArgument | si originey<0 |
Définition à la ligne 88 du fichier Kernel.cpp.
Références _dataX, _dataY, _hauteur, _isSeparable, _largeur, _originex, _originey, getHeight(), Millie::DataBuffer< T >::getSize(), getWidth(), et Millie::DataBuffer< T >::resize().
| Kernel::~Kernel | ( | ) | [virtual] |
| Kernel::Kernel | ( | const Kernel & | k | ) |
Constructeur par recopie.
| k | le noyau à recopier |
Définition à la ligne 142 du fichier Kernel.cpp.
Références _data, _dataX, _dataY, _hauteur, _isSeparable, _largeur, _originex, _originey, getHeight(), getWidth(), getXOrigin(), getYOrigin(), et isSeparable().
| bool Kernel::isSeparable | ( | ) | const [protected] |
Méthode interne pour savoir si le noyau est séparable
Définition à la ligne 164 du fichier Kernel.cpp.
Références _isSeparable.
Référencé par Kernel(), operator()(), operator=(), et setValue().
| void Kernel::setValue | ( | int | x, | |
| int | y, | |||
| float | value | |||
| ) | [protected, virtual] |
permet de modifier un élément du noyau
| x | position horizontale (commence à 0) | |
| y | position verticale (commence à 0) |
Définition à la ligne 202 du fichier Kernel.cpp.
Références _data, getWidth(), et isSeparable().
Référencé par Millie::KernelGaussian::KernelGaussian().
Opérateur d'assignation, recopie l'ensemble des données
Définition à la ligne 117 du fichier Kernel.cpp.
Références _data, _dataX, _dataY, _isSeparable, _originex, _originey, getHeight(), getWidth(), getXOrigin(), getYOrigin(), et isSeparable().
| int Kernel::getXOrigin | ( | ) | const |
Permet de récuperer l'origine horizontale
Définition à la ligne 173 du fichier Kernel.cpp.
Références _originex.
Référencé par Millie::NagaoLocalOperator::computeLocalArea(), Millie::ErodeLocalOperator::computeLocalArea(), Millie::DilateLocalOperator::computeLocalArea(), Millie::ConvolveLocalOperator::computeLocalArea(), getLeftPadding(), getRightPadding(), Kernel(), et operator=().
| int Kernel::getYOrigin | ( | ) | const |
Permet de récuperer l'origine verticale.
Définition à la ligne 178 du fichier Kernel.cpp.
Références _originey.
Référencé par Millie::NagaoLocalOperator::computeLocalArea(), Millie::ErodeLocalOperator::computeLocalArea(), Millie::DilateLocalOperator::computeLocalArea(), Millie::ConvolveLocalOperator::computeLocalArea(), getBottomPadding(), getTopPadding(), Kernel(), et operator=().
| int Kernel::getWidth | ( | ) | const |
Recupère la largeur.
Définition à la ligne 183 du fichier Kernel.cpp.
Références _largeur.
Référencé par Millie::NagaoLocalOperator::computeLocalArea(), Millie::ErodeLocalOperator::computeLocalArea(), Millie::DilateLocalOperator::computeLocalArea(), Millie::ConvolveLocalOperator::ConvolveLocalOperator(), convolvePosition(), Millie::DilateLocalOperator::DilateLocalOperator(), Millie::ErodeLocalOperator::ErodeLocalOperator(), getRightPadding(), Kernel(), Millie::KernelGaussian::KernelGaussian(), operator()(), operator=(), et setValue().
| int Kernel::getHeight | ( | ) | const |
Recupère la hauteur.
Définition à la ligne 188 du fichier Kernel.cpp.
Références _hauteur.
Référencé par Millie::NagaoLocalOperator::computeLocalArea(), Millie::ErodeLocalOperator::computeLocalArea(), Millie::DilateLocalOperator::computeLocalArea(), Millie::ConvolveLocalOperator::ConvolveLocalOperator(), convolvePosition(), Millie::DilateLocalOperator::DilateLocalOperator(), Millie::ErodeLocalOperator::ErodeLocalOperator(), getBottomPadding(), Kernel(), Millie::KernelGaussian::KernelGaussian(), et operator=().
| float Kernel::operator() | ( | int | x, | |
| int | y | |||
| ) | const [virtual] |
permet de lire un élément du noyau
| x | position horizontale (commence à 0) | |
| y | position verticale (commence à 0) |
Définition à la ligne 194 du fichier Kernel.cpp.
Références _data, _dataX, _dataY, getWidth(), et isSeparable().
| int Kernel::getTopPadding | ( | ) | const |
permet de lire le padding supérieur
Définition à la ligne 211 du fichier Kernel.cpp.
Références getYOrigin().
| int Kernel::getBottomPadding | ( | ) | const |
permet de lire le padding inférieur
Définition à la ligne 216 du fichier Kernel.cpp.
Références getHeight(), et getYOrigin().
| int Kernel::getLeftPadding | ( | ) | const |
permet de lire le padding gauche
Définition à la ligne 221 du fichier Kernel.cpp.
Références getXOrigin().
| int Kernel::getRightPadding | ( | ) | const |
permet de lire le padding droite
Définition à la ligne 226 du fichier Kernel.cpp.
Références getWidth(), et getXOrigin().
bool Millie::Kernel::_isSeparable [protected] |
Indique si l'élément est séparable
Définition à la ligne 69 du fichier Kernel.hpp.
Référencé par isSeparable(), Kernel(), et operator=().
DataBuffer<float> Millie::Kernel::_data [protected] |
Tableau de noyau dans le cas où le noyau est non séparable
Définition à la ligne 74 du fichier Kernel.hpp.
Référencé par Kernel(), operator()(), operator=(), et setValue().
DataBuffer<float> Millie::Kernel::_dataX [protected] |
Tableau du noyau horizontale utilisé lorsque le noyau est séparable
Définition à la ligne 79 du fichier Kernel.hpp.
Référencé par Kernel(), operator()(), et operator=().
DataBuffer<float> Millie::Kernel::_dataY [protected] |
Tableau du noyau verticale utilisé lorsque le noyau est séparable
Définition à la ligne 84 du fichier Kernel.hpp.
Référencé par Kernel(), operator()(), et operator=().
int Millie::Kernel::_originex [protected] |
Permet d'enregistrer les données caractéristiques à l'origine horizontale du noyau
Définition à la ligne 90 du fichier Kernel.hpp.
Référencé par getXOrigin(), Kernel(), et operator=().
int Millie::Kernel::_originey [protected] |
Permet d'enregistrer les données caractéristiques à l'origine verticale du noyau
Définition à la ligne 96 du fichier Kernel.hpp.
Référencé par getYOrigin(), Kernel(), et operator=().
int Millie::Kernel::_largeur [protected] |
Permet d'enregistrer la largeur
Définition à la ligne 101 du fichier Kernel.hpp.
Référencé par getWidth(), et Kernel().
int Millie::Kernel::_hauteur [protected] |
Permet d'enregistrer la hauteur
Définition à la ligne 106 du fichier Kernel.hpp.
Référencé par getHeight(), et Kernel().
1.5.1