Interface hangs while running while using from kivy.app

Asked

Viewed 111 times

0

I’m studying image processing using Python.

I interfaced with Kivy.app, but is catching when it runs the while. I am using the code below to fill an array with "0" or "1", making the image binarized.

Any tips on how to resolve the issue of not crashing?

Obs. In Python’s IDLE runs perfectly.

Code:

i = 0
        while i < (hs-1):
              j=0
              while j < (ws-1):
                    j = j+1
              if (lum_img2[i,j]) <= threshold2:
                      lum_img2[i,j] = 0
              else:
                      lum_img2[i,j]= 1
        i = i + 1
        i = 0 
  • More details of your problem are missing. Where part of the application (kivy) is entering this code? If possible rewrite the question by providing more details.

  • And the code is poorly indented, there is no way to know if it is right or not. If the i = i+1 is out of the while, as posted in the question, the loop will be infinite, because always i < hs-1.

  • Anderson, thank you so much for the quick response.... really the indentation of 1 =i+1 was wrong.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.