andrewdcampbell / OpenCV-Document-Scanner

An interactive document scanner built in Python using OpenCV featuring automatic corner detection, image sharpening, and color thresholding.
479 stars 144 forks source link

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

Open dacrypt opened 3 years ago

dacrypt commented 3 years ago
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)
whps40506 commented 3 years ago

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😊

Pancham1603 commented 2 years ago

just use pip install -r requirements.txt