Detect noteheads based on border pixel co-occurence with mask