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
| #include "db_connector.hpp" | |
| #include <QSqlDriver> | |
| DBConnector::DBConnector(QString ip, int port, QString databaseName, QString username, QString password) | |
| : db(QSqlDatabase::addDatabase("QPSQL")) | |
| { | |
| this->db.setHostName(ip); | |
| this->db.setPort(port); | |
| this->db.setDatabaseName(databaseName); | |
| this->db.setUserName(username); |
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
| #include <iostream> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <curl/curl.h> | |
| #include <vector> | |
| #include <chrono> |
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
| void runCapture() | |
| { | |
| WebSocketCamera websocketCamera("ws://localhost/camera"); | |
| websocketCamera.start(); | |
| cv::Mat image; | |
| int key = -1; | |
| websocketCamera.getImage(image); | |
| cv::imshow("DISPLAY", image); |
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
| #include <QCoreApplication> | |
| #include <QTimer> | |
| #include <QDebug> | |
| #include <memory> | |
| #include <opencv2/highgui/highgui.hpp> | |
| int main(int argc, char** argv) | |
| { |
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
| import numpy as np | |
| import os | |
| import six.moves.urllib as urllib | |
| import sys | |
| import tarfile | |
| import tensorflow as tf | |
| import zipfile | |
| import matplotlib.pyplot | |
| from collections import defaultdict |
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
| #! /bin/bash | |
| #To run this script just type ./Run.sh <PATH TO IMAGE> | |
| LD_LIBRARY_PATH=/home/fccoelho/Applications/anaconda3/lib/python3.6/site-packages/../../ python test_obj_detection.py $1 |
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
| #include <iostream> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <tiffio.h> | |
| int main(int argc, char** argv) | |
| { | |
| if(argc < 2) |
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
| std::pair<double, double> linearRegression(const std::vector<double>& x, const std::vector<double>& y) | |
| { | |
| const double n = x.size(); | |
| const double s_x = std::accumulate(x.begin(), x.end(), 0.0); | |
| const double s_y = std::accumulate(y.begin(), y.end(), 0.0); | |
| const double s_xx = std::inner_product(x.begin(), x.end(), x.begin(), 0.0); | |
| const double s_xy = std::inner_product(x.begin(), x.end(), y.begin(), 0.0); | |
| const double numer = n * s_xy - s_x * s_y; // The same regardless of inversion (both terms here are commutative) | |
| const double denom = n * s_xx - s_x * s_x; // Will change if inverted; use this for now | |
| double a; |
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
| #! /usr/bin/python | |
| import scipy | |
| import scipy.misc | |
| import scipy.signal | |
| import scipy.stats | |
| import sys | |
| im1 = scipy.misc.imread(sys.argv[1], mode='L') | |
| im2 = scipy.misc.imread(sys.argv[2], mode='L') |
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
| #! /usr/bin/python | |
| import os | |
| import scipy | |
| import scipy.misc | |
| import scipy.signal | |
| import scipy.stats | |
| import sys | |
| originalImagePath = sys.argv[1] |