This file contains hidden or 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
#!/usr/bin/env python3 | |
import os | |
import sys | |
import numpy as np | |
import cv2 | |
if __name__ == '__main__': | |
def predicate(pixel): | |
B, G, R = pixel |
This file contains hidden or 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
#!/usr/bin/env python3 | |
''' | |
based on the MOSSE tracking example from OpenCV | |
[1] David S. Bolme et al. "Visual Object Tracking using Adaptive Correlation Filters" | |
http://www.cs.colostate.edu/~bolme/publications/Bolme2010Tracking.pdf | |
''' | |
import numpy as np |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import cv2 | |
cv = cv2 | |
assert cv2.__version__[0] >= '3', 'The fisheye module requires opencv version >= 3.0.0' | |
import numpy as np | |
np.set_printoptions(precision=4, linewidth=120) | |
import os | |
import glob | |
CHECKERBOARD = (6,9) |
This file contains hidden or 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
{ | |
"bL9QycV.jpg": [ | |
[ | |
[ | |
1547.485107421875, | |
485.5238342285156 | |
] | |
], | |
[ | |
[ |
This file contains hidden or 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
// ==UserScript== | |
// @name Qt docs unsucked | |
// @match http://doc.qt.io/qt-5/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
$("head").append('<style type="text/css"></style>'); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
#!/usr/bin/env python3 | |
import os | |
import sys | |
import time | |
from itertools import * | |
import pprint; pp = pprint.pprint | |
def inclusive_range(smallest, largest, step): | |
N = 1 + int(round((largest - smallest) / step)) | |
return [smallest + k*step for k in range(N)] |
This file contains hidden or 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
#!/usr/bin/env python3 | |
''' | |
always getting the most recent frame of a camera | |
================================================ | |
Usage: | |
------ | |
freshest_camera_frame.py |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import os | |
import sys | |
import time | |
import numpy as np | |
import cv2 as cv | |
import threading | |
# also acts (partly) like a cv.VideoCapture | |
class FreshestFrame(threading.Thread): |