def detect_properties_cloud_storage(uri):
 vision_client = vision.Client()
 image = vision_client.image(source_uri=uri)
 properties = image.detect_properties()
 for prop in properties:
  color = prop.colors[0]
  print 'fraction: {}'.format(color.pixel_fraction)
  print 'r: {}'.format(color.color.red)
  print 'g: {}'.format(color.color.green)
  print 'g: {}'.format(color.color.blue)

def detect_properties_cloud_storage ( uri ) : vision_client = vision . Client ( ) image = vision_client . image ( source_uri = uri ) properties = image . detect_properties ( ) for prop in properties : color = prop . colors [ 0 ] print 'fraction: {}' . format ( color . pixel_fraction ) print 'r: {}' . format ( color . color . red ) print 'g: {}' . format ( color . color . green ) print 'g: {}' . format ( color . color . blue )
detects image properties in the file located in google cloud storage .