Update: improving relation with opencv