Shape Context descriptor implementation