本文整理汇总了Python中pipeline.Pipeline.options方法的典型用法代码示例。如果您正苦于以下问题:Python Pipeline.options方法的具体用法?Python Pipeline.options怎么用?Python Pipeline.options使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pipeline.Pipeline
的用法示例。
在下文中一共展示了Pipeline.options方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from pipeline import Pipeline [as 别名]
# 或者: from pipeline.Pipeline import options [as 别名]
def main():
"""
Parses arguments; initialises logger; initialises camera driver if
necessary; loads single image from disk if necessary; and runs desired parts
of pipeline, or loads output from previous execution for printout.
"""
options, args = argparse.run()
loginit.run(options.verbosity)
logger = logging.getLogger('main')
logger.info(' '.join(sys.argv[1:]))
if options.simulate == 0:
options.simulate = None
l = DC1394Library()
elif options.simulate > 0:
options.simulate -= 1
elif options.simtime is None:
options.simtime = 36000
global pipeline
pipeline = Pipeline(options)
if options.disk:
logger.info('using poses from disk')
pipe = Pipeline()
pipe.options = options
printer = Printer(pipe=pipe)
printer.final()
logger.info('done. exiting')
sys.exit(0)
if args:
try:
image = cv2.imread('images/'+args[0], cv2.CV_LOAD_IMAGE_GRAYSCALE)
pipeline.set_image(image)
logger.info('opening image file %s from disk' % args[0])
except IOError:
logger.error('image file not found: %s' % args[0])
exit(1)
elif options.simulate is not None:
logger.info('running in simulation mode')
else:
try:
fwcam = handle_common_options(options, l)
pipeline.set_fwcam(fwcam)
logger.info('init. pydc1394 camera object')
logger.info('camera: %s' % fwcam.model)
logger.info('mode: %s' % fwcam.mode)
logger.info('framerate: %d' % fwcam.framerate.val)
except:
logger.error('unable to open camera capture')
exit(1)
pipeline.run()