These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.
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
# Original Matlab code https://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html | |
# | |
# | |
# Python port of depth filling code from NYU toolbox | |
# Speed needs to be improved | |
# | |
# Uses 'pypardiso' solver | |
# | |
import scipy | |
import skimage |
The IPython Notebook has two different keyboard input modes. Edit mode allows you to type code/text into a cell and is indicated by a green cell border. Command mode binds the keyboard to notebook level actions and is indicated by a grey cell border.
- ⌘ : Command
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
# https://www.youtube.com/watch?v=Y3ac5rFMNZ0&t=318s | |
# avconv -i rtsp://admin:admin@192.168.1.68/play1.sdp -c copy -map 0 -f segment -segment_time 300 -segment_format mp4 "capture-%03d-`date +%Y-%m-%d_%H:%M:%S`.mp4" | |
import cv2 | |
backsub = cv2.BackgroundSubtractorMOG() #background subtraction to isolate moving cars | |
capture = cv2.VideoCapture("/home/ubuntu/Downloads/traffic_video.avi") | |
i = 0 | |
minArea=1 | |
while True: | |
ret, frame = capture.read() |
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
#include <ros/ros.h> | |
#include <iostream> | |
// PCL specific includes | |
#include <pcl/ModelCoefficients.h> | |
#include <pcl/point_types.h> | |
#include <pcl/io/pcd_io.h> | |
#include <pcl/filters/extract_indices.h> | |
#include <pcl/filters/voxel_grid.h> | |
#include <pcl/features/normal_3d.h> | |
#include <pcl/kdtree/kdtree.h> |
from scipy.spatial import Delaunay, ConvexHull
import networkx as nx
points = [ [0,0],[0,50],[50,50],[50,0],[0,400],[0,450],[50,400],[50,450],[700,300],[700,350],[750,300],[750,350],
[900,600],[950,650],[950,600],[900,650]
]
def concave(points,alpha_x=150,alpha_y=250):
points = [(i[0],i[1]) if type(i) <> tuple else i for i in points]
de = Delaunay(points)
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://benjithian.sg/2012/12/simple-background-subtraction/ | |
Simple Background Subtraction. Simple stuff. | |
*/ | |
#include <stdio.h> | |
#include <curl/curl.h> | |
#include <sstream> | |
#include <iostream> | |
#include <vector> | |
#include <opencv2/opencv.hpp> |