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 <opencv2/core.hpp> | |
#include <vector> | |
int main(int argc, char** argv) | |
{ | |
cv::Mat bgr_image = cv::imread("image.png"); | |
cv::Mat lab_image; | |
cv::cvtColor(bgr_image, lab_image, CV_BGR2Lab); | |
// Estrazione L channel |
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
# mkdir /etc/apache2/ssl | |
# openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -out /etc/apache2/ssl/server.crt -keyout /etc/apache2/ssl/server.key | |
# a2enmod ssl | |
# ln -s /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-enabled/000-default-ssl.conf | |
# vi /etc/apache2/sites-enabled/000-default-ssl.conf | |
change: | |
## SSLCertificateFile /etc/apache2/ssl/server.crt | |
## SSLCertificateKeyFile /etc/apache2/ssl/server.key | |
# /etc/init.d/apache2 restart |
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
class ofLogAudio : public ofThread{ | |
public: | |
bool startSpeak = false; | |
string msg; | |
string speak; | |
void start(string _c="/usr/bin/espeak -v mb-it3") | |
{ | |
speak = _c; | |
startThread(true); |
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 "ofxGPIO.h" | |
#define CMD 0x80 | |
#define ON 0x01 | |
#define OFF 0 | |
#define BRI 0xE0 | |
#define ADD 0x70 | |
I2c * i2c; |
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 "ofxGPIO.h" | |
/* | |
ofxGPIO | |
speed test SPI | |
*/ | |
int main(int argc, char ** argv) | |
{ |
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 <unistd.h> | |
#include <thread> | |
#include <vector> | |
#include <signal.h> | |
#include <semaphore.h> | |
using namespace std; | |
vector<thread*> th; |
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
//https://en.wikipedia.org/wiki/Kalman_filter#Example_application.2C_technical | |
class Kalman { | |
public: | |
Kalman() { | |
Q_angle = 0.001; | |
Q_bias = 0.003; | |
R_measure = 0.03; | |
angle = 0; | |
bias = 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
#include <ESP8266WiFi.h> | |
const char* ssid = "************"; | |
const char* password = "************"; | |
WiFiServer server(5055); | |
int pinLeft = 13; | |
int pinRight = 12; | |
bool ValLeft = false; |
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 <vector> | |
#include <string> | |
#include <sstream> | |
#include <stdio.h> | |
#include <regex> | |
#include <fstream> | |
#include <curl/curl.h> | |
void write_file(std::string p, std::string d) |
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
/* | |
http://dlib.net/train_object_detector.cpp.html | |
Usage: | |
first step create positive train: | |
./bin/imglab_commandline positive/ "30,20,520,520" "person" | |
second step create negative train in append positive train previously created: |