main.py 1.2 KB
import sys
import ColorObject
import Contour
import Gradient
import Skeleton2
import Threshold
import ImageComponents
import ShapeDetection

def ProcessChoiceMenu(choice):
	if choice == '1':
		ColorObject.ColorChoice()	 
	elif choice == '2' :
		Skeleton2.KernelChoice()
	elif choice == '3' :
		Contour.ContourChoice()
	elif choice == '4' :
		ImageComponents.Edges()
	elif choice == '5' :
		ImageComponents.Corners()
	elif choice == '6' :
		ShapeDetection.FindCircles()
	elif choice == '7' :
		ShapeDetection.FindShapes()
	elif choice == '8' :
		Gradient.GradientChoice()
	elif choice == '9':
		Threshold.ThresholdChoice()
	else:
		exit()
	return

def MenuApplication():
	print ('\t\t\tMenu Traitement d\'images \n\n')
	print ('\t1. Find a colored object')
	print ('\t2. Skeletisation')
	print ('\t3. Contours')
	print ('\t4. Canny edge detection')
	print ('\t5. Corner detection')
	print ('\t6. Find a circle')
	print ('\t7. Find Basic shapes')
	print ('\t8. Gradient')
	print ('\t9. Threshold')
	if sys.version_info >= (3, 0):
		choice = input('\n\tChoix multiple possible\n')
	else:
		choice = raw_input('\n\tChoix multiple possible\n')
	for i in range (0, len(choice)):
		ProcessChoiceMenu(choice[i])
	return 

MenuApplication()