Minimal realization in bicategories of automata