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 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] |
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
purpose: | |
to give each cluster in segmentation output a label | |
s.t. the grounding geometric specification of semantic command can be extracted |
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
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 |
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
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 |
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 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 |
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
nosetests --logging-level=WARN -vs |
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 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 |
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
# 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) |
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 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 |
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
%% get size | |
d = size(a, 2) | |
e = size(a, 1) | |
%% drop singleton dimension | |
a = squeeze(b) | |
%% construct |