Opencv old version, return three parameters:
im2, contours, hierarchy = cv2.findContours(mask, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
To return three parameters:
Just demote OpenCV to 3.4.3.18, and input PIP install opencv python = = 3.4.3.18 in the terminal
Opencv new version call, return two parameters:
contours, hierarchy = cv2.findContours(mask, cv2.RETR_ TREE, cv2.CHAIN_ APPROX_ SIMPLE)
Read More:
- Python3-ValueError:not enough values to unpack (expected 2, got 0)
- ValueError: not enough values to unpack (expected 6, got 1)
- ValueError: not enough values to unpack (expected 2, got 0)
- Error: improvement of not enough values to unpack (expected 2, got 1)
- for k, v in k_map: ValueError: too many values to unpack (expected 2)
- ValueError: need more than 0 values to unpack
- ValueError: too many values to unpack
- valueError: Length mismatch: Expected axis has 40 elements, new values have 38 elements
- ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 256,
- [solved] error: valueerror: expected 2D array, got scalar array instead
- AttributeError: module ‘cv2.cv2‘ has no attribute ‘face‘
- Using CV2 to solve sliding verification code
- SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
- Importerror: the perfect solution of no module named CV2!!! (not too good)
- error occurred during unpacking on the remote end: unpack-objects abnormal exit
- cv2 error – function not implemented [How to Solve]
- ValueError: num_samples should be a positive integer value, but got num_samp=0
- Python Numpy.ndarray ValueError:assignment destination is read-only
- raise ValueError(‘Expected input batch_size ({}) to match target batch_size ({}).‘
- Git push failed, prompt unpack error / unpack failed solution