Add support for multiple files
This commit is contained in:
parent
7769250b15
commit
6f0fb68e2b
@ -48,4 +48,9 @@ if __name__ == '__main__':
|
||||
ap.add_argument('images', type=str, nargs='+', help='')
|
||||
args = ap.parse_args()
|
||||
|
||||
print(imgrate(args.images[0]).laplacian)
|
||||
ratings = {image: imgrate(image).laplacian for image in args.images}
|
||||
maximum = max(ratings, key=ratings.get)
|
||||
|
||||
for rating in ratings.keys():
|
||||
maxmark = '*' if rating == maximum and len(ratings) > 1 else ' '
|
||||
print('{}imgrate("{}") = {}'.format(maxmark, rating, ratings[rating]))
|
||||
|
Loading…
Reference in New Issue
Block a user