def takePicturesUserMenu(self): if not os.path.exists("test/testUser"): os.mkdir("test/testUser") camera.savePictures("test/testUser") pixmap = QtGui.QPixmap("test/testUser/4.png") width = self.label_12.width() height = self.label_12.height() self.label_12.setPixmap(pixmap.scaled(width, height, QtCore.Qt.KeepAspectRatio)) self.label_12.show() self.pushButton_5.setText(_translate("3BDB-FR", "Re-Capture", None)) self.pushButton_6.setEnabled(True)
def takeInitialPictures(self): dbname = str(self.dbs_combo.currentText()) username = str(self.users_combo.currentText()) directory = "databases/" + dbname + '/' + username + "/temp" if os.path.exists(directory): shutil.rmtree(directory) os.mkdir(directory) camera.savePictures(directory) #processImages.crop(directory) #processImages.deletePictures(directory, ".png") pixmap = QtGui.QPixmap(directory + "/5.png") width = self.label_11.width() height = self.label_11.height() self.label_11.setPixmap(pixmap.scaled(width, height, QtCore.Qt.KeepAspectRatio)) self.label_11.show() self.pushButton_13.setText(_translate("3BDB-FR", "Re-Capture", None)) self.pushButton_18.setEnabled(True)