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 <iostream> | |
#include <string> | |
#include <vector> | |
#include <windows.h> | |
#include <setupapi.h> | |
#pragma comment(lib,"setupapi.lib") | |
typedef std::basic_string<TCHAR> tstring; |
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
#! /usr/bin/env python | |
# -*- coding: utf-8 | |
import sys | |
import numpy | |
from numpy import pi, sin, cos | |
from scipy.optimize import leastsq | |
import scipy, scipy.fftpack | |
import cv2 |
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
#! /usr/bin/env python | |
# -*- coding: utf-8 | |
import numpy | |
import scipy, scipy.fftpack | |
from numpy import pi, sin, cos | |
from scipy.optimize import leastsq | |
def zero_padding(src, dstshape, pos = (0, 0)): | |
y, x = pos | |
dst = numpy.zeros(dstshape) |
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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy | |
import matplotlib.pyplot as plt | |
def least_squares_regression(X, t, phi): | |
PHI = numpy.array([phi(x) for x in X]) |
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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy | |
import scipy.optimize | |
import matplotlib.pyplot as plt | |
def fit_exp(parameter, x, y): | |
a = parameter[0] | |
b = parameter[1] |