This Hikvision webcam was a pain to get running on Linux Ubuntu.
After plugging it in all my photo taking apps refused to load or crashed very quickly after opening.
I used this to help solve the issue.
sudo rmmod uvcvideo
# LICENSE: public domain | |
def calculate_initial_compass_bearing(pointA, pointB): | |
""" | |
Calculates the bearing between two points. | |
The formulae used is the following: | |
θ = atan2(sin(Δlong).cos(lat2), | |
cos(lat1).sin(lat2) − sin(lat1).cos(lat2).cos(Δlong)) |
const btns = document.querySelectorAll('button[aria-label*="Accept"]') | |
for(const btn of btns){ | |
setTimeout(() => { btn.click() }, 300) | |
} |
module springLeaf(height=10, leaf_spacing=10, spring_width=30) { | |
difference() { | |
union() { | |
translate([0,-spring_width,0]) | |
cylinder(h=height, d=leaf_spacing, $fn=36); | |
translate([-leaf_spacing/2,-spring_width,0]) | |
cube([leaf_spacing,spring_width-(leaf_spacing/2),height]); | |
} |
This Hikvision webcam was a pain to get running on Linux Ubuntu.
After plugging it in all my photo taking apps refused to load or crashed very quickly after opening.
I used this to help solve the issue.
sudo rmmod uvcvideo
import cv2 | |
import sys | |
import os.path | |
import numpy as np | |
def drawMatches(img1, kp1, img2, kp2, matches): | |
rows1 = img1.shape[0] | |
cols1 = img1.shape[1] | |
rows2 = img2.shape[0] |
curl https://bootstrap.pypa.io/get-pip.py | python
/* A version of https://github.com/johnwargo/Seeed-Studio-Relay-Board/blob/master/seeed_relay_test.py in C for use with https://www.seeedstudio.com/Raspberry-Pi-Relay-Board-v1.0-p-2409.html */ | |
#include <stdio.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <wiringPiI2C.h> | |
int deviceRegMode1 = 0x06; | |
int deviceRegData = 0xff; |
.box { | |
-webkit-border-radius: 5px; | |
-moz-border-radius: 5px; | |
border-radius: 5px; | |
} |
# | |
# Controlling an RC car via webcam (well, so far, just tracking it...) | |
# | |
# Requires OpenCV 2.0 and Python 2.6 | |
# | |
import cv | |
def find_car(image): |