0

I got the error like this:


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-38-c01841a65106> in <module>
      1 #assign "-"=10
----> 2 data=load_images_from_folder("D:/Handwritten-Equation-Solver-master (1)/Handwritten-Equation-Solver-master/extracted_images/-")
      3 len(data)
      4 for i in range(0,len(data)):
      5     data[i]=np.append(data[i],["10"])

<ipython-input-36-de2a2236b032> in load_images_from_folder(folder)
      6         if img is not None:
      7             _,thresh=cv2.threshold(img,127,255,cv2.THRESH_BINARY)
----> 8             _,ctrs,_=cv2.findContours(thresh,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_NONE)
      9             cnt=sorted(ctrs,key=lambda ctr:cv2.boundingRect(ctr)[0])
     10             w=int(28)

ValueError: not enough values to unpack (expected 3, got 2)

Kindly help me with this.

Tim Roberts
  • 48,973
  • 4
  • 21
  • 30
Santhosh
  • 38
  • 1
  • 8
  • This will answer your question: https://stackoverflow.com/questions/64345584/how-to-properly-use-cv2-findcontours-on-opencv-version-4-4-0 – Tim Roberts Jun 11 '21 at 18:01
  • 1
    Does this answer your question? [How to properly use cv2.findContours() on opencv version 4.4.0.?](https://stackoverflow.com/questions/64345584/how-to-properly-use-cv2-findcontours-on-opencv-version-4-4-0) – Tim Roberts Jun 11 '21 at 18:01

0 Answers0