Skip to content

Instantly share code, notes, and snippets.

Created May 29, 2015 15:57
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Code for generating images that are used in gsoc blog post.
# Use local scikit-image
import sys
sys.path.insert(0, "/home/dan/University/projects/gsoc_face_detection/scikit-image/")
import skimage.feature
import as data
from skimage.transform import integral_image
import numpy as np
# The horizontal offset
x = 75
# The vertical offset
y = 130
# Width of one rectangle of 9
width = 50
# Height of one rectangle of 9
height = 50
img = data.coins()
integral_img = integral_image(img)
lbp_code = skimage.feature.multiblock_local_binary_pattern(integral_img, x, y, width, height)
print lbp_code
skimage.feature.visualize_multiblock_lbp(img, x, y, width, height, lbp_code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment