Difference between revisions of "Post process trace bitmap"

From Evil Mad Scientist Wiki
Jump to: navigation, search
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''This document is still being written'''
+
{{EggBotDocs210}}
 +
 
 +
 
 +
[[Name Poem|<<< Name Poem]] || Post process trace bitmap || [[Spiral Wrapped Text|Spiral Wrapped Text >>>]]
 +
 
 +
----
 +
 
 +
http://evilmadscience.s3.amazonaws.com/wiki/eggbot/trace/trace09.png
  
 
== Introduction ==
 
== Introduction ==
  
::''The "Post process trace bitmap" extension is an experimental extensionPresently, it is only available as a separate install.  See the Notes section at the end of this document for directions on obtaining and installing this extension.''
+
The "Post process trace bitmap" extension moves to distinct Inkscape layers each collection of regions of the same color or gray tone which were traced by Inkscape's "Trace Bitmap" toolThis extension can optionally remove the color fill applied by that tool, add outlines of the regions, or remove from the drawing the original bitmap image which was traced.
  
The "Post process trace bitmap" extension moves to distinct Inkscape layers, each collection of regions of the same color or gray tone which were traced by Inkscape's "Trace Bitmap" tool.  Additionally, this extension can optionally remove the color fill applied by that tool, optionally add outlines of the regions, and optionally remove from the drawing the original bitmap image which was traced.
+
In the presentation which follows, Inkscape's Trace Bitmap tool is discussedHowever, this is not a tutorial on the use of that tool.  For tutorials on tracing bitmaps, please see the links cited on the [[Tracing images]] page.
  
In the discussion which follows, Inkscape's Trace Bitmap tool is discussed.  However, the discussion is not a tutorial on the use of that tool.  For tutorials on tracing bitmaps, please see the links cited [[Tracing images]] page.
+
== Using the extension ==
  
== Step-by-step usage ==
+
As this extension assumes a specific usage of Inkscape's Trace Bitmap tool, the basic procedure of using that tool is demonstrated.  This demonstration does not concern itself with the tool's "single scan" options nor the options on tabs other than the tool's "Mode" tab.  Consequently, all the nuances of getting nice results from the Trace Bitmap tool are ignored in that which follows: those nuances are not relevant to the discussion at hand.
  
As this extension assumes a specific usage of Inkscape's Trace Bitmap tool, the basic procedure of using that tool is demonstratedThis demonstration does not concern itself with the tool's "single scan" options nor the options on tabs other than the tool's "Mode" tab.
+
'''1.''' First, begin with a new Inkscape drawingDo not attempt to operate on an existing drawing with other material in it.  When you are done using this extension, you can cut and paste the results to another drawing.
  
'''1.''' First, begin with a new Inkscape drawing.  Do not attempt to operate on an existing drawing with other material in it.  Once you are done, you can cut and paste your result to another drawing.  So, from the "File" menu, use the "New" item to create a new document.  Into that document, import your bitmap graphic using the "Import..." item under the "File" menu,
+
From the "File" menu, use the "New" item to begin a new document.  Into that document, import your bitmap graphic using the "Import..." item under the "File" menu,
  
http://mtbaldy.us/~dnewman/tspart/trace01.png
+
http://evilmadscience.s3.amazonaws.com/wiki/eggbot/trace/trace01.png
  
  
 
'''2.''' After you select the bitmap image file, you will be asked whether to embed the image in the new document or link to it.  Select "embed"  and click "OK",
 
'''2.''' After you select the bitmap image file, you will be asked whether to embed the image in the new document or link to it.  Select "embed"  and click "OK",
  
http://mtbaldy.us/~dnewman/tspart/trace02.png
+
http://evilmadscience.s3.amazonaws.com/wiki/eggbot/trace/trace02.png
  
  
 
'''3.''' Once the image is imported, position it somewhere on the drawing page,
 
'''3.''' Once the image is imported, position it somewhere on the drawing page,
  
http://mtbaldy.us/~dnewman/tspart/trace03.png
+
http://evilmadscience.s3.amazonaws.com/wiki/eggbot/trace/trace03.png
  
  
'''4.''' With the image select, choose the "Trace Bitmap..." option from the "Path" menu,
+
'''4.''' With the image selected, choose the "Trace Bitmap..." option from the "Path" menu,
  
http://mtbaldy.us/~dnewman/tspart/trace04.png
+
http://evilmadscience.s3.amazonaws.com/wiki/eggbot/trace/trace04.png
  
  
 
'''5.''' In the Trace Bitmap tool, use either the "Colors" or "Grays" mode of the "Multiple scans: create a group of paths" section.  Uncheck the "Stack scans" box.  The "Smooth" and "Remove background" boxes can be checked.  
 
'''5.''' In the Trace Bitmap tool, use either the "Colors" or "Grays" mode of the "Multiple scans: create a group of paths" section.  Uncheck the "Stack scans" box.  The "Smooth" and "Remove background" boxes can be checked.  
  
http://mtbaldy.us/~dnewman/tspart/trace05.png
+
http://evilmadscience.s3.amazonaws.com/wiki/eggbot/trace/trace05.png
  
  
 
'''6.'''  Set the number of scans to the desired number.  Then, click the "Update" button.  Adjust other settings as you see fit, but be sure to use either "Colors" or "Grays".  And be sure to leave "Stack scans" unchecked.
 
'''6.'''  Set the number of scans to the desired number.  Then, click the "Update" button.  Adjust other settings as you see fit, but be sure to use either "Colors" or "Grays".  And be sure to leave "Stack scans" unchecked.
  
http://mtbaldy.us/~dnewman/tspart/trace06.png
+
http://evilmadscience.s3.amazonaws.com/wiki/eggbot/trace/trace06.png
  
  
 
'''7.'''  Once you are satisfied with your results, click the "OK" button.  Then dismiss the Trace Bitmap window.  The result will then appear in your drawing.  The drawing may not  look too different than from before as the image is still embedded in it as well.
 
'''7.'''  Once you are satisfied with your results, click the "OK" button.  Then dismiss the Trace Bitmap window.  The result will then appear in your drawing.  The drawing may not  look too different than from before as the image is still embedded in it as well.
  
http://mtbaldy.us/~dnewman/tspart/trace07.png
+
http://evilmadscience.s3.amazonaws.com/wiki/eggbot/trace/trace07.png
  
  
 
'''8.''' Now, from the EggBot category of the "Extensions" menu, select the "Post process trace bitmap" item,
 
'''8.''' Now, from the EggBot category of the "Extensions" menu, select the "Post process trace bitmap" item,
  
http://mtbaldy.us/~dnewman/tspart/trace08.png
+
http://evilmadscience.s3.amazonaws.com/wiki/eggbot/trace/trace08.png
 +
 
 +
 
 +
'''Note:''' This extension now appears in the "Eggbot Contributed" submenu of the extensions menu.
  
  
 
'''9.''' When the extension is launched, you will be given several options.  Check the box to remove the original image from your drawing.  Check or uncheck the other two items according to your needs.  Then click the "Apply" button.
 
'''9.''' When the extension is launched, you will be given several options.  Check the box to remove the original image from your drawing.  Check or uncheck the other two items according to your needs.  Then click the "Apply" button.
  
http://mtbaldy.us/~dnewman/tspart/trace09.png
+
http://evilmadscience.s3.amazonaws.com/wiki/eggbot/trace/trace09.png
  
  
 
'''10.''' After the extension runs, you will be presented with a window indicating how many layers were created.  Click the "OK" button.  Then, to dismiss the extension window, click its "Close" button.  Within your drawing window, you can examine the various layers with the "Layers..." item under the "Layer" menu.  In the following figure, several layers have been turned off,
 
'''10.''' After the extension runs, you will be presented with a window indicating how many layers were created.  Click the "OK" button.  Then, to dismiss the extension window, click its "Close" button.  Within your drawing window, you can examine the various layers with the "Layers..." item under the "Layer" menu.  In the following figure, several layers have been turned off,
  
http://mtbaldy.us/~dnewman/tspart/trace10.png
+
http://evilmadscience.s3.amazonaws.com/wiki/eggbot/trace/trace10.png
 +
 
 +
== Options ==
 +
 
 +
The extension provides three options:
 +
 
 +
;Remove original bitmap image?:Checking this box will remove '''all''' images within the current document.  So, the question is a little misleading.  However, the intent is to automatically remove the traced bitmap image, saving you that step.  Check the checkbox if you'd like the images to be removed.
  
== Notes ==
+
;Fill each traced region with color?:The results of the Trace Bitmap tool will normally have the scanned regions each filled with the ""scanned" color.  Leaving this box checked will preserve those fills.  If you wish the fills turned off, then uncheck this box.
  
Currently, this extension is experimental.  It is not included with the Eggbot software packageYou will need to download it from the Eggbot code site as the zip file eggbot_pptb_x_y.zip,
+
;Outline each traced region?:The Trace Bitmap tool only fills the regions it traces.  It does not outline them.  By checking this box, each traced region will be outlinedThe color of the outline will correspond to the "scanned" color for that region.  Note that the outlines for each region may overlap one another.  This is because SVG does not provide a means of specifying an "inset" outline.  Instead the outline strokes have a non-zero width and half of this width falls outside of the region being outlined.  The other half falls inside the region.  
  
[http://code.google.com/p/eggbotcode/downloads/list http://code.google.com/p/eggbotcode/downloads/list]
+
----
  
Unzip that file and place the eggbot_pptb.py and eggbot_pptb.inx files in your Inkscape extensions directory.  Putting it in your account's private extension directory is not recommended: there may be future conflicts if this extension is included with the Eggbot software package.
+
[[Name Poem|<<< Name Poem]] || Post process trace bitmap || [[Spiral Wrapped Text|Spiral Wrapped Text >>>]]

Revision as of 13:40, 1 August 2013

eggbottiny.jpg This wiki page is part of the documentation for the Egg-Bot kit. Click here to return to the Egg-Bot overview.
The specifics of this portion assume that you have version 2.1.0 or higher of the Eggbot extensions installed.
Click here if you need help determining which version you have installed.


<<< Name Poem || Post process trace bitmap || Spiral Wrapped Text >>>


trace09.png

Introduction

The "Post process trace bitmap" extension moves to distinct Inkscape layers each collection of regions of the same color or gray tone which were traced by Inkscape's "Trace Bitmap" tool. This extension can optionally remove the color fill applied by that tool, add outlines of the regions, or remove from the drawing the original bitmap image which was traced.

In the presentation which follows, Inkscape's Trace Bitmap tool is discussed. However, this is not a tutorial on the use of that tool. For tutorials on tracing bitmaps, please see the links cited on the Tracing images page.

Using the extension

As this extension assumes a specific usage of Inkscape's Trace Bitmap tool, the basic procedure of using that tool is demonstrated. This demonstration does not concern itself with the tool's "single scan" options nor the options on tabs other than the tool's "Mode" tab. Consequently, all the nuances of getting nice results from the Trace Bitmap tool are ignored in that which follows: those nuances are not relevant to the discussion at hand.

1. First, begin with a new Inkscape drawing. Do not attempt to operate on an existing drawing with other material in it. When you are done using this extension, you can cut and paste the results to another drawing.

From the "File" menu, use the "New" item to begin a new document. Into that document, import your bitmap graphic using the "Import..." item under the "File" menu,

trace01.png


2. After you select the bitmap image file, you will be asked whether to embed the image in the new document or link to it. Select "embed" and click "OK",

trace02.png


3. Once the image is imported, position it somewhere on the drawing page,

trace03.png


4. With the image selected, choose the "Trace Bitmap..." option from the "Path" menu,

trace04.png


5. In the Trace Bitmap tool, use either the "Colors" or "Grays" mode of the "Multiple scans: create a group of paths" section. Uncheck the "Stack scans" box. The "Smooth" and "Remove background" boxes can be checked.

trace05.png


6. Set the number of scans to the desired number. Then, click the "Update" button. Adjust other settings as you see fit, but be sure to use either "Colors" or "Grays". And be sure to leave "Stack scans" unchecked.

trace06.png


7. Once you are satisfied with your results, click the "OK" button. Then dismiss the Trace Bitmap window. The result will then appear in your drawing. The drawing may not look too different than from before as the image is still embedded in it as well.

trace07.png


8. Now, from the EggBot category of the "Extensions" menu, select the "Post process trace bitmap" item,

trace08.png


Note: This extension now appears in the "Eggbot Contributed" submenu of the extensions menu.


9. When the extension is launched, you will be given several options. Check the box to remove the original image from your drawing. Check or uncheck the other two items according to your needs. Then click the "Apply" button.

trace09.png


10. After the extension runs, you will be presented with a window indicating how many layers were created. Click the "OK" button. Then, to dismiss the extension window, click its "Close" button. Within your drawing window, you can examine the various layers with the "Layers..." item under the "Layer" menu. In the following figure, several layers have been turned off,

trace10.png

Options

The extension provides three options:

Remove original bitmap image?
Checking this box will remove all images within the current document. So, the question is a little misleading. However, the intent is to automatically remove the traced bitmap image, saving you that step. Check the checkbox if you'd like the images to be removed.
Fill each traced region with color?
The results of the Trace Bitmap tool will normally have the scanned regions each filled with the ""scanned" color. Leaving this box checked will preserve those fills. If you wish the fills turned off, then uncheck this box.
Outline each traced region?
The Trace Bitmap tool only fills the regions it traces. It does not outline them. By checking this box, each traced region will be outlined. The color of the outline will correspond to the "scanned" color for that region. Note that the outlines for each region may overlap one another. This is because SVG does not provide a means of specifying an "inset" outline. Instead the outline strokes have a non-zero width and half of this width falls outside of the region being outlined. The other half falls inside the region.

<<< Name Poem || Post process trace bitmap || Spiral Wrapped Text >>>