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
// Code based on BITLUNI's ESP32-cam work | |
// the size you want to downsample to | |
int newWidth = 40; | |
int newHeight = 30; | |
int DSF = 160 / newWidth; // Down Sampling Factor - ideally DSF should be 4, 8 or 16.. so that the bitshifting happening below is accurate | |
void downSample(unsigned char *frame) | |
{ |
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 <M5StickC.h> | |
#include "arduinoFFT.h" | |
#define SAMPLE_PERIOD 5 // サンプリング間隔(ミリ秒) | |
const uint16_t FFTsamples = 64; //This value MUST ALWAYS be a power of 2 | |
double vReal[FFTsamples]; | |
double vImag[FFTsamples]; | |
const double samplingFrequency = 1000.0 / (double)SAMPLE_PERIOD; // 200Hz | |
arduinoFFT FFT = arduinoFFT(vReal, vImag, FFTsamples, samplingFrequency); // FFTオブジェクトを作る |
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
dataset = ''' | |
// 1 | |
-10.00,-11.00,-14.31,-8.93,-15.84,-34.12,-45.63,-46.56,-66.47,-77.33,-89.85,-98.59,-107.57,-115.89,-120.41,-123.71,-123.71,-121.38,-115.89,-110.24,-100.23,-90.59,-79.95,-68.72,-57.38,-46.01,-36.19,-27.44,-19.98,-14.31,-10.91,-9.76 | |
-10.00,-10.91,-14.19,-19.82,-27.22,-35.01,-44.49,-55.50,13.52,-79.29,-92.08,-101.87,-110.24,-2.83,-121.38,-29.93,-119.72,-123.34,21.67,-106.68,-102.70,-92.08,-81.26,-69.85,-58.79,-47.15,-36.49,-27.44,-20.14,-14.31,-6.35,-6.32 | |
-9.44,-11.09,-14.54,-16.89,-26.99,-30.85,-30.04,-56.91,-22.53,-79.95,-18.56,-101.87,-90.68,-87.62,-115.51,-124.70,-122.71,30.35,-0.94,-110.24,-102.70,-92.82,-81.91,-69.85,-58.32,-47.15,-36.79,-27.66,-20.14,-14.43,-11.00,-9.84 | |
-9.52,-11.18,-14.07,-19.82,-26.77,-34.41,-23.96,-30.57,-68.72,-82.57,-69.80,-98.59,-100.46,-8.48,-119.43,-119.72,-116.72,22.51,37.69,38.23,-8.22,-72.77,-78.64,-68.16,-54.56,-29.66,0.89,1.12,-12.02,-14.19,-10.91,-9.76 | |
-10.00,-11.27,5.51,-20.31,-27.88,-37.08,-46.01,-59.26,-70.98,7.21,-92.08,-101.05,-112.02,32.98,-122.36,- |
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
@Override | |
public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) { | |
String resourceUrl = request.getUrl().toString(); | |
String fileExtension = WebviewResourceMappingHelper.getInstance().getFileExt(resourceUrl); | |
if(WebviewResourceMappingHelper.getInstance().getOverridableExtensions().contains(fileExtension)){ | |
String encoding = "UTF-8"; | |
String assetName = WebviewResourceMappingHelper.getInstance().getLocalAssetPath(resourceUrl); | |
if (StringUtils.isNotEmpty(assetName)) { | |
String mimeType = WebviewResourceMappingHelper.getInstance().getMimeType(fileExtension); | |
if (StringUtils.isNotEmpty(mimeType)) { |
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 draw() { | |
image(video, 0, 0, width, height); | |
// We can call both functions to draw all keypoints and the skeletons | |
drawKeypoints(); | |
drawSkeleton(); | |
} |
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
/** | |
This is an implementation of Zigbee device communication using an XBee | |
and a Centralite Smart Switch 4256050-ZHAC | |
dave (www.desert-home.com) | |
source: http://www.desert-home.com/2014/10/zigbee-protocol-xbee-but-this-time.html | |
*/ | |
// This code will handle both a Uno and a Mega2560 by careful use of | |
// the defines. I tried it on both of them, and the only problem is that |
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
@Override | |
public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) { | |
String resourceUrl = request.getUrl().toString(); | |
String fileExtension = WebviewResourceMappingHelper.getInstance().getFileExt(resourceUrl); | |
if(WebviewResourceMappingHelper.getInstance().getOverridableExtensions().contains(fileExtension)){ | |
String encoding = "UTF-8"; | |
String assetName = WebviewResourceMappingHelper.getInstance().getLocalAssetPath(resourceUrl); | |
if (StringUtils.isNotEmpty(assetName)) { | |
String mimeType = WebviewResourceMappingHelper.getInstance().getMimeType(fileExtension); | |
if (StringUtils.isNotEmpty(mimeType)) { |
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 base64 | |
import time | |
import urllib2 | |
import cv2 | |
import numpy as np | |
""" | |
Examples of objects for image frame aquisition from both IP and |