EyePython

Image Recognition for Python.

Download EyePython

EyePython is free to download and use but requires EyeServer. Use it to add image recognition support to Python.

Requirements

Requires a running EyeServer with an EyeSel or EyeServer license.

Setup Intructions

1. Download the “EyePython.zip” file to any folder.

2. Extract the zip file.

3. View the “readme.txt” file for instructions.

Examples

Small examples of how to use the Eye from Python.

The example below locates and types “Hello” in all visible Notepad windows.

import eye

# Find all notepads
locations=eye.findImages('images/notepad.png')
if locations!='Image not found':
	for location in locations:
		print 'Found at: '+location[0]+', '+location[1]

		# Click and type 'Hello'
		eye.click(location[0], location[1])
		eye.type("Hello")
else:
	print 'Image not found'

The example below opens the Wikipedia website using the Chrome web browser. Searches for “tiger” and verifies the result.

import eye

# Open Wikipedia
eye.openBrowser('chrome', 'http://www.wikipedia.org')

# Find the search field
location=eye.findImage('images/search.png')
if location!='Image not found':
	# Click in the search field and type 'tiger' followed by ENTER
	eye.click(location[0], location[1])
	eye.type("tiger[ENTER]")

	# Find the tiger image
	locations=eye.findImages('images/tiger.png')
	if locations!='Image not found':
		for location in locations:
			print 'Found at: '+location[0]+', '+location[1]
	else:
		print 'Image not found'

# Close the browser		
eye.closeBrowser()