Python Opencv cv2.LUT() how to use
Need to apply some rapid conversion on the color channels of a image. 1)I have stored in a list the corresponding output value: ListaVred = [0]*255 for i in range(0,255): ListaVred[i]=i*127 / 255 + 128 2)I get the color input value from 0 to 255 from the image 3)should replace in the image the input values with the output i.e. red[45]= 0 ListaVred0] = 128 red[45]= 128 I've looked at cv2.LUT(src,dst) function but not sure about it's use, http://docs.opencv.org/trunk/modules/core/doc/operations_on_arrays.html#cv2.LUT cv2.LUT(ListaVred,red) TypeError: src is not a numpy array, neither a scalar