i was trying to split an image into red channel,blue channel and green channel, using cv2.split() function. i keep getting an error message. that says Traceback (most recent call last):
File “C:\Users\david\AppData\Local\Programs\Python\Python36-32\p99.py”, line 5, in
(R,G,B) = cv2.split(q);
ValueError: not enough values to unpack (expected 3, got 0)
how do i eliminate this error message.
i tried reinstalling opencv. i tried reinstalling idle. i tried system restore.
this is the main failure. your image did not load.
‘mm.PNG’ is not, where your program starts
imread() returns None in that case.
you should add a check like : if (np.shape(img)==()): #read error, you cant go on !
after each imread(), to be safe !
will return an empty  then (again, see example above !),
and you cannot unpack that to a rgb tuple
(which would be bgr order in opencv anyway)