def menuEncode(): picture, imgPath = facial_features.select_image() chosenFeature, pointsList, pixelsList = facial_features.do_facial_feature_recog( picture, imgPath) print( "The important information: \n Picture chosen: {} \n Chosen feature: {} " .format(picture, chosenFeature)) try: LSB.encode(picture, imgPath, pointsList, pixelsList) except ValueError: print("The message is too large to be encoded.")
def menuEncode(): picture, imgPath = facial_features.select_image() chosenFeature, pointsList, pixelsList = facial_features.do_facial_feature_recog(picture, imgPath) print("The important information: \n Picture chosen: {} \n Chosen feature: {} ".format(picture, chosenFeature)) time.sleep(2) facial_features.kill_example_pictures() LSB.encode(picture,imgPath,pointsList,pixelsList) with open('key.txt', 'w+') as file: file.write(picture + '\n') file.write(imgPath + '\n') file.write(repr(pointsList) + '\n')
def menuEncode(): picture, imgPath = facial_features.select_image( ) #select_image() function is called chosenFeature, pointsList, pixelsList, fullFacePoints = facial_features.do_facial_feature_recog( picture, imgPath) #do_facial_feature_recog() function print( "The important information: \n Picture chosen: {} \n Chosen feature: {} " .format(picture, chosenFeature)) try: LSB.encode(picture, imgPath, pointsList, pixelsList, chosenFeature, fullFacePoints) except ValueError: print( "Function menuEncode(): There was an error while trying to encode a message." )
def menuEncode(): picture, imgPath = facial_features.select_image(config.picture) chosenFeature, pointsList, pixelsList = facial_features.do_facial_feature_recog(picture, imgPath) print("The important information: \n Picture chosen: {} \n Chosen feature: {} ".format(picture, chosenFeature)) LSB.encode(picture,imgPath,pointsList,pixelsList,config.picture)
def multiEncode(): for i in range(28): picture, imgPath = facial_features.select_image(f'{i}.png') chosenFeature, pointsList, pixelsList = facial_features.do_facial_feature_recog(picture, imgPath) print("The important information: \n Picture chosen: {} \n Chosen feature: {} ".format(picture, chosenFeature)) LSB.encode(picture,imgPath,pointsList,pixelsList,f'{i}.png')