ImageId

a module used to represent a image, and store image information

class eyewitness.image_id.ImageId(channel, timestamp, file_format='jpg')

Bases: object

ImageId is used to standardize the image_id format

Parameters:
  • channel (str) -- channel of image comes
  • timestamp (int) -- timestamp of image arrive time
  • format (str) -- type of image
classmethod from_str(image_id_str)

serialize image_id from string, the seperator of image is double dash --

Parameters:image_id_str (str) --

a string with pattern {chanel}--{timestamp}--{fileformat}

e.g: "channel--12345567--jpg" (separated by a double dash)

Returns:image_id -- a ImageId obj
Return type:ImageId
class eyewitness.image_id.ImageRegister

Bases: object

insert_image_info(raw_image_path)

abstract method which need to be implement: how to insert/record image information

Parameters:
  • image_id (ImageId) -- ImageId obj
  • raw_image_path (str) -- the path of raw image
register_image(image_id, meta_dict)

interface for ImageRegister to register_image