Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharing my experience with a windows laptop #8

Open
baicaigithub opened this issue Jun 5, 2022 · 0 comments
Open

Sharing my experience with a windows laptop #8

baicaigithub opened this issue Jun 5, 2022 · 0 comments

Comments

@baicaigithub
Copy link

baicaigithub commented Jun 5, 2022

tl;dr: with some changes, this project still work in 2022. However the speed is not impressive, especially given there are solutions like YOLO which may be much faster.

Before I start, I have a windows laptop with core i5 1035g.

I tried using anaconda + conan + cmake, I gave up because I couldn't make cmake/gcc work correctly. In fact, I wish I had a linux machine to start with.

I switched to visual studio for compilation. It worked.

Things I changed:

  • Created a profile in conan with detection.
  • Need to place conan generated files to VS folder.
    conan install . -if=C:\Users\user\...\build\x64-Release
  • opencv version changed to 3.4.17, which is available in conan.
  • CourtLinePixelDetector.cpp:filterLinePixels, changed at<float> to at<Vec2f>(0,0)[0] and at<Vec2f>(0,0)[1]
  • CourtLineCandidateDetector::getRefinedParameters changed X.at<float>(0,i) to X.at<float>(i,0)

What I got:

  • Court detection works, even on clay court
  • Accuracy seems a bit low. I can see the physical line not overlapping with the drawn line
  • Speed is extremely slow on my laptop. 30s with power and 2min without power on a single 720p frame.

Video properties (frames: 272, w: 1280, h: 720, fps: 29)
Reading frame with index 136
Starting court line detection algorithm...
getLuminanceChannel 55.0567 ms
detectLinePixels 61.3653 ms
filterLinePixels 2149.21 ms
CourtLinePixelDetector::run 2270.32 ms
After binaryImage.
getRefinedParameters 467.52 ms
removeDuplicateLines 0.709 ms
getRefinedParameters 494.985 ms
removeDuplicateLines 1.4295 ms
getRefinedParameters 429.952 ms
removeDuplicateLines 1.1865 ms
getRefinedParameters 431.008 ms
removeDuplicateLines 1.3693 ms
getRefinedParameters 430.741 ms
removeDuplicateLines 1.1077 ms
CourtLineCandidateDetector::run 2297.78 ms
After candidateLines
findBestModelFit 25178.5 ms
TennisCourtFitter::run 25181.2 ms
LineDetection 29755.4 ms
Elapsed time: 29s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant