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
import cv2 as cv | |
import requests | |
import numpy as np | |
import serial | |
import time | |
URL = r'http://choilab409.iptime.org:12345/' | |
THRESHOLD = 180 | |
ANIMAL_SIZE = 1000 | |
sr = serial.Serial("COM3", 57600, timeout=0, rtscts=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
from time import time | |
import cv2 as cv | |
import numpy as np | |
from pathlib import Path | |
videoPath = Path('/home/knowblesse/VCF/butter/Sample/TestVideo_Blinking.avi') | |
# Option 1 : OpenCV calling all frames | |
cap = cv.VideoCapture(str(videoPath)) |
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
// TRPG Die simulation program | |
// @2021 Knowblesse | |
#include <TM1637.h> | |
#define CLK 6 | |
#define DIO 5 | |
#define L_button 3 | |
#define R_button 2 | |
#define Top_button 4 |
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
""" | |
VideoProcessor.py | |
@Knowblesse 2021 | |
21 AUG 31 | |
Process new video and return row,col coordinates with head direction | |
- Inputs | |
-video_path : path to the to-be-labeled video | |
- Outputs | |
- row, col, degree 2D np matrix | |
""" |
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
/* | |
chasingbot.ino | |
22FEB07 | |
--------------------------------- | |
Required Librarys | |
--------------------------------- | |
SoftwareSerial - Default | |
SD - Defulat | |
TMRpcm - Install from library manager |
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://github.com/JoaoLopesF/SPFD5408 | |
#include <SPFD5408_Adafruit_GFX.h> // Core graphics library | |
#include <SPFD5408TFTLCDLib.h> // Hardware-specific library | |
#include <SPFD5408_TouchScreen.h> // Touch Screen library | |
#define LCD_CS A3 // Chip Select goes to Analog 3 | |
#define LCD_CD A2 // Command/Data goes to Analog 2 | |
#define LCD_WR A1 // LCD Write goes to Analog 1 | |
#define LCD_RD A0 // LCD Read goes to Analog 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
%% GSR_arduino_matlab | |
% Galvanic Skin Response - Matlab integration script | |
% 2021 Knowblesse | |
%% Setup connection | |
ard = arduino('COM6','Mega2560'); % COM port must be provided manually! | |
% and this code should be run no more than once, unless you cleared the | |
% value. | |
%% Setup DAQ parameters |
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 int PIN_Motor_L = 3; | |
const int PIN_Motor_R = 11; | |
const int PIN_MOTOR_L_DIR = 12; | |
const int PIN_MOTOR_R_DIR = 13; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(PIN_Motor_R, OUTPUT); | |
const int PIN_Motor_L = 3; | |
const int PIN_Motor_R = 11; | |
const int PIN_MOTOR_L_DIR = 12; |
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
%% Copy post-clustered data in the old raw data folder to the new raw data folder | |
basepath = 'D:\Lobster\GR\GR7_NeuroNexus16_v1-180607-151420\GR7'; | |
basepath2 = 'C:\VCF\Lobster\data\rawdata'; | |
filelist = dir(basepath); | |
workingfile = regexp({filelist.name},'#\S*','match'); | |
workingfile = workingfile(~cellfun('isempty',workingfile)); | |
for f = 1 : numel(workingfile) |
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
import sklearn | |
if (sklearn.__version__ != '0.23.2'): | |
raise Exception("scikit-learn package version must be 0.23.2") | |
import os | |
import numpy as np | |
from scipy.io import loadmat | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import classification_report | |
from sklearn.metrics import confusion_matrix |
NewerOlder