Skip to content

Instantly share code, notes, and snippets.

@kor01
kor01 / 01_color_select.py
Last active September 9, 2017 02:57
[CarND_find_lane] #self_dirving #perception
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
# Read in the image
image = mpimg.imread('test.jpg')
# Grab the x and y size and make a copy of the image
ysize = image.shape[0]
xsize = image.shape[1]
@kor01
kor01 / 001_recongnition_overview.txt
Last active August 30, 2017 01:30
[RoboND_recognition] #recognition #robotics
purpose:
to give each cluster in segmentation output a label
s.t. the grounding geometric specification of semantic command can be extracted
@kor01
kor01 / 001_DBSCAN_clustering.txt
Last active August 30, 2017 00:16
[RoboND_segmentation] segmentation clustering #robotics
DBSCAN: Density-Based Spatial Clustering of Application with Noise
Assummes: known distance boundary but not number of clusters
Also named as: Euclidean Clustering
two hyper parameters:
maximum distance within cluster
minimum number of points in a cluster
@kor01
kor01 / 001_perception_sensors.txt
Last active August 29, 2017 23:37
[RoboND_Sensors] brief course notes #robotics
human v.s. robots:
human 3D vision: stereo vision, prior geometry, motion filtering
robot 3D vision: (actively) measure the distance
sensor types:
active sensors: use an enery source to probe the environment
@kor01
kor01 / quadrotor_pitches.txt
Last active August 27, 2017 06:35
[mechanic conventions] rotation orientation #mechanics
from the rotor center:
the pitch surface in phase II and IV: up rotation produce up thrust on the body
the pitch surface in phase I and III: up rotation produce down thrust on the body
up rotation always produce down torque
down rotation produce up torque
@kor01
kor01 / run_test.sh
Created August 23, 2017 04:06
[nosetest cheatsheet] nosetest #nosetest
nosetests --logging-level=WARN -vs
@kor01
kor01 / car_classify.py
Last active August 16, 2017 23:20
[scikit-learn] scikit cheets #scikit
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
import cv2
import glob
import time
from sklearn.svm import SVC
from sklearn.preprocessing import StandardScaler
# NOTE: the next import is only valid
# for scikit-learn version <= 0.17
@kor01
kor01 / find_corners.py
Last active August 20, 2017 08:37
[cv2 cheatsheet] #cv2
# number of inner corners in x and y direction
nx = 8
ny = 6
#find chessboard corners
img = mpimg.imread(images[idx])
# Convert to grayscale
gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
@kor01
kor01 / plot_bar.py
Last active August 16, 2017 23:11
[matplot cheet] subplot bars #matplot
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
# Read in and plot the image
image = mpimg.imread('Udacican.jpeg')
plt.imshow(image)
# Take histograms in R, G, and B
@kor01
kor01 / array_operation.m
Created July 25, 2017 00:52
[matlab array] matlab array operations #matlab
%% get size
d = size(a, 2)
e = size(a, 1)
%% drop singleton dimension
a = squeeze(b)
%% construct