1

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.

Jcorretjer
  • 467
  • 2
  • 6
  • 24
  • What operating system are you using (Windows)? What you are doing should be perfectly fine. Changing the image after showing it is perfectly legal. – Ron Mar 12 '14 at 23:08
  • Maybe it's my pc lol It's getting a bit old. – Jcorretjer Mar 12 '14 at 23:12
  • You might try posting the crash you observed on the simplecv question and answer site: http://help.simplecv.org/questions/ (thats not normal). I found that changing the backend to use QT helped solve a lot of issues on my Mac (not sure about windows). See http://matplotlib.org/faq/usage_faq.html "What is a backend section." to see how to do this. Try doing img.live() also. – Ron Mar 12 '14 at 23:19
  • ran it on the raspberry pi and did the same thing :/ – Jcorretjer Mar 13 '14 at 01:56

1 Answers1

1

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()

````

Gopalakrishna Palem
  • 1,705
  • 1
  • 20
  • 34