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
Frame = require("models/frame") | |
function Frame() { | |
this.parse = __bind(this.parse, this); | |
Frame.__super__.constructor.apply(this, arguments); | |
} | |
f = new Frame({ "id": "4fc7a8044f21553da2000092"}) | |
Frame | |
f.fetch() | |
Object | |
feat = f.get("features").at(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
(function(plugin){ | |
var Blob, | |
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | |
Blob = (function() { | |
function Blob(inspection) { | |
this.run = __bind(this.run, this); | |
this.inspection = inspection; | |
} |
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
for v in Image("lenna").findLines()[0].__dict__.values(): | |
try: | |
for vprime in v: | |
print type(vprime) | |
except: | |
print type(v) |
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 gc | |
import SimpleSeer.models as M | |
@core.state('start') | |
def start(state): | |
state.core.set_rate(10.0) | |
return state.core.state('waitforbuttons') | |
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
SimpleSeer.Web: ERROR Exception on /grid/thumbnail_file/4fe47a9c598e1e04a90000f8 [GET] | |
Traceback (most recent call last): | |
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1504, in wsgi_app | |
response = self.full_dispatch_request() | |
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1264, in full_dispatch_request | |
rv = self.handle_user_exception(e) | |
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1262, in full_dispatch_request | |
rv = self.dispatch_request() | |
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1248, in dispatch_request | |
return self.view_functions[rule.endpoint](**req.view_args) |
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
{ | |
"cameras": [ | |
{ "id": 0, "name": "Scanner", "scanner": 1 } | |
], | |
"web": { "address": "localhost:8080" }, | |
"mongo": { "host" : "127.0.0.1" }, | |
"database": "default", |
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
vendor css: | |
https://github.com/ingenuitas/SimpleSeer/tree/master/SimpleSeer/static/vendor/styles | |
our css: | |
https://github.com/ingenuitas/SimpleSeer/tree/master/SimpleSeer/static/app/styles | |
our "theme" page (header/footer) and any static image files | |
https://github.com/ingenuitas/SimpleSeer/tree/master/SimpleSeer/static/app/assets | |
our templates |
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
# -*- coding: utf-8 -*- | |
# <nbformat>3.0</nbformat> | |
# <codecell> | |
from random import random | |
from SimpleCV import Image, Color | |
from scipy import stats | |
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
def findShaftTransition(self,img,left_guess,right_guess,top_cutoff): | |
""" | |
Walk the line on the shaft find where it starts to bulge out | |
""" | |
def transformFromROI(roi, points): | |
return np.array([(p[0] + roi[0], p[1] + roi[1]) for p in points]) | |
right_guess = sorted(right_guess, key = lambda l: l[1]) #make sure it's bottom, top | |
roi_delta = 50 |
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
from mongoengine import Q | |
parts = Frame.objects(Q(**{"metadata__Part Number__startswith": "NC"}) | Q(**{"metadata__Part Number__startswith": "OK"})) | |
symerror = [] | |
for p in parts: | |
fd = p.features[0].featuredata | |
symerror.append(abs(fd['transition_length_left_mm'] - fd['transition_length_right_mm'])) | |
print fd['transition_length_left_mm'], " ", fd['transition_length_right_mm'] | |
print "average:", np.sum(symerror) / len(symerror) |