Esempio n. 1
0
 def take_picture(self):
     self.PhotoCap.takePictures(3, '/home/nao/picture', 'party')
     cmd = 'sshpass -p kurakura326 scp nao@' + str(self.ip) + ":/home/nao/picture/party_0.jpg ./person_image"
     os.system(cmd)
     self.gender, self.age, self.skin_color = face_feature.gender("./person_image/party_0.jpg", self.upper_wear, self.upper_color, self.person_num)
     if self.gender == "none":
         self.say("please look at my eyes")
         self.take_picture()
     else:
         return self.gender
Esempio n. 2
0
    def take_picture(self):
        self.PhotoCap.takePictures(3, '/home/nao/picture', 'party')
        cmd = 'sshpass -p kurakura326 scp nao@' + str(self.ip) + ":/home/nao/picture/party_0.jpg ./person_image"
        os.system(cmd)

        # cmd = "sshpass -p kurakura326 scp ./person_image/party_0.jpg nao@" + str(
        #     self.ip) + ":~/.local/share/PackageManager/apps/boot-config/html/"
        # os.system(cmd)
        # 把人的面部特征保存
        self.gender, self.age, self.skin_color = face_feature.gender("./person_image/party_0.jpg", self.upper_wear, self.upper_color, self.person_num)
        if self.gender == "none":
            self.say("please look at my eyes")
            self.take_picture()
        else:
            return self.gender