Code Monkey home page Code Monkey logo

pytlsd's Introduction

pytlsd

Python transparent bindings for LSD (Line Segment Detector)

Bindings over the original C implementation of LSD, that allows to change the different thresholds involved and to provide custom image gradientes in order to compute the method with stronger features.

Install

The current instructions were tested under Ubuntu 22.04:

sudo apt-get install build-essential cmake libopencv-dev
git clone --recursive https://github.com/iago-suarez/pytlsd.git
cd pytlsd
pip3 install -r requirements.txt
pip3 install .

Execution

python3 tests/test.py

pytlsd's People

Contributors

b1ueber2y avatar iago-suarez avatar rpautrat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pytlsd's Issues

ERROR: Could not build wheels for pytlsd, which is required to install pyproject.toml-based projects

Hi, Dr Iago Suárez,

I tried to install pytlsd on Windows, but an error occurred when
pip3 install .

The log is as follows,

(kaolinpy310) F:\0_School\Research\DTG\FacadeGeneration\DeepLSD\third_party\pytlsd>pip3 install .
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing f:\0_school\research\dtg\facadegeneration\deeplsd\third_party\pytlsd
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pytlsd
Building wheel for pytlsd (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for pytlsd (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [87 lines of output]
running bdist_wheel
running build
running build_ext
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22000.
-- The C compiler identification is MSVC 19.37.32825.0
-- The CXX compiler identification is MSVC 19.37.32825.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: E:/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: E:/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:8 (add_subdirectory):
The source directory

      F:/0_School/Research/DTG/FacadeGeneration/DeepLSD/third_party/pytlsd/pybind11

    does not contain a CMakeLists.txt file.


  --     OpenCV_DIR: E:/opencv-4.7.0-windows/opencv/build/x64/vc16/lib
  --     OpenCV_INCLUDE_DIRS: E:/opencv-4.7.0-windows/opencv/build/include
  --     OpenCV_LIBS: opencv_calib3dopencv_coreopencv_dnnopencv_features2dopencv_flannopencv_gapiopencv_highguiopencv_imgcodecsopencv_imgprocopencv_mlopencv_objdetectopencv_photoopencv_stitchingopencv_videoopencv_videoioopencv_world
  CMake Error at CMakeLists.txt:24 (pybind11_add_module):
    Unknown CMake command "pybind11_add_module".


  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "E:\miniconda3\envs\kaolinpy310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "E:\miniconda3\envs\kaolinpy310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "E:\miniconda3\envs\kaolinpy310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\build_meta.py", line 434, in build_wheel
      return self._build_with_temp_dir(
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\build_meta.py", line 419, in _build_with_temp_dir
      self.run_setup()
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
      exec(code, locals())
    File "<string>", line 138, in <module>
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\dist.py", line 989, in run_command
      super().run_command(command)
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 364, in run
      self.run_command("build")
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\dist.py", line 989, in run_command
      super().run_command(command)
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
      self.run_command(cmd_name)
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\dist.py", line 989, in run_command
      super().run_command(command)
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\command\build_ext.py", line 88, in run
      _build_ext.run(self)
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
      self.build_extensions()
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions
      self._build_extensions_serial()
    File "C:\Users\BotaoPeng\AppData\Local\Temp\pip-build-env-681vxrn6\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_serial
      self.build_extension(ext)
    File "<string>", line 129, in build_extension
    File "E:\miniconda3\envs\kaolinpy310\lib\subprocess.py", line 526, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['cmake', 'F:\\0_School\\Research\\DTG\\FacadeGeneration\\DeepLSD\\third_party\\pytlsd', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=F:\\0_School\\Research\\DTG\\FacadeGeneration\\DeepLSD\\third_party\\pytlsd\\build\\lib.win-amd64-cpython-310\\', '-DPYTHON_EXECUTABLE=E:\\miniconda3\\envs\\kaolinpy310\\python.exe', '-DCMAKE_BUILD_TYPE=Release', '-DEXAMPLE_VERSION_INFO=0.0.4', '-A', 'x64', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=F:\\0_School\\Research\\DTG\\FacadeGeneration\\DeepLSD\\third_party\\pytlsd\\build\\lib.win-amd64-cpython-310']' returned non-zero exit status 1.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pytlsd
Failed to build pytlsd
ERROR: Could not build wheels for pytlsd, which is required to install pyproject.toml-based projects

Would it be possible for you to help me solve this problem? BTW, I don't understand what you mean transparent bindings? Do you make the functions of original LSD more customized?

Thanks a lot!

Execution of the project

Hi, on commit 579383d you deleted the test.py file from tests folder. Is there another way to execute a test? If yes, I'd say to update the last part of the README :)

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.