hrl_camera.py
Go to the documentation of this file.
00001 import camera_config as cc
00002 import camera_uuid as cu
00003 
00004 def find_camera(name):
00005     parameters = cc.camera_parameters[name]
00006     opencv_id = cu.lookup_by_name(name)
00007     classname = parameters['class']
00008     import_statement = 'import ' + classname
00009     instantiation = classname + '.' + classname + '(parameters, opencv_id)'
00010     exec import_statement
00011     return eval(instantiation)
00012 
00013 
00014 if __name__ == '__main__':
00015     import sys
00016     import roslib
00017     roslib.load_manifest('hrl_camera')
00018     import cv
00019     name = sys.argv[1]
00020     cv.NamedWindow(name, cv.CV_WINDOW_AUTOSIZE)
00021     c = find_camera(name)
00022     while True:
00023         f = c.get_frame()
00024         cv.ShowImage(name, f)
00025         cv.WaitKey(33)
00026 


hrl_camera
Author(s): Hai Nguyen, Advait Jain, Cressel Anderson, Marc Killpack
autogenerated on Wed Nov 27 2013 11:37:01