Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

ValueError: too many values to unpack (expected 2) using CV library [closed]

$
0
0

I'm doing some quick exercises using CV library, trying to analyze some colored images.

This is my code:

import cv2 as cvimg01=cv.imread('PATH')from matplotlib import pyplot as pltplt.imshow(cv.cvtColor(img01,cv.COLOR_BGR2RGB))from matplotlib import pyplot as pltplt.imshow(cv.cvtColor(img01,cv.COLOR_BGR2RGB))

Once this is set, then I go to a specific place in the image to be analyzed using a for loop:

h,w,_=img01.shapefor i in range(50,150):    for j in range(25,50):        img01=[i,j]=(0,100,0)

But once I ran that part, I got this error:

ValueError: too many values to unpack (expected 2)

I have tried changing the parameters, the image or restarting the compilation, but it is not working.


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>