code after added newest oepncv framework