how to send large RGB values as parameters to be read as a picture in python

96 views Asked by At

I have a data frame called labels which looks like this:

name    label
0   [[[255, 255, 255], [255, 255, 255], [255, 255,...   black
1   [[[255, 255, 255], [255, 255, 255], [255, 255,...   black
2   [[[255, 255, 255], [255, 255, 255], [255, 255,...   black
3   [[[255, 255, 255], [255, 255, 255], [255, 255,...   black
4   [[[255, 255, 255], [255, 255, 255], [255, 255,...   black

and I want to send the name to a function which then views it as an image and then detects the colour. however when I tried writing this code i got an error:

predict(labels.name[0])

error:  
     18         names =[]
     19 
---> 20         image = cv2.imread(image_path)
     21         image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
     22         #image_yuv = cv2.cvtColor(image, cv2.COLOR_BGR2YUV)

SystemError: <built-in function imread> returned NULL without setting an error
0

There are 0 answers