use simplified contours for rough features search
use kd-tree to find closest points