def save_ori(self, ori, group): ori_str = cv2.imencode('.png', ori)[1] self.save('orientation', ori_str, group)