Context-dependent logo matching and recognition