mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
update xrange() to range()
update xrange() to range() as Python 2 has been deprecate, more info: 1. Python 2 has been no longer supported officially since January 1, 2020. Check https://www.python.org/doc/sunset-python-2/ 2. xrange() was renamed to range() in Python 3. Check https://stackoverflow.com/questions/17192158/nameerror-global-name-xrange-is-not-defined-in-python-3/17192181#17192181 update xrange() to range() Update py_fourier_transform.markdown update xrange() to range()
This commit is contained in:
+1
-1
@@ -268,7 +268,7 @@ fft_filters = [np.fft.fft2(x) for x in filters]
|
||||
fft_shift = [np.fft.fftshift(y) for y in fft_filters]
|
||||
mag_spectrum = [np.log(np.abs(z)+1) for z in fft_shift]
|
||||
|
||||
for i in xrange(6):
|
||||
for i in range(6):
|
||||
plt.subplot(2,3,i+1),plt.imshow(mag_spectrum[i],cmap = 'gray')
|
||||
plt.title(filter_name[i]), plt.xticks([]), plt.yticks([])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user