remove downscaling (crashes on too many iamges)
This commit is contained in:
parent
e4183b986a
commit
1c9954c8ad
|
@ -1,4 +1,3 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
"""
|
"""
|
||||||
Matplotlib based photo ranking system using the Elo rating system.
|
Matplotlib based photo ranking system using the Elo rating system.
|
||||||
|
|
||||||
|
@ -93,7 +92,7 @@ class Photo:
|
||||||
"""
|
"""
|
||||||
Reads the image, performs rotation, and downsamples.
|
Reads the image, performs rotation, and downsamples.
|
||||||
"""
|
"""
|
||||||
|
print(self._filename)
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
# read image
|
# read image
|
||||||
|
|
||||||
|
@ -112,13 +111,16 @@ class Photo:
|
||||||
# dump downsample, just discard columns-n-rows
|
# dump downsample, just discard columns-n-rows
|
||||||
|
|
||||||
M, N = data.shape[0:2]
|
M, N = data.shape[0:2]
|
||||||
|
print(M)
|
||||||
|
print(N)
|
||||||
|
|
||||||
MN = max([M,N])
|
MN = max([M,N])
|
||||||
|
print(MN)
|
||||||
|
|
||||||
step = int(MN / 800)
|
step = int(MN / 800)
|
||||||
if step == 0: step = 1
|
if step == 0: step = 1
|
||||||
|
|
||||||
data = data[ 0:M:step, 0:N:step, :]
|
#data = data[ 0:M:step, 0:N:step, :]
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
# rotate
|
# rotate
|
||||||
|
|
Loading…
Reference in New Issue