def image_to_world(bbox, size):
px_per_unit = (float(size[<NUM_LIT:0>])/bbox.width, float(size[<NUM_LIT:1>]/bbox.height))<EOL>return lambda x,y: (x/px_per_unit[<NUM_LIT:0>] + bbox.xmin, (size[<NUM_LIT:1>]-y)/px_per_unit[<NUM_LIT:1>] + bbox.ymin)<EOL>
Function generator to create functions for converting from image coordinates to world coordinates