Skip to content

Instantly share code, notes, and snippets.

View alucarded's full-sized avatar
🏠
Working from home

Tomasz Edward Posluszny alucarded

🏠
Working from home
View GitHub Profile
import cv2
import cv2.cv as cv
import numpy as np
import cmath
img = cv2.imread('nano.bmp', cv2.CV_LOAD_IMAGE_GRAYSCALE)
# Find particles
img = cv2.medianBlur(img, 3)
circles = cv2.HoughCircles(img, cv.CV_HOUGH_GRADIENT, 4, 10, param1=255, param2=20, minRadius=1, maxRadius=10)
##########################################################################
# Maximum Response filterbank from
# http://www.robots.ox.ac.uk/~vgg/research/texclass/filters.html
# based on several edge and bar filters.
# Adapted to Python by Andreas Mueller [email protected]
# Share and enjoy
#
import numpy as np
import matplotlib.pyplot as plt