Skip to content

Instantly share code, notes, and snippets.

@dimitrs
dimitrs / eye_detector.py
Created June 15, 2014 13:40
A Python implementation of the paper "Accurate Eye Center Location through Invariant Isocentric Patterns".
import cv2
import numpy as np
import matplotlib.pyplot as plt
from skimage import io
img = io.imread('eye.png')
# Left eye
img = np.around(img[0:img.shape[0], 0:img.shape[1]/2])
@dimitrs
dimitrs / flatten_label.py
Created June 15, 2014 13:32
Detect and flatten a label on a jar. Use both OpenCV-Python and SciKit-image since both are based on Numpy.
#Import both skimage and cv
from skimage import transform as tf
from skimage import io
import cv2
import numpy as np
from scipy import optimize
import matplotlib.pyplot as plt
# Could use either skimage or cv to read the image