Question

I'm trying out SimpleCV and I'm noticing every time I click title bar, simplecv stops working to the pint that it crashes. Before crashing it says "pythonw.exe Stopped working." That happens if I edit my script and run it from the python idle. If I simply double click it, the image is displayed for 20secs and then just closes.

This is what I tried. Really simple.

from SimpleCV import Image

img = Image("carro.jpg")

img = img.scale(300,300)

img.show()

Just wondering if this could causes any kind of trouble while doing some image processing like subtracting colors and stuff like that.

Was it helpful?

Solution

Had the same problem and after searching found this: From http://help.simplecv.org/question/1118/why-imageshow-freezes/ it looks like it is caused by pyGame requiring a while loop to keep pumping events to the window.

The solution, as indicated at that post, and worked for me, was to use the quit() method on the window handle returned by show.

````

img = Image("carro.jpg")

img = img.scale(300,300)

win = img.show()

#wait for user input before closing
raw_input()

win.quit()

````

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top