#NEWLINE# def __init__( self , **traits ) : #NEWLINE# #INDENT# super ( CameraImage , self ) . __init__ ( ** traits ) #NEWLINE# self . _dims = ( 200 , 320 ) #NEWLINE# self . data_store = ArrayPlotData ( image = self . data ) #NEWLINE# self . _hud = dict ( ) #NEWLINE# self . plot = Plot ( self . data_store ) #NEWLINE# renderers = self . plot . img_plot ( 'image' , name = 'camera_image' , colormap = fix ( gray , ( 0 , 255 ) ) ) #NEWLINE# self . _image = renderers [ 0 ] #NEWLINE# self . plot . aspect_ratio = ( float ( self . _dims [ 1 ] ) / self . _dims [ 0 ] ) #NEWLINE# self . hud_overlay = PlotLabel ( text = '' , component = self . plot , hjustify = 'left' , overlay_position = 'inside bottom' , color = 'white' ) #NEWLINE# self . plot . overlays . append ( self . hud_overlay )