Giter Club home page Giter Club logo

Comments (12)

Tsypaev avatar Tsypaev commented on July 17, 2024 9

It work with opencv-python version 4.1.1.26 too.

from opencv-document-scanner.

maky-hnou avatar maky-hnou commented on July 17, 2024 8

I had the same issue with opencv-contrib-python==4.1.1.26 and opencv-python==4.1.1.26.
The solutions I ended to are:

  • Downgrade to opencv-contrib-python==4.0.0.21 and opencv-python==4.0.0.21.

  • According to this question on Stakoverflow, to replace the missing LineSegmentDetectorImpl, install pylsd using pip install pylsd. For more details about how to use it with opencv, please check the documentation.

from opencv-document-scanner.

barabanus avatar barabanus commented on July 17, 2024 7

It looks like LSD detector had been removed completely from the source tree since 4.1.0 release (see opencv/opencv@3ba49cc) =(

from opencv-document-scanner.

tangjie77wd avatar tangjie77wd commented on July 17, 2024 4

@akkitech @AchuThanFinstreet @barabanus I have solved my problem with the following solution :
#include <opencv2/ximgproc.hpp>
#include <opencv2/line_descriptor/descriptor.hpp>
using namespace cv::ximgproc;
{
...
vector lines;
Ptr<cv::ximgproc::FastLineDetector> detector = cv::ximgproc::createFastLineDetector();
detector->detect(roi, lines);
}
I have test it succeessfully.BTW,LSD detector has not been removed from opencv 4.10 but removed to cv::ximgproc from cv !

from opencv-document-scanner.

jeanchristopheruel avatar jeanchristopheruel commented on July 17, 2024 3

I suggest you all add a thumbs-up to this issue!
"Restore LineSegmentDetector LSD & avoid license conflict": #2524

from opencv-document-scanner.

AchuThanFinstreet avatar AchuThanFinstreet commented on July 17, 2024 1

After uninstalling current opencv-version and reinstalling old one (3.1.0.0) it works now without this error.

from opencv-document-scanner.

barabanus avatar barabanus commented on July 17, 2024 1

Thanks, @tangjie77wd, but it seems like it was removed completely from OpenCV 4.1.0 (see opencv/opencv@3ba49cc). I have found LSD line detector classes within contrib line_descriptor module, but if you try to call real detect() method the program will be terminated with "unimplemented" error. You use FastLineDetector, but it's not LSD: it's based on Canny edges detector (see http://vision.ucsd.edu/~jwlim/files/icra14linerec.pdf)

from opencv-document-scanner.

AchuThanFinstreet avatar AchuThanFinstreet commented on July 17, 2024

I got the same issue. Some solution here?

from opencv-document-scanner.

tangjie77wd avatar tangjie77wd commented on July 17, 2024

I got the same issue even if i choosed 'OPENCV_ENABLE_NONFEE' ! Someone told me his solution----re-run CMAKE with WITH_WIN32UI, since you are on Windows, and eventually with WITH_QT.

from opencv-document-scanner.

tangjie77wd avatar tangjie77wd commented on July 17, 2024

@barabanus Opencv shows an example https://docs.opencv.org/4.1.0/d1/d9e/fld_lines_8cpp-example.html which supports both LSD and FastLineDetector.How could they draw lines in the example if they did not imcomplete LSD ?
`// Because of some CPU's power strategy, it seems that the first running of
// an algorithm takes much longer. So here we run both of the algorithmes 10
// times to see each algorithm's processing time with sufficiently warmed-up
// CPU performance.
for(int run_count = 0; run_count < 10; run_count++) {
lines_lsd.clear();
int64 start_lsd = getTickCount();
lsd->detect(image, lines_lsd);
// Detect the lines with LSD
double freq = getTickFrequency();
double duration_ms_lsd = double(getTickCount() - start_lsd) * 1000 / freq;
std::cout << "Elapsed time for LSD: " << duration_ms_lsd << " ms." << std::endl;

    lines_fld.clear();
    int64 start = getTickCount();
    // Detect the lines with FLD
    fld->detect(image, lines_fld);
    double duration_ms = double(getTickCount() - start) * 1000 / freq;
    std::cout << "Ealpsed time for FLD " << duration_ms << " ms." << std::endl;
}
// Show found lines with LSD
Mat line_image_lsd(image);
lsd->drawSegments(line_image_lsd, lines_lsd);
imshow("LSD result", line_image_lsd);

// Show found lines with FLD
Mat line_image_fld(image);
fld->drawSegments(line_image_fld, lines_fld);
imshow("FLD result", line_image_fld);

`
Well ,I will try once i am free. Maybe we can not use LSD but FLD in the future.

from opencv-document-scanner.

nyamba avatar nyamba commented on July 17, 2024

After uninstalling current opencv-version and reinstalling old one (3.1.0.0) it works now without this error.

this is works to me. thanks!

from opencv-document-scanner.

frohro avatar frohro commented on July 17, 2024

Same issue here on Ubuntu 19.04.

from opencv-document-scanner.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.