def brightness(im):
im_hsv = cv2.cvtColor(im, cv2.COLOR_BGR2HSV)<EOL>h, s, v = cv2.split(im_hsv) <EOL>height, weight = v.shape[:<NUM_LIT:2>]<EOL>total_bright = <NUM_LIT:0><EOL>for i in v:<EOL><INDENT>total_bright = total_bright+sum(i)<EOL><DEDENT>return float(total_bright)/(height*weight)<EOL>
Return the brightness of an image
Args:
    im(numpy): image

Returns:
    float, average brightness of an image