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 | |
import numpy as np | |
from Tracker import Tracker | |
from TouchEvents import TouchEvents | |
from pythonosc import udp_client as osc | |
from scipy.signal import convolve2d | |
w,h=640,480 | |
mouseX, mouseY = 0,0 | |
exposure=-8 |
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 | |
import numpy as np | |
w,h = 640,480 | |
cam = cv2.VideoCapture(0) | |
cam.set(cv2.CAP_PROP_EXPOSURE,-6) | |
cv2.namedWindow("src") | |
cv2.namedWindow("dst", cv2.WINDOW_NORMAL) | |
cv2.moveWindow("dst",w,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
import py5 | |
class Quad: | |
def __init__(self, s): | |
self.p = list(map(int, s.split(" "))) | |
def load_quads(filename): | |
return [Quad(s) for s in py5.load_strings(filename)] | |
def draw_quads(xy_quads, uv_quads, tex): |
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
PImage cam, screen; | |
ArrayList<Quad> cam_quads, screen_quads; | |
void setup() { | |
size(1280, 480, P3D); | |
cam = loadImage("vis_200.png"); | |
cam_quads = load_quads("cam_quads.txt"); | |
screen_quads = load_quads("screen_quads.txt"); | |
} |
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
# By Rick Companje, 2023-08-26 | |
# Enjoy! | |
# inspired by: https://stackoverflow.com/questions/10196198/how-to-remove-convexity-defects-in-a-sudoku-square/11366549#11366549 | |
# Please let me know if you know an easier/better way to achieve this simple 2D mapping in OpenCV. | |
# Something like OpenGL vertex / texcoords approach but then in OpenCV... | |
import cv2,csv | |
import numpy as np |
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://becominghuman.ai/real-time-finger-detection-1e18fea0d1d4 | |
def bgSubMasking(self, frame): | |
"""Create a foreground (hand) mask | |
@param frame: The video frame | |
@return: A masked frame | |
""" | |
fgmask = bgSubtractor.apply(frame, learningRate=0) | |
kernel = np.ones((4, 4), np.uint8) |
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
#!/Applications/Xcode.app/Contents/Developer/usr/bin/python3 | |
import config,json,os,subprocess,ocr2json | |
from tqdm import tqdm | |
from joblib import Parallel, delayed | |
import Quartz,Vision | |
from Cocoa import NSURL | |
from Foundation import NSDictionary | |
from wurlitzer import pipes # needed to capture system-level stderr |
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
async function _fetch(url) { | |
const rawResponse = await fetch(url, { | |
method: "get", | |
}).catch((err) => { | |
console.error(err); | |
}); | |
if (!rawResponse) { | |
console.log("ERROR: Could not retrieve data."); | |
return Promise.reject(); | |
} |
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
//Original by Frank Force (KilledByAPixel) - https://twitter.com/KilledByAPixel/status/1517294627996545024. | |
//Observable by Daniel Darabos - https://observablehq.com/@darabos/decoding-a-city-in-a-bottle | |
//Processing version by Rick Companje as intermediate step to 8086 assembly language. | |
//this version currently lacks textures on the buildings. To be continued. | |
int w=72; | |
int h=50; | |
int t=0; | |
void setup() { |
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
@prefix geo: <http://www.opengis.net/ont/geosparql#> . | |
@prefix def: <https://hetutrechtsarchief.nl/def/> . | |
@prefix hua: <https://hetutrechtsarchief.nl/id/> . | |
hua:D8884A3B2E6CA8F6E0538F04000A374B | |
a def:Adresvermelding ; | |
geo:asWKT "POINT (9.1825624999999995 45.4652869999999965)"^^geo:wktLiteral . |