This file contains 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
* |
This file contains 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 numpy as np | |
import cv2 | |
# cv2.getGaborKernel(ksize, sigma, theta, lambda, gamma, psi, ktype) | |
# ksize - size of gabor filter (n, n) | |
# sigma - standard deviation of the gaussian function | |
# theta - orientation of the normal to the parallel stripes | |
# lambda - wavelength of the sunusoidal factor | |
# gamma - spatial aspect ratio | |
# psi - phase offset |
This file contains 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
# Solves a randomized 8-puzzle using A* algorithm with plug-in heuristics | |
import random | |
import math | |
_goal_state = [[1,2,3], | |
[4,5,6], | |
[7,8,0]] | |
def index(item, seq): |