Skip to content

Instantly share code, notes, and snippets.

View travis's full-sized avatar

Travis Vachon travis

View GitHub Profile
/*****************************************************************************************
* Name : Fast object tracking using the OpenCV library *
* Author : Lior Chen <chen.lior@gmail.com> *
* Notice : Copyright (c) Jun 2010, Lior Chen, All Rights Reserved *
* : *
* Site : http://www.lirtex.com *
* WebPage : http://www.lirtex.com/robotics/fast-object-tracking-robot-computer-vision *
* : *
* Version : 1.0 *
# this uses openvc's hough circles detection to find circles in the image
# http://docs.opencv.org/modules/imgproc/doc/feature_detection.html?highlight=cvhoughcircles#houghcircles
circles = cvHoughCircles(thresholded, storage, CV_HOUGH_GRADIENT, 2, thresholded.height/4, 100, 40, 20, 200)
# find largest circle
maxRadius = 0
x = 0
y = 0
found = False
for i in range(circles.total):
#!/usr/bin/python
# -*- coding: utf-8 -*-
from opencv.cv import *
from opencv.highgui import *
from threading import Thread
#import serial
class RobotVision:
cvSize size
cvImage hsv_frame, thresholded, thresholded2
# /*****************************************************************************************
# * Name : Fast object tracking using the OpenCV library *
# * Author : Lior Chen <chen.lior@gmail.com> *
# * Notice : Copyright (c) Jun 2010, Lior Chen, All Rights Reserved *
# * : *
# * Site : http://www.lirtex.com *
# * WebPage : http://www.lirtex.com/robotics/fast-object-tracking-robot-computer-vision *
# * : *
# * Version : 1.0 *
# * Notes : By default this code will open the first connected camera. *
(extend-type ParseObject
ILookup
(-lookup [obj key]
(case key
:id (.-id obj)
;; wrap dates so they're easier to serialize
:createdAt (js/Date. (.-createdAt obj))
:updatedAt (js/Date. (.-updatedAt obj))
(.get obj (name key))))
function watchableProjects (user, callbacks) {
var diff, accessibleProjects, watchedProjects;
createAccessibleProjectsQuery(function(accessibleProjectsQuery) {
findAccessibleProjects(function(ap){
accessibleProjects = ap;
diff();
});
});
findWatchedProjects(function(wp){
(defn watchable-projects [user]
(go-catch
(let [accessible-projects-query-ch
(accessible-projects-query user)
watched-projects-ch
(watched-projects user)
accessible-projects-ch
(parse/find (<? accessible-projects-query-ch))]
👻 lein cljsbuild once
Mar 31, 2014 2:32:38 PM org.apache.http.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.NoRouteToHostException) caught when connecting to the target host: No route to host
Mar 31, 2014 2:32:38 PM org.apache.http.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
(defun clean-applescript-input (s)
(replace-regexp-in-string
(regexp-quote "\"") "\\\\\""
(replace-regexp-in-string
(regexp-quote "\\") "\\\\\\\\" s)
)
)
(defun omni-quick-entry (beg end)
Enabled minor modes: Auto-Composition Auto-Compression Auto-Encryption
Auto-Fill Column-Number Delete-Selection Diff-Auto-Refine
File-Name-Shadow Flyspell Font-Lock Global-Auto-Composition
Global-Font-Lock Hi-Lock Hl-Line Line-Number Mlinks Mouse-Wheel Nxhtml
Nxhtml-Global Pc-Selection Recentf Shell-Dirtrack Show-Paren
Transient-Mark
(Information about these minor modes follows the major mode info.)
Ruby/eruby-nxhtml mode: