# main function
if __name__ == "__main__":
	print "Running.."

	print 'Loading image..'
	img = cv2.imread('marker_image.jpg', 0)
	''' plt.imshow(img, cmap='gray', interpolation='bicubic')
	#plt.xticks([]), plt.yticks([])  # to hide tick values on X and Y axis
	#plt.show()
	#print "image plotted.." '''

	# Number of n-fold edges:
	order = 3
	kernel_size = 25
	scale_factor = 100

	#print 'Finding marker..'
	mt = MarkerTracker(order, kernel_size, scale_factor)
	while True:
		mt.locate_marker(img)
		mt.determine_marker_orientation(img)
		mt.determine_marker_quality(img)
		#print 'Marker found..'

		#print 'Plotting marker..'
		#img2 = mt.extract_window_around_maker_location(img)
		#plt.imshow(img2, cmap='gray', interpolation='bicubic')
		#plt.xticks([]), plt.yticks([])  # to hide tick values on X and Y axis
		#plt.show()