This file contains 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
%Deve-se digitar na janela de comandos para funcionar: pkg load signal | |
clear all; | |
close all; | |
clc; | |
fs=1000; Ts=1/fs; | |
f1=20; | |
DigFreq1=2*pi*f1/fs; | |
f2=30; |
This file contains 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
clear all; | |
close all; | |
clc; | |
fs=1000; Ts=1/fs; | |
f1=20; | |
DigFreq1=2*pi*f1/fs; | |
f2=30; | |
DigFreq2=2*pi*f2/fs; |
This file contains 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
function Fila(list) { | |
this.list = list | |
this.add = elem => { | |
this.list.push(elem) | |
return this.list | |
} | |
this.remove = () => { | |
this.list.shift() |
This file contains 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
clear all | |
clc | |
f1 = 10; % Frequencia | |
f2 = 5; % Frequencia | |
w1 = 2*pi*f1; % Frequencia angular | |
w2 = 2*pi*f2; % Frequencia angular | |
t = 0:0.001:1; % Tempo |
This file contains 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
clear all | |
clc | |
f = 10; % Frequencia | |
w = 2*pi*f; % Frequencia angular | |
t = 0:0.001:1; % Tempo | |
y = sin(w*t) % Funcao |
This file contains 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
const http = require('http') | |
const url = require('url') | |
const fs = require('fs') | |
const server = http.createServer(function(req, res){ | |
var result = url.parse(req.url, true) | |
const lerArquivo = (caminho) => { | |
fs.readFile(__dirname + caminho, function(err, html){ | |
res.writeHeader(200, {"Content-Type": "text/html"}) |
This file contains 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
#include <iostream> | |
#include <opencv2/opencv.hpp> | |
#include <math.h> | |
using namespace cv; | |
using namespace std; | |
String dirSaida = "/home/johnny/Documentos/Sistemas de Informacao/S4/PDI/Projetos/PDI_Experimento_PassaAltas/Saidas/"; | |
String imagensEntrada[] = {"/home/johnny/Documentos/Sistemas de Informacao/S4/PDI/Projetos/PDI_Experimento_PassaAltas/Entradas/crianca.jpg", | |
"/home/johnny/Documentos/Sistemas de Informacao/S4/PDI/Projetos/PDI_Experimento_PassaAltas/Entradas/lenna.jpg", |
This file contains 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
void criarGaussiano(float **mascara, int largura, int altura){ | |
// adotando desvio padrão = 1,0 | |
float sigma = 1.0; | |
float r, s = 2.0 * sigma * sigma; | |
// variável para somatório | |
float soma = 0.0; | |
// delimitadores para máscara simétrica com média em (0,0) | |
int m = (largura-1)/2; |
This file contains 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; |
This file contains 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 operadoresSabel(Mat img){ | |
Mat imgResultante = img.clone(); | |
int gx,gy; | |
for(int i=0; i< img.rows; i++){ | |
for(int j=0; j < img.cols; j++){ | |
gx = (img.at<uchar>(i+1,j-1) + 2*(img.at<uchar>(i+1,j)) + img.at<uchar>(i+1,j+1)) - | |
(img.at<uchar>(i-1, j-1) + 2*(img.at<uchar>(i-1, j)) + img.at<uchar>(i-1, j+1)); |