inkscape-centerline-trace

所属分类:内容生成
开发工具:Python
文件大小:2123KB
下载次数:0
上传日期:2020-11-26 17:56:42
上 传 者sh-1993
说明:  可以沿笔划中心线跟踪的位图矢量器。内置墨水风景跟踪位图只能传输...
(A bitmap vectorizer that can trace along the centerline of a stroke. The builtin inkscape trace bitmap can only trace edges, thus resulting in double lines for most basic use cases. It uses autotrace -centerline and an optimal threshold to vectorize a pixel image.)

文件列表:
LICENSE (18027, 2020-11-27)
Makefile (364, 2020-11-27)
autotrace-alternatives (0, 2020-11-27)
autotrace-alternatives\FROM.txt (535, 2020-11-27)
capture (0, 2020-11-27)
capture\cloud.png (373501, 2020-11-27)
capture\lumitile (21, 2020-11-27)
capture\opencv-capture.py (6605, 2020-11-27)
capture\pygame-capture.py (348, 2020-11-27)
centerline-trace-3-images-done.png (233475, 2020-11-27)
centerline-trace-poster.png (112323, 2020-11-27)
centerline-trace-poster.svg (46000, 2020-11-27)
centerline-trace-sheep.svg (51923, 2020-11-27)
centerline-trace.inx (2909, 2020-11-27)
centerline-trace.py (26723, 2020-11-27)
centerline-trace.sh (1291, 2020-11-27)
distribute (0, 2020-11-27)
distribute\deb (0, 2020-11-27)
distribute\deb\description-pak (358, 2020-11-27)
distribute\deb\dist.sh (705, 2020-11-27)
distribute\distribute.sh (1028, 2020-11-27)
distribute\win (0, 2020-11-27)
distribute\win\dist.sh (438, 2020-11-27)
distribute\win\inkscape-centerline-trace.nsi (753, 2020-11-27)
rof.py (2986, 2020-11-27)
testdata (0, 2020-11-27)
testdata\20190528_195103.jpg (992865, 2020-11-27)
testdata\3-images-done.svg (27170, 2020-11-27)
testdata\3-images.svg (2594, 2020-11-27)
testdata\adaptiveThreshold.py (759, 2020-11-27)
testdata\dolly.png (3834, 2020-11-27)
testdata\kringel.png (3513, 2020-11-27)
testdata\leaf-issue15.jpg (10854, 2020-11-27)
testdata\muggeley.jpg (310905, 2020-11-27)
testdata\pbm (0, 2020-11-27)
testdata\pbm\kringel_bw160.pbm (961, 2020-11-27)
testdata\pbm\kringel_bw161.pbm (961, 2020-11-27)
testdata\pbm\kringel_bw162.pbm (961, 2020-11-27)
... ...

inkscape-centerline-trace ========================= A bitmap vectorizer that can trace along the centerline of a stroke. The builtin inkscape 'trace bitmap' can only trace edges, thus resulting in double lines for most basic use cases. Download Source code and Debian/Ubuntu package NOTE: This is python2 code. It was developed and tested with inkscape-0.92.3 -- It probably does not run with inkscape 1.0.1 and should not be needed. Inkscape 1.0.1 has the feature built-in under Path -> Trace Bitmap -> Centerline tracing (autotrace) Written with python-Pillow. It uses 'autotrace -centerline' and an optimal threshold to vectorize a pixel image. See centerline-tracing.svg for an illustration of the idea. In inkscape it shows up under Extensions -> Images -> Centerline Trace ... Installation hints ------------------ * **Install the extension (all operating systems)** * the extension requires the installation of autotrace and python-pil (see below) * grab a [binary package](https://github.com/fablabnbg/inkscape-centerline-trace/releases) **or** * download the [zip file](https://github.com/fablabnbg/inkscape-centerline-trace/archive/master.zip) of [inkscape-centerline-trace](https://github.com/fablabnbg/inkscape-centerline-trace) and unpack it * copy the files centerline-trace.inx, centerline-trace.py to your Inkscape User extensions folder (see Edit > Preferences > System: System info: User extensions) * **Install autotrace / python-pil** * **Windows** * Instructions for Inkscape 0.92.2 and higher: * Install autotrace win***-setup.zip version 0.40.0 or later from e.g. https://github.com/autotrace/autotrace/releases Make sure the installation path is C:\Program Files (x86)\AutoTrace -- this application searches there. - Older version: [autotrace binary](https://github.com/scottvr/autotrace-win***-binaries/raw/master/bin/autotrace.exe) from [autotrace-win***-binaries github repo](https://github.com/scottvr/autotrace-win***-binaries)) Copy the downloaded autotrace.exe to Inkscape's User extensions folder, that should also work. * Instructions for Inkscape 0.92: https://inkscape.org/en/gallery/item/10567/centerline_NIH0Rhk.pdf * **MacOS** * Install autotrace MacOS.zip version 0.40.0 or later from e.g. https://github.com/autotrace/autotrace/releases * open a command line shell to install the python-PIL module: + `sudo easy_install install pip` + `sudo pip install pillow` * open a command line shell to install the inkscape extension: + `cd ~/.config/inkscape/extensions` + `curl https://raw.githubusercontent.com/fablabnbg/inkscape-centerline-trace/master/centerline-trace.py -o centerline-trace.py` + `curl https://raw.githubusercontent.com/fablabnbg/inkscape-centerline-trace/master/centerline-trace.inx -o centerline-trace.inx` * Please report success in the github issues. As of 2018-08-31, MacOS Support is back, but highly experimental. * **GNU/Linux** * Install the autotrace DEB package version 0.40.0 or later from e.g. https://github.com/autotrace/autotrace/releases * if you do not have pillow/pil installed, the extension will output an error message prompting you to install it. On Ubuntu and derivatives, run `sudo apt-get install python-pil` to install. * Finally, restart inkscape, and find CenterlineTrace in the `Extensions -> Images` menue. * Since Inkscape 1.0 the Autotrace library including the CenterlineTrace feature is integrated. That should obsolete this extension. Find an entry in the new `Path -> Trace Bitmap` dialog.
Algorithm --------- The input image is converted to a graymap and histogram normalized with PIL.ImageOps.autocontrast. Optional preprocessing: equal illumination, median denoise filter. Autotrace needs a bi-level bitmap. In order to find the best threshold value, we can run autotrace at multiple thresholds and evaluate the result candidates. We count the number of line segments produced and measure the total path length drawn. The svg that has the longest path but the least number of segments is returned.

近期下载者

相关文件


收藏者