imgs = get_int_imgs((img1, img2)) return {'sum': np.sum(imgs['sum']), 'pvar': np.sum(imgs['pvar'])} def get_spatial(cam, radiance, L=50): imgs = [] for i in range(L): imgs.append(cam.grab(radiance)) return get_int_imgs(imgs) data = {'temporal': {}, 'spatial': {}, 'width': None, 'height': None} # Intialize the camera, here we can specify different image size # or any other parameter that Camera allows c = Camera(bit_depth=10, width=100, height=50) # Fill the information data['width'] = c.width data['height'] = c.height # Maximum exposure for test exposure_max = 9000000 # Find the camera parameters for the test c.exposure = exposure_max c.blackoffset = get_emva_blackoffset(c) c.K = get_emva_gain(c) # Find the radiance that will saturate the camera at our maximum exposure time saturation_radiance = c.get_radiance_for()
import numpy as np from emva1288.camera import Camera c = Camera() radiances = np.linspace(0, c.get_radiance_for(mean=200), num=20) for radiance in radiances: img = c.grab(radiance) print(img.mean(), img.std())
import numpy as np from emva1288.camera import Camera c = Camera() radiances = np.linspace(0, c.get_radiance_for(mean=200), num=20) for radiance in radiances: c.set_radiance(radiance) img = c.grab() print(img.mean(), img.std())
def get_spatial(cam, radiance, L=50): imgs = [] for i in range(L): imgs.append(cam.grab(radiance)) return get_int_imgs(imgs) data = {'temporal': {}, 'spatial': {}, 'width': None, 'height': None} # Intialize the camera, here we can specify different image size # or any other parameter that Camera allows c = Camera(bit_depth=10, img_x=100, img_y=50) # Fill the information data['width'] = c.img_x data['height'] = c.img_y # Maximum exposure for test exposure_max = 9000000 # Find the camera parameters for the test c.exposure = exposure_max c.blackoffset = get_emva_blackoffset(c) c.K = get_emva_gain(c) # Find the radiance that will saturate the camera at our maximum exposure time