Bindetector based on matching shapes and reference images