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
| #define OCTAVE 1 // // Group buckets into octaves | |
| #define OCT_NORM 0 // Don't normalise octave intensities by number of bins | |
| #define FHT_N 256 // set to 256 point fht | |
| #include <FHT.h> // include the library | |
| int noise[] = {90, 125, 147, 143, 128, 123, 104, 89}; //just test output without in silence, and use values from ocatve bins | |
| //int noise[] = {90, 85, 147, 143, 128, 123, 104, 89}; //just test output without in silence, and use values from ocatve bins | |
| // leds |
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
| http://www.codeproject.com/Articles/42067/2D-Circle-Packing-algorithm-ported-to-C | |
| http://stackoverflow.com/questions/3851668/position-n-circles-of-different-radii-inside-a-larger-circle-without-overlapping |
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
| package com.example.app; | |
| import android.content.Intent; | |
| import android.net.Uri; | |
| import android.provider.Settings; | |
| import android.content.pm.PackageManager; | |
| import android.os.Build; | |
| import android.os.Bundle; |
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
| import logging | |
| import math | |
| import numpy as np | |
| from scipy import spatial | |
| import cv2 | |
| # ============================================================================ | |
| CAR_COLOURS = [ (0,0,255), (0,106,255), (0,216,255), (0,255,182), (0,255,76) | |
| , (144,255,0), (255,255,0), (255,148,0), (255,0,178), (220,0,255) ] |
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
| import sys | |
| sys.path.append("../libs") | |
| import tfutils | |
| import numpy as np | |
| import tensorflow as tf | |
| import tensorflow.contrib.graph_editor as ge | |
| ########################################################################## | |
| VGG_MEAN = [103.939, 116.779, 123.68] |
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
| # old | |
| conv1 = _conv_layer(image, 32, 9, 1) | |
| conv2 = _conv_layer(conv1, 64, 3, 2) | |
| conv3 = _conv_layer(conv2, 128, 3, 2) | |
| resid1 = _residual_block(conv3, 3) | |
| resid2 = _residual_block(resid1, 3) | |
| resid3 = _residual_block(resid2, 3) | |
| resid4 = _residual_block(resid3, 3) | |
| resid5 = _residual_block(resid4, 3) | |
| conv_t1 = _conv_tranpose_layer(resid5, 64, 3, 2) |
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
| from ctypes import * | |
| import os | |
| import random | |
| import numpy as np | |
| import skvideo.io | |
| with open('names.txt') as fp: | |
| NAMES = {i: name.strip() for i, name in enumerate(fp)} | |
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
| import os | |
| import logging | |
| import logging.handlers | |
| import random | |
| import numpy as np | |
| import skvideo.io | |
| import cv2 | |
| import matplotlib.pyplot as plt |
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
| def filter_mask(img): | |
| kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (2, 2)) | |
| # Fill any small holes | |
| closing = cv2.morphologyEx(img, cv2.MORPH_CLOSE, kernel) | |
| # Remove noise | |
| opening = cv2.morphologyEx(closing, cv2.MORPH_OPEN, kernel) | |
| # Dilate to merge adjacent blobs |
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
| def get_centroid(x, y, w, h): | |
| x1 = int(w / 2) | |
| y1 = int(h / 2) | |
| cx = x + x1 | |
| cy = y + y1 | |
| return (cx, cy) | |
| def detect_vehicles(fg_mask, min_contour_width=35, min_contour_height=35): |