https://github.com/anuj-kosambi/autosvg
Autosvg is tracing tool, which can convert image format like (jpg,png,gif) into vector
https://github.com/anuj-kosambi/autosvg
automatic autosvg convert image jpg jpg-to-svg png png-to-svg svg trace
Last synced: 7 months ago
JSON representation
Autosvg is tracing tool, which can convert image format like (jpg,png,gif) into vector
- Host: GitHub
- URL: https://github.com/anuj-kosambi/autosvg
- Owner: anuj-kosambi
- Created: 2020-05-23T11:34:20.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T07:49:58.000Z (almost 2 years ago)
- Last Synced: 2024-08-05T09:12:21.817Z (11 months ago)
- Topics: automatic, autosvg, convert, image, jpg, jpg-to-svg, png, png-to-svg, svg, trace
- Language: JavaScript
- Homepage: https://autosvg.now.sh
- Size: 4.19 MB
- Stars: 120
- Watchers: 5
- Forks: 22
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- image2svg-awesome - autosvg
README
# AutoSvg
[](#contributors-)
Autosvg is tracing tool, which can convert image format like (jpg,png,gif) into vector svg.
You can check your result here (Live Demo)[https://autosvg.now.sh].### Results
#### Clipart tracing

#### Logo tracing

#### Image tracing
### Building AutoSVG-WASM.js
#### Prerequisite
- cmake, boost, python
- MacOS
```bash
> brew install cmake boost
```#### Automatic Setup
```bash
> git submodule update --init> sh build.sh
```#### Manual Setup
```bash
#
# https://github.com/emscripten-core/emsdk.git
#
export EMSDK=< path to Emscripten SDK repo>
#
# https://github.com/opencv/opencv.git
#
export OPENCV_SDK=
#
# https://github.com/dpilger26/NumCpp.git
#
export NUMCPP=
```- Build Emscripten
> https://emscripten.org/docs/getting_started/downloads.html- Build OpenCV WASM
```bash
cd $OPENCV_SDK
python ./platforms/js/build_js.py build_wasm --build_wasm
cd ../..
```- Run cmake building script for emscripten tool chain via
```bash
> cmake -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
```
- Run make command to complile source code and building WASM file.
```bash
> make
Scanning dependencies of target autosvg-wasm
[ 25%] Building CXX object CMakeFiles/autosvg-wasm.dir/src/cpp/AutosvgWASM.cpp.o
[ 50%] Building CXX object CMakeFiles/autosvg-wasm.dir/src/cpp/core/Operations.cpp.o
[ 75%] Building CXX object CMakeFiles/autosvg-wasm.dir/src/cpp/utils/CurveUtils.cpp.o
[100%] Linking CXX executable autosvg-wasm.js
[100%] Built target autosvg-wasm
```
- Copy wasm files to ui-app public folder.
```bash
cp autosvg-wasm.* src/autosvg_ui/public
```### Running AutoSVG-UI
```bash
> cd src/autosvg_ui/ && npm install
> npm run start
```## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!