Then save to JSON for each scan so we have a record of all camera related settings.
from egrabber import *
gentl = EGenTL()
grabber = EGrabber(gentl)
settings = {
"device":{},
"remote":{},
"stream":{},
"interface":{},
"system":{}
}
categories = grabber.device.get(query.categories())
for category in categories:
features = grabber.device.get(query.features_of(category))
for feature in features:
if grabber.device.get(query.available(feature)):
if grabber.device.get(query.readable(feature)):
if not grabber.device.get(query.command(feature)):
settings["device"][feature]=grabber.device.get(feature)
categories = grabber.remote.get(query.categories())
for category in categories:
features = grabber.remote.get(query.features_of(category))
for feature in features:
if grabber.remote.get(query.available(feature)):
if grabber.remote.get(query.readable(feature)):
if not grabber.remote.get(query.command(feature)):
if feature != "BalanceRatioSelector" and feature != "BalanceWhiteAuto":
settings["remote"][feature]=grabber.remote.get(feature)
categories = grabber.stream.get(query.categories())
for category in categories:
features = grabber.stream.get(query.features_of(category))
for feature in features:
if grabber.stream.get(query.available(feature)):
if grabber.stream.get(query.readable(feature)):
if not grabber.stream.get(query.command(feature)):
settings["stream"][feature]=grabber.stream.get(feature)
categories = grabber.interface.get(query.categories())
for category in categories:
features = grabber.interface.get(query.features_of(category))
for feature in features:
if grabber.interface.get(query.available(feature)):
if grabber.interface.get(query.readable(feature)):
if not grabber.interface.get(query.command(feature)):
settings["interface"][feature]=grabber.interface.get(feature)
categories = grabber.system.get(query.categories())
for category in categories:
features = grabber.system.get(query.features_of(category))
for feature in features:
if grabber.system.get(query.available(feature)):
if grabber.system.get(query.readable(feature)):
if not grabber.system.get(query.command(feature)):
settings["system"][feature]=grabber.system.get(feature)
Then save to JSON for each scan so we have a record of all camera related settings.