예제 #1
0
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()

# Initialize the exposure for the spatial measure
exposure_spatial = None

# Loop through the exposures
for exposure in np.linspace(c.exposure_min, exposure_max, 100):
    c.exposure = exposure
    data['temporal'][exposure] = {}

    # For each exposure, take to measurements (bright, dark)
    for radiance in (saturation_radiance, 0.0):
        photons = c.get_photons(radiance)

        # Get the temporal data
        data['temporal'][exposure].setdefault(photons, {})
예제 #2
0
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())
예제 #3
0
파일: grab.py 프로젝트: wendelas/emva1288
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())
예제 #4
0
           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
saturation_radiance = c.get_radiance_for()

# Initialize the exposure for the spatial measure
exposure_spatial = None

# Loop through the exposures
for exposure in np.linspace(c.exposure_min, exposure_max, 100):
    c.exposure = exposure
    data['temporal'][exposure] = {}

    # For each exposure, take to measurements (bright, dark)
    for radiance in (saturation_radiance, 0.0):
        photons = c.get_photons(radiance)

        # Get the temporal data
        data['temporal'][exposure].setdefault(photons, {})