jayrambhia / superpixels-SLIC

Superpixel segmentation using SLIC with Python.
MIT License
129 stars 77 forks source link

NameError: name 'xrange' is not defined #8

Open wwziyin opened 3 years ago

wwziyin commented 3 years ago

When I run the program, there is an error:

    for i in xrange(self.step, self.width - self.step/2, self.step):

NameError: name 'xrange' is not defined

Can someone help me? Thanks.

Zlin7569 commented 2 years ago

https://blog.csdn.net/mao_hui_fei/article/details/89881396

progs2002 commented 1 year ago

the code is written in python 2. xrange() does not work in python 3, use range()