Skip to content

Commit

Permalink
just another stackoverflow example
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlugg committed Jan 12, 2015
1 parent 20f438c commit e516da7
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions test_cases/SimpleCv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
__author__ = 'Future Engineer'

"""
from:
http://stackoverflow.com/questions/27873818/easygui-and-simplecv-typeerror-module-object-is-not-callable
"""
import sys

sys.path.append('..')
import code
import easygui as eg
from easygui import *
from SimpleCV import *
from cv2 import *
from cv import *
from PIL import *
import time
import sys

# Set a breakpoint
code.interact("Code paused. Hit ctrl-D when ready to continue", local=dict(globals(), **locals()))
while True:
eg.msgbox("""Welcome to my program!""", image = "pi.jpg")
msgbox("Select img ")
nam=fileopenbox(filetypes=['*'])
print(nam)
img=Image.open(nam)
img1=img.convert('1')
time.sleep(1)
img1.save("result.png")
msgbox("This is the result", image = "result.png")
msg = "Do you want to continue?"
title = "Please Confirm"
if ccbox(msg, title): # show continue/cancle dialog
print("okk") # user chose continue
else:
sys.exit(0) # user chose cancle
Binary file added test_cases/pi.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test_cases/result.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e516da7

Please sign in to comment.