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 typing import Any | |
import numpy as np | |
from nptyping import NDArray | |
def main(name): | |
# Use a breakpoint in the code line below to debug your script. | |
print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint. | |
f: NDArray[(3, 3), Any] = lambda A, f: A ** f | |
ak = 3 | |
n = 2 |
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
kernel = (5,5) | |
self.img = cv2.blur(self.img, kernel) | |
# Polar blur | |
polar_img = cv2.blur(cv2.linearPolar(self.img.copy(), (self.imgWidth/2,self.imgHeight/2), self.imgHeight/2, cv2.WARP_POLAR_LINEAR+cv2.WARP_FILL_OUTLIERS), kernel) | |
cart_img = cv2.linearPolar(polar_img.copy(), (self.imgHeight/2,self.imgWidth/2), self.imgHeight/2, cv2.WARP_INVERSE_MAP+cv2.WARP_POLAR_LINEAR+cv2.WARP_FILL_OUTLIERS) | |
self.img = cart_img |
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 random, sys | |
################################################################################ | |
# the x and y in our function (x - y + 7) (aka. dimensions) | |
number_of_variables = 3 | |
# the minimum possible value a pose difference can have | |
min_values = [-10, -10, -3.14/2] |
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 | |
################################################################################ | |
# File name: pso.py # | |
# Description: A module that solves a minimization problem using PSO # | |
#------------------------------------------------------------------------------# | |
# Author: Hussein S. Al-Olimat # | |
# Email: [email protected] # | |
#------------------------------------------------------------------------------# | |
# Date-last-modified: Nov 7, 2016 # |