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
# Code adapted from Tensorflow Object Detection Framework | |
# https://github.com/tensorflow/models/blob/master/research/object_detection/object_detection_tutorial.ipynb | |
# Tensorflow Object Detection Detector | |
import numpy as np | |
import tensorflow as tf | |
import cv2 | |
import time | |
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
@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
@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
// 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) | |
{ |