1 | initial version |
Hi All,
After days struggle, I found the solution for this problem. Just remove (1), (2), (3), and add (4), shown below. I have data type conflict with the example provided in the internet. Now, the problem is resolved. Thank you for your help.
cv2.imwrite("C:\Users\Sa\Pictures\clip_35.jpg",clip_8bit) #(1), write as gray scale image
clip_8bit = cv2.imread("C:\Users\Sa\Pictures\clip_35.jpg") #(2), read as color image
imgray = cv2.cvtColor(clip_8bit,cv2.COLOR_BGR2GRAY) #(3), transfer to gray scale again
imgray = clip_8bit #(4)