Skip to content

Instantly share code, notes, and snippets.

@dimidagd
Created July 27, 2020 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimidagd/bdd3703cd1b97220c57b9b55580f9665 to your computer and use it in GitHub Desktop.
Save dimidagd/bdd3703cd1b97220c57b9b55580f9665 to your computer and use it in GitHub Desktop.
linear polar conversions
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment