Feature detection using basis functions