GithubHelp home page GithubHelp logo

lucifer1002 / elsed Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iago-suarez/elsed

0.0 0.0 0.0 1.99 MB

ELSED: Enhanced Line SEgment Drawing

License: Apache License 2.0

C++ 12.82% Python 0.42% CMake 0.16% Jupyter Notebook 86.61%

elsed's Introduction

Graffter Banner

ELSED: Enhanced Line SEgment Drawing

Open in Colab arXiv Project Page

This repository contains the source code of ELSED: Enhanced Line SEgment Drawing the fastest line segment detector in the literature. It is ideal for resource-limited devices like drones of smartphones. Visit the Project Webpage to try it online!

Graffter header image

Dependencies

The code depends on OpenCV (tested with version 4.1.1).

To install OpenCV ... In Ubuntu 18.04 compile it from sources with the following instructions:
# Install dependencies (Ubuntu 18.04)
sudo apt-get install -y build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
# Download source code
git clone https://github.com/opencv/opencv.git --branch 4.1.1 --depth 1
# Create build directory
cd opencv && mkdir build && cd build
# Generate makefiles, compile and install
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j
sudo make install

Using ELSED from python

To install the python wrappers you just have to run:

sudo apt-get install libopencv-dev
pip install setuptools
pip install git+https://github.com/iago-suarez/ELSED.git

And you can start playing with it:

import pyelsed
import cv2

img = cv2.imread('my_favourite_img.jpg', cv2.IMREAD_GRAYSCALE)
segments, scores = pyelsed.detect(img)

Using ELSED from C++

The code contains a demo detecting large and short line segments in one image. The code can be compiled with Cmake:

mkdir build && cd build
cmake .. && make
./elsed_main

The result for the provided image should be:

******************************************************
******************* ELSED main demo ******************
******************************************************
ELSED detected: 305 (large) segments
ELSED detected: 391 (short) segments

Cite

@article{suarez2022elsed,
      title={ELSED: Enhanced Line SEgment Drawing}, 
      author={Iago Suárez and José M. Buenaposada and Luis Baumela},
      journal = {Pattern Recognition},
      volume = {127},
      pages = {108619},
      year = {2022},
      issn = {0031-3203},
      doi = {https://doi.org/10.1016/j.patcog.2022.108619},
      url = {https://www.sciencedirect.com/science/article/pii/S0031320322001005}
}

elsed's People

Contributors

iago-suarez avatar mlourakis avatar enlnovius avatar

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.