Inkscape tutorial: Tracing bitmaps

Inkscape

Tutorial | Tracing bitmaps

One of the features in Inkscape is a tool for tracing a bitmap image into one or more <path> elements for your SVG drawing. These short notes should help you become acquainted with how it works.

트레이서의 목적은 원본 이미지의 정확한 복제를 재현하는 것이 아니며, 최종 제품을 제작하려는 의도도 아니라는 점을 명심하십시오. 어떤 오토트레이서도 그렇게 할 수 없습니다. 그것이 하는 일은 당신의 그림 자원으로 사용할 수 있는 곡선의 집합을 당신에게 제공하는 것입니다.

Our tracer, derived from the original Potrace library by Peter Selinger, interprets a black and white bitmap, and produces a set of curves. For Potrace, we currently have three types of input filters to convert from the raw image to something that Potrace can use.

일반적으로 중간 비트맵에서 어두운 픽셀이 많을수록 포트레이스가 더 많은 추적을 수행할 것입니다. 추적량이 증가함에 따라 CPU 시간이 더 필요하게 되며 <path> 요소는 훨씬 더 커질 것입니다. 출력 경로의 원하는 비율과 복잡성을 얻기 위해 점차 어두워지는 가벼운 중간 영상으로 먼저 사용자 실험을 하는 것이 좋습니다.

To use the tracer, load or import an image, select it, and select the PathTrace Bitmap item, or Shift+Alt+B.

The user will see the five filter options available:

  • 밝기 자르기

이는 픽셀의 적색, 녹색 및 청색(또는 회색 음영)의 합계를 흑백으로 간주해야 하는지 여부를 나타내는 지표로 사용할 뿐입니다. 임계값은 0.0(검은색)에서 1.0(흰색)까지 설정할 수 있습니다. 임계값 설정이 높을수록 "흰색"으로 간주할 수 있는 픽셀 수가 줄어들고 중간 이미지가 어두워집니다.

  • 가장자리 감지

이것은 유사한 대비의 등각선을 신속하게 찾는 방법으로 J. 캐니가 고안한 엣지 감지 알고리즘을 사용합니다. 이것은 밝기 임계값의 결과보다 원래 이미지와 덜 닮을 중간 비트맵을 생성하지만, 그렇지 않으면 무시될 수 있는 곡선 정보를 제공할 가능성이 있습니다. 여기서의 임계값 설정(0.0 – 1.0)은 대조 가장자리에 인접한 픽셀이 출력에 포함될지의 밝기 임계값을 조정합니다. 이 설정은 결과에서 가장자리의 어두움이나 두께를 조정할 수 있습니다.

  • 색상 양자화

이 필터의 결과는 다른 두 개와는 매우 다르지만 실제로 매우 유용한 중간 이미지를 만들어 낼 것입니다. 밝기 또는 대비의 등각선을 표시하는 대신, 동일한 밝기와 대비에서도 색이 변하는 가장자리를 찾을 것입니다. 여기서 설정한 색상 수(Number of Colors)는 중간 비트맵이 색일 경우 출력 색상을 결정합니다. 그런 다음 색상이 짝수인지 홀수인지에 따라 검정/흰색을 결정합니다.

사용자는 세 가지 필터를 모두 사용해 보고, 다양한 유형의 입력 이미지에 대해 다양한 출력 유형을 관찰해야 합니다. 언제나 한 사람이 다른 사람보다 더 잘 만든 이미지가 있을 것입니다.

After tracing, it is also suggested that the user try PathSimplify (Ctrl+L) on the output path to reduce the number of nodes. This can make the output of Potrace much easier to edit. For example, here is a typical tracing of the Old Man Playing Guitar:

Note the enormous number of nodes in the path. After hitting Ctrl+L, this is a typical result:

representation은 좀 더 대략적이고 거칠지만 그림은 훨씬 단순하고 편집하기 쉽습니다. 원하는 것은 이미지를 정확하게 렌더링하는 것이 아니라 도면에 사용할 수 있는 곡선의 집합이라는 것을 기억하십시오.

  • Autotrace

The Autotrace option uses a different algorithm for tracing and also offers some other parameters to tweak. It may take a little longer to work, but gives you some variety to choose from.

  • Centerline tracing (autotrace)

If you would like to vectorize a line drawing, and get strokes that are easy to modify instead of filled areas as a result, use this option. It will attempt to find contiguous lines that make up your drawing.

Authors: Bulia Byak; Jonathan Leighton; Colin Marquardt; Nicolas Dufour; Gellért Gyuris; Maren Hachmann

Translators: Heetae Hwang — 2019

Header / footer design: Esteban Capella — 2019