Commit c2277b5e authored by robinechuca's avatar robinechuca
Browse files

main continue

parent 54dc35ba
......@@ -8,20 +8,35 @@
import cv2
import os
import sys
import tkinter.filedialog
import trouve
import cache
def main():
source_path = tkinter.filedialog.askopenfilename(
filetypes=[ ("jpeg", "*.jpg"),
("tiff", "*.tiff"),
def choisir(titre):
Demande a l'utilisateur de choisir une image.
impath = tkinter.filedialog.askopenfilename(
filetypes=[ ("jpeg image", "*.jpg"),
("tif image", "*.tif"),
("portable network g", "*.png")],
title="Image source")
if not source_path:
if not impath:
sys.stderr.write("Il faut selectionner un fichier!\n")
image = cv2.imread(impath)
if image == None:
sys.stderr.write("L'image est corronpue!\n")
return image
def main():
source = choisir("Image source")
cacher = choisir("Image a cahcher")
if __name__ == '__main__':
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment