line-segment-detector
LSD: Line Segment Detector compiled to js with emscripten
Last updated 4 years ago by juul .
AGPL-3.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install line-segment-detector 
SYNC missed versions from official npm registry.

This is a javascript version of the famous LSD (Line Segment Detector) algorithm. It was created using emscripten to compile the official C version into javascript and adding a bit of wrapper code to convert between javascript and C data types.

Currently only the main lsd() function call is available.

Usage

See example.js

Compiling

You don't need to compile this unless you change the C code. Just use the pre-compiled index.js and index.*.js files.

First install emscripten. On a Ubuntu 14.04 the following should work:

sudo apt-get install emscripten

On Ubuntu 16.04 there appears to be an issue with emscripten. You'll need to build emscripten using emsdk:

sudo apt-get install cmake build-essential git
wget "https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz"
tar cvzf emsdk-portable.tar.gz
cd emsdk-portable/
./emsdk update
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh

Now get the lsd source code:

cd line-segment-detector/
wget "http://www.ipol.im/pub/art/2012/gjmr-lsd/lsd_1.6.zip"
unzip lsd_1.6.zip

To build:

./build.sh

License

License is AGPLv3

Current Tags

  • 0.0.4                                ...           latest (4 years ago)

3 Versions

  • 0.0.4                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |