Write a python script/function, that does global histogram equalization of an gray-scale image. The solution should consist of the following steps:
Some tips:
index = int( img[i,j] * 255 )
maps <0;1> to {0,1,...,255}.h = np.zeros( (256) )
preallocates 1-D array (vector) with 256 elements all set to zerolen( img.shape )
returns the number of dimensions of the numpy array img
; 3 for a colour image, 2 for a gray-scale one%run task_histeq