Skip to content

Instantly share code, notes, and snippets.

@sdshmkh
sdshmkh / homography.py
Last active November 21, 2024 17:52
Find Homography
def find_homography(X, X_dash):
'''
Given a set of N correspondences of the form [x,y] and [x',y'], fit homography.
'''
equations = []
num_points = X.shape[0]
for i in range(num_points):
x, y = X[i, 0], X[i, 1] # Original points
x_dash, y_dash = X_dash[i, 0], X_dash[i, 1] # Transformed points
@sdshmkh
sdshmkh / nginx.conf
Created June 19, 2018 12:12 — forked from JPry/nginx.conf
Nginx - Force PDFs to download
location ~* /(.*\.pdf) {
types { application/octet-stream .pdf; }
default_type application/octet-stream;
}