Created
March 16, 2019 14:46
-
-
Save johnnyferreiradev/7f42bdf28ca171cad836682c5e1f7f3c to your computer and use it in GitHub Desktop.
Filtro passa altas Laplaciano para processamento digital de imagens (Filtro 3x3). Este filtro depende de uma função de convolução genérica.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mat filtroLaplaciano(Mat img){ | |
float **Masc = (float **) malloc (3 *sizeof (float*)); | |
for(int i=0; i<3; i++){ | |
Masc[i] = (float *) malloc (3 *sizeof (float)); | |
} | |
Masc[0][0] = 0; Masc[0][1] = -1; Masc[0][2] = 0; | |
Masc[1][0] = -1; Masc[1][1] = 4; Masc[1][2] = -1; | |
Masc[2][0] = 0; Masc[2][1] = -1; Masc[2][2] = 0; | |
return convoluirGenerica(img, Masc, 3, 3); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment