File size: 925 Bytes
4dbe5d1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 29 11:35:49 2020

Example: image enhancement 
(spatial tone-mapping, local contrast enhancement, color enhancement)

@author: Vasileios Vonikakis (bbonik@gmail.com)
"""


import glob
import imageio
from image_enhancement import blend_expoures



if __name__=="__main__":
    
    # select a collection of image exposures
    
    # exposure_filenames = glob.glob('../images/exposures_A*.jpg')
    exposure_filenames = glob.glob('../images/exposures_B*.jpg')

    # put the exposures in a list
    image_list = []
    for filename in exposure_filenames:
        image = imageio.imread(filename)
        image_list.append(image)
    
    # blend exposures
    exposure_blend = blend_expoures(
        image_list,             
        threshold_dark=0.35,                              
        threshold_bright=0.65, 
        verbose=True
        )