OpenCV-Document-Scanner icon indicating copy to clipboard operation
OpenCV-Document-Scanner copied to clipboard

ImportError: cannot import name 'lsd' from 'lsd'

Open dacrypt opened this issue 3 years ago • 2 comments

python3 scan.py --image sample_images/dollar_bill.JPG
Traceback (most recent call last):
  File "scan.py", line 20, in <module>
    from pylsd.lsd import lsd
  File "xx/Library/Python/3.8/lib/python/site-packages/pylsd/__init__.py", line 8, in <module>
    from lsd import lsd
ImportError: cannot import name 'lsd' from 'lsd' (/Users/david/Library/Python/3.8/lib/python/site-packages/lsd/__init__.py)

dacrypt avatar May 15 '21 21:05 dacrypt

pip install ocrd-fork-pylsd==0.0.3

After install that, it shows "Implementation has been removed due original code license issues in function 'cv::LineSegmentDetectorImpl::LineSegmentDetectorImpl'"

pip install opencv-contrib-python

It worked for me😊

whps40506 avatar Jun 04 '21 01:06 whps40506

just use pip install -r requirements.txt

Pancham1603 avatar Oct 05 '21 08:10 Pancham1603