$ PYTHONPATH='.' python3 read_image.py read-text-from-local-image -f PHOTO-2024-02-15-13-03-31.jpg
[2024-02-15 14:54:07,764] INFO : Processing image for text Extraction
[2024-02-15 14:54:07,797] INFO : Removing noise and smoothening image
Traceback (most recent call last):
File "read_image.py", line 135, in <module>
cli()
File "/home/sridhar/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/sridhar/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/sridhar/.local/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/sridhar/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/sridhar/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "read_image.py", line 119, in read_text_from_local_image
return read_image_from_file(filename)
File "read_image.py", line 92, in read_image_from_file
image_text = extract_image_text(image)
File "read_image.py", line 36, in extract_image_text
contours = find_possible_contours_in_image(inv_img)
File "read_image.py", line 84, in find_possible_contours_in_image
_, contours, hierarchy = cv2.findContours(
ValueError: not enough values to unpack (expected 3, got 2)
$ pip3 freeze | grep opencv-python
opencv-python==4.9.0.80