[gimp-help] Update Foreground select tool. Delete orphan images.
- From: Julien Hardlin <jhardlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-help] Update Foreground select tool. Delete orphan images.
- Date: Mon, 22 Apr 2019 05:21:58 +0000 (UTC)
commit d0074ff01363fb719d9da1727af527369f8bd652
Author: Julien Hardelin <jhardlin orange fr>
Date: Mon Apr 22 07:21:15 2019 +0200
Update Foreground select tool. Delete orphan images.
images/C/filters/artistic/applycanvas.png | Bin 41050 -> 0 bytes
images/C/filters/artistic/cubism.png | Bin 48297 -> 0 bytes
images/C/filters/artistic/photocopy.png | Bin 25598 -> 0 bytes
images/C/filters/decor/fog.png | Bin 8256 -> 0 bytes
images/C/filters/distort/blinds.png | Bin 45120 -> 0 bytes
images/C/filters/distort/erase_rows.png | Bin 12563 -> 0 bytes
.../filters/edge-detect/image_gradient-dialog.png | Bin 16296 -> 0 bytes
images/C/filters/edge-detect/laplace-dialog.jpg | Bin 16344 -> 0 bytes
.../C/filters/examples/artistic/slic-ex-orig.jpg | Bin 15172 -> 0 bytes
images/C/filters/examples/distort-taj-blinds.jpg | Bin 36719 -> 0 bytes
.../filters/examples/distort/ripple-ex-period.png | Bin 5006 -> 0 bytes
images/C/filters/examples/example-map-warp1.png | Bin 6600 -> 0 bytes
images/C/filters/examples/example-map-warp2.png | Bin 10620 -> 0 bytes
images/C/filters/examples/example-map-warp3.png | Bin 9026 -> 0 bytes
images/C/filters/examples/example-map-warp4.png | Bin 1887 -> 0 bytes
images/C/filters/examples/example-map-warp5.png | Bin 1676 -> 0 bytes
images/C/filters/examples/example-map-warp6.png | Bin 9837 -> 0 bytes
images/C/filters/examples/example-map-warp7.png | Bin 3050 -> 0 bytes
images/C/filters/examples/example-map-warp8.png | Bin 7800 -> 0 bytes
.../C/filters/examples/generic/dist_map-high-2.png | Bin 11881 -> 0 bytes
images/C/filters/examples/map-taj-smalltile.jpg | Bin 23140 -> 0 bytes
images/C/filters/examples/taj_rows.jpg | Bin 24736 -> 0 bytes
images/C/filters/light-and-shadow/glasstile.png | Bin 15321 -> 0 bytes
images/C/toolbox/FG-select-Levin.png | Bin 0 -> 121847 bytes
images/C/toolbox/FG-select-contig1.png | Bin 3642 -> 0 bytes
images/C/toolbox/FG-select-contig2.png | Bin 2991 -> 0 bytes
images/C/toolbox/FG-select-contig3.png | Bin 3917 -> 0 bytes
images/C/toolbox/FG-select-dialog.png | Bin 0 -> 15854 bytes
images/C/toolbox/FG-select-draw-bg.png | Bin 0 -> 42135 bytes
images/C/toolbox/FG-select-draw.png | Bin 0 -> 145708 bytes
images/C/toolbox/FG-select-ex1.png | Bin 50350 -> 0 bytes
images/C/toolbox/FG-select-ex2.png | Bin 49984 -> 0 bytes
images/C/toolbox/FG-select-ex3.png | Bin 48451 -> 0 bytes
images/C/toolbox/FG-select-ex4.png | Bin 53789 -> 0 bytes
images/C/toolbox/FG-select-mask.png | Bin 0 -> 127341 bytes
images/C/toolbox/FG-select-options.png | Bin 7173 -> 0 bytes
images/C/toolbox/FG-select-pop-up.png | Bin 0 -> 5765 bytes
images/C/toolbox/FG-select-result.png | Bin 0 -> 126940 bytes
images/C/toolbox/FG-select-select.png | Bin 0 -> 168444 bytes
images/C/toolbox/FG-select-toolbox.png | Bin 9205 -> 30242 bytes
images/C/toolbox/FG-select-unknown.png | Bin 0 -> 23271 bytes
src/toolbox/selection/common-features.xml | 11 +-
src/toolbox/selection/foreground.xml | 445 +++++++++++----------
43 files changed, 232 insertions(+), 224 deletions(-)
---
diff --git a/images/C/toolbox/FG-select-Levin.png b/images/C/toolbox/FG-select-Levin.png
new file mode 100644
index 000000000..b94004e82
Binary files /dev/null and b/images/C/toolbox/FG-select-Levin.png differ
diff --git a/images/C/toolbox/FG-select-dialog.png b/images/C/toolbox/FG-select-dialog.png
new file mode 100644
index 000000000..2bb93f510
Binary files /dev/null and b/images/C/toolbox/FG-select-dialog.png differ
diff --git a/images/C/toolbox/FG-select-draw-bg.png b/images/C/toolbox/FG-select-draw-bg.png
new file mode 100644
index 000000000..ff264ef37
Binary files /dev/null and b/images/C/toolbox/FG-select-draw-bg.png differ
diff --git a/images/C/toolbox/FG-select-draw.png b/images/C/toolbox/FG-select-draw.png
new file mode 100644
index 000000000..918be14ac
Binary files /dev/null and b/images/C/toolbox/FG-select-draw.png differ
diff --git a/images/C/toolbox/FG-select-mask.png b/images/C/toolbox/FG-select-mask.png
new file mode 100644
index 000000000..04bacc672
Binary files /dev/null and b/images/C/toolbox/FG-select-mask.png differ
diff --git a/images/C/toolbox/FG-select-pop-up.png b/images/C/toolbox/FG-select-pop-up.png
new file mode 100644
index 000000000..a4b83fdf5
Binary files /dev/null and b/images/C/toolbox/FG-select-pop-up.png differ
diff --git a/images/C/toolbox/FG-select-result.png b/images/C/toolbox/FG-select-result.png
new file mode 100644
index 000000000..d05d3d6c1
Binary files /dev/null and b/images/C/toolbox/FG-select-result.png differ
diff --git a/images/C/toolbox/FG-select-select.png b/images/C/toolbox/FG-select-select.png
new file mode 100644
index 000000000..3bebb60e9
Binary files /dev/null and b/images/C/toolbox/FG-select-select.png differ
diff --git a/images/C/toolbox/FG-select-toolbox.png b/images/C/toolbox/FG-select-toolbox.png
index b95fec694..df8b4f134 100644
Binary files a/images/C/toolbox/FG-select-toolbox.png and b/images/C/toolbox/FG-select-toolbox.png differ
diff --git a/images/C/toolbox/FG-select-unknown.png b/images/C/toolbox/FG-select-unknown.png
new file mode 100644
index 000000000..c6539eb01
Binary files /dev/null and b/images/C/toolbox/FG-select-unknown.png differ
diff --git a/src/toolbox/selection/common-features.xml b/src/toolbox/selection/common-features.xml
index 833f56069..cb03523b8 100644
--- a/src/toolbox/selection/common-features.xml
+++ b/src/toolbox/selection/common-features.xml
@@ -2,11 +2,7 @@
<!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.docbook.org/xml/4.3/docbookx.dtd">
<!-- section history:
- 2012-05-03 j.h: update to v2.8
- 2006-07-24 lexa: enhanced docbook compliance
- 2006-06-15 changed Ctrl and Shift sections by j.h
- 2006-02-17 added section for Space bar by j.h
- 2005-12-07 replaced <simplesect> by <sect3> by lexa
+ 2019-04-12 j.h: update to v-2.10
-->
<sect2 id="gimp-tool-select">
<title>Common Features</title>
@@ -356,6 +352,11 @@
further information regarding feathering, see the glossary entry
<link linkend="glossary-feathering">Feathering</link>.
</para>
+ <para>
+ When this option is checked, a <guilabel>Radius</guilabel> option
+ appears. Default value is 10 pixels: higher image resolution,
+ higher radius.
+ </para>
</listitem>
</varlistentry>
</variablelist>
diff --git a/src/toolbox/selection/foreground.xml b/src/toolbox/selection/foreground.xml
index 9e6a79fb6..3655450d9 100644
--- a/src/toolbox/selection/foreground.xml
+++ b/src/toolbox/selection/foreground.xml
@@ -2,15 +2,10 @@
<!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.docbook.org/xml/4.3/docbookx.dtd">
<!-- section history:
- 2008-03-23 JPL reviewed for fr
- 2008-01-12 PP reviewed for fr
- 2007-11-11 KoSt: added 'no'
- 2007-11-02 Dust : added 'ko'
- 2007-10-06 lexa: review for de
- 2007-09-14 AntI: Added 'es'
- 2007-07-26 en;fr created by j.h
+ 2019-04-12 j.h: update to v-2.10
-->
-<sect2 xmlns:xi="http://www.w3.org/2001/XInclude" id="gimp-tool-foreground-select">
+<sect2
+xmlns:xi="http://www.w3.org/2001/XInclude" id="gimp-tool-foreground-select">
<title>Foreground Select</title>
<indexterm>
@@ -36,15 +31,61 @@
<para>
This tool lets you extract the foreground from the active layer or from a
- selection. It is based on the SIOX method (Simple Interactive Object
- Extraction). You can visit its Web page at
- <xref linkend="bibliography-online-siox"/>.
+ selection. With <acronym>GIMP</acronym>-2.10, selection refinement has
+ been improved. After the selection is made, with its marching ants, you can
+ copy-paste or click-and-drag it to another image used as background,and,
+ inverting the selection, you can can make changes in background.
</para>
- <sect3 id="tool-fg-select-usage">
+
+ <sect3>
+ <title>Activating the Tool</title>
+ <para>
+ You can activate the Foreground Select tool in two ways:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ by clicking on the tool icon
+ <guiicon>
+ <inlinegraphic
+ fileref="images/toolbox/stock-tool-foreground-select-22.png"/>
+ </guiicon>
+ in the Toolbox,
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ through
+ <menuchoice>
+ <guimenu>Tools</guimenu>
+ <guisubmenu>Selection Tools</guisubmenu>
+ <guimenuitem>Foreground Select</guimenuitem>
+ </menuchoice>
+ in the image menu.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ This tool has no shortcut, but you can set one using
+ <menuchoice>
+ <guimenu>Edit</guimenu>
+ <guisubmenu>Preferences</guisubmenu>
+ <guisubmenu>Interface</guisubmenu>
+ <guisubmenu>Configure Keyboard Shortcuts</guisubmenu>
+ <guisubmenu>Tools</guisubmenu>
+ <guimenuitem>Foreground Select</guimenuitem>
+ </menuchoice>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </sect3>
+
+ <sect3 id="tool-fg-select-usage">
<title>Directions for use</title>
<para>
- The creation of a selection with this tool works in a couple of steps:
+ Let us start with an object distinctly different from background, not
+ needing to be refined.
</para>
<procedure>
<step>
@@ -55,21 +96,73 @@
Select as little as possible from the background.
</para>
<para>
- As soon as you release the mouse button, the non selected part of
- the image is covered with a dark blue mask. If the selection is not
- closed, its ends will be linked automatically together by a straight
- line. The mouse pointer goes now with the Paint-brush icon for the
- next step.
+ When the mouse pointer comes over line beginning, a small yellow
+ circle appears: release mouse button to close selection. While
+ selecting, click-and-drag draws a fuzzy line, drag only draws a
+ straight line.
</para>
- <figure>
- <title>The foreground is roughly selected</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata format="PNG"
+ fileref="images/toolbox/FG-select-select.png"/>
+ </imageobject>
+ <caption>
+ <para>
+ The selection is closed.
+ </para>
+ </caption>
+ </mediaobject>
+ <para>
+ As soon you click to start drawing, a small window pops up:
<mediaobject>
<imageobject>
<imagedata format="PNG"
- fileref="images/toolbox/FG-select-ex1.png"/>
+ fileref="images/toolbox/FG-select-pop-up.png"/>
</imageobject>
</mediaobject>
- </figure>
+ There you have:
+ <itemizedlist>
+ <listitem>
+ <para>
+ A <guilabel>Preview</guilabel> checkbox that toggles displaying
+ a preview of the foreground extraction status.
+ <keycap>Esc</keycap> key also toggles this preview.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ A little <emphasis>cross</emphasis> to quit: returns to the
+ original image.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ A <guibutton>Select</guibutton> button: not active for the
+ moment.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </step>
+ <step>
+ <para>
+ <emphasis>Press <keycap>Enter</keycap></emphasis> to
+ create the <emphasis>mask</emphasis>:
+ <mediaobject>
+ <imageobject>
+ <imagedata format="PNG"
+ fileref="images/toolbox/FG-select-mask.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>
+ The mouse pointer goes now with the Paint-brush icon.
+ The dark blue area (this color can be changed) is for background. The
+ light blue area covers the zone you have selected, on which you will
+ paint to extract foreground. Between foreground area and background
+ is a zone you have selected belonging to background named
+ <emphasis>Unknown pixels area</emphasis>.
+ </para>
</step>
<step>
<para>
@@ -80,129 +173,55 @@
importance; not using the same color as foreground is better. Be
careful not painting background pixels.
</para>
- <figure>
- <title>The line drawn on the foreground</title>
+ <para>
+ With this one-color object distinctly different from background, a
+ few strokes are enough:
<mediaobject>
<imageobject>
- <imagedata format="PNG"
- fileref="images/toolbox/FG-select-ex2.png"/>
+ <imagedata format="PNG"
+ fileref="images/toolbox/FG-select-draw.png"/>
</imageobject>
- <caption>
- <para>
- In this example, it is important that the line goes over the
- yellow capitulum of the flower.
- </para>
- </caption>
</mediaobject>
- </figure>
+ </para>
</step>
<step>
<para>
- When you release the mouse button, all non-selected areas are in
- dark:
- </para>
- <figure>
- <title>The area which will be selected</title>
+ <emphasis>Toggle preview</emphasis> to verify result.
<mediaobject>
<imageobject>
- <imagedata format="PNG"
- fileref="images/toolbox/FG-select-ex3.png"/>
+ <imagedata format="PNG"
+ fileref="images/toolbox/FG-select-result.png"/>
</imageobject>
</mediaobject>
- </figure>
+ </para>
+ <note>
+ <para>
+ This <guilabel>Preview mask</guilabel> is a mask: you can draw
+ directly on it and see result immediately.
+ </para>
+ </note>
</step>
<step>
<para>
- You still have to press the <keycap>Enter</keycap> key to get the
- wanted selection:
- </para>
- <figure>
- <title>Foreground is selected</title>
+ Try <guilabel>Matting Levin</guilabel> engine that may improve result.
<mediaobject>
<imageobject>
- <imagedata fileref="images/toolbox/FG-select-ex4.png" format="PNG"/>
+ <imagedata format="PNG"
+ fileref="images/toolbox/FG-select-Levin.png"/>
</imageobject>
</mediaobject>
- </figure>
- </step>
- </procedure>
- <note>
- <para>
- Until you press <keycap>Enter</keycap>, you can't undo this selection
- by
- <keycombo>
- <keycap>Ctrl</keycap><keycap>Z</keycap>
- </keycombo> nor by
- <menuchoice>
- <guimenu>Select</guimenu>
- <guimenuitem>None</guimenuitem>
- </menuchoice>,
- and the Undo History is not concerned. To delete this selection, you
- must select another tool.
- </para>
- </note>
- </sect3>
-
- <sect3>
- <title>Activating the Tool</title>
- <para>
- You can activate the Foreground Select tool in two ways:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- by clicking on the tool icon
- <guiicon>
- <inlinegraphic
- fileref="images/toolbox/stock-tool-foreground-select-22.png"/>
- </guiicon>
- in the Toolbox,
</para>
- </listitem>
- <listitem>
+ </step>
+ <step>
<para>
- through
- <menuchoice>
- <guimenu>Tools</guimenu>
- <guisubmenu>Selection Tools</guisubmenu>
- <guimenuitem>Foreground Select</guimenuitem>
- </menuchoice>
- in the image menu.
+ When you are satisfied with result, click on
+ <guibutton>Select</guibutton> button to get the selection of the
+ foreground with its marching ants.
</para>
- </listitem>
- <listitem>
- <para>
- This tool has no shortcut, but you can set one using
- <menuchoice>
- <guimenu>Edit</guimenu>
- <guisubmenu>Preferences</guisubmenu>
- <guisubmenu>Interface</guisubmenu>
- <guisubmenu>Configure Keyboard Shortcuts</guisubmenu>
- <guisubmenu>Tools</guisubmenu>
- <guimenuitem>Foreground Select</guimenuitem>
- </menuchoice>
- </para>
- </listitem>
- </itemizedlist>
- </sect3>
-
- <sect3>
- <title>Key modifiers (Defaults)</title>
- <variablelist>
- <varlistentry>
- <term>
- <keycap>Ctrl</keycap>
- </term>
- <listitem>
- <para>
- By pressing the <keycap>Ctrl</keycap> key, you can switching
- between foreground and background selection painting.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
+ </step>
+ </procedure>
</sect3>
-
+
<sect3>
<title>Options</title>
<figure>
@@ -210,7 +229,7 @@
<mediaobject>
<imageobject>
<imagedata format="PNG"
- fileref="images/toolbox/FG-select-options.png"/>
+ fileref="images/toolbox/FG-select-dialog.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -219,133 +238,121 @@
<variablelist>
<varlistentry>
- <term>Mode; Antialiasing; Feather edges</term>
+ <term>Mode; Feather edges</term>
<listitem>
<xi:include href="about-common-select-options.xml"/>
</listitem>
</varlistentry>
<varlistentry>
- <term>Contiguous</term>
+ <term>Draw mode</term>
<listitem>
<para>
- If this option is enabled, only the area contiguous to the stroke
- will be selected. Otherwise all the areas with same colors will be
- selected.
+ <guilabel>Draw foreground</guilabel>: to draw what will be
+ foreground.
+ </para>
+ <para>
+ <guilabel>Draw background</guilabel>: to draw what will be
+ foreground.
+ </para>
+ <para>
+ <guilabel>Draw unknown</guilabel>: to add to your selection pixels
+ that are in background.
</para>
- <figure>
- <title><quote>Contiguous</quote> option effect</title>
- <mediaobject>
- <imageobject>
- <imagedata format="PNG"
- fileref="images/toolbox/FG-select-contig1.png"/>
- </imageobject>
- <caption>
- <para>
- Two separated areas with the same color. On the left, only
- the left area is marked.
- </para>
- </caption>
- </mediaobject>
- <mediaobject>
- <imageobject>
- <imagedata format="PNG"
- fileref="images/toolbox/FG-select-contig2.png"/>
- </imageobject>
- <caption>
- <para>
- The Contiguous option is checked: only the area close to the
- painted line is selected.
- </para>
- </caption>
- </mediaobject>
- <mediaobject>
- <imageobject>
- <imagedata format="PNG"
- fileref="images/toolbox/FG-select-contig3.png"/>
- </imageobject>
- <caption>
- <para>
- The Contiguous option is not checked: both areas, although
- they are separated, are selected.
- </para>
- </caption>
- </mediaobject>
- </figure>
</listitem>
</varlistentry>
<varlistentry>
- <term>Interactive refinement</term>
+ <term>Stroke width</term>
<listitem>
<para>
- Here are some options to work more precisely on your selection:
+ The size of the brush.
</para>
- <variablelist>
- <varlistentry>
- <term>Mark foreground</term>
- <listitem>
- <para>
- default option. The foreground color of the Toolbox is used
- to paint. Colors covered by the painted line will be used
- for extraction.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Mark background</term>
- <listitem>
- <para>
- You can access this option either by clicking on the radio
- button or, more simply, by pressing the <keycap>Ctrl</keycap>
- key. The mouse pointer goes with a small eraser icon<!-- and a
- minus sign-->. The used color is the background color of
- Toolbox.
- The pixels of the selection which have the same color as the
- <quote>erased</quote> pixels will NOT be extracted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Small brush / Large brush</term>
- <listitem>
- <para>
- This slider lets you adapt the size of the brush used to
- paint the line. A small brush fits well thin details.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
</listitem>
- </varlistentry>
+ </varlistentry>
<varlistentry>
- <term>Smoothing</term>
+ <term>Preview mask</term>
<listitem>
<para>
- Smaller values give a more accurate selection border but may
- introduce holes in the selection.
+ You can adapt the color of the preview to your image.
</para>
</listitem>
- </varlistentry>
+ </varlistentry>
<varlistentry>
- <term>Preview color</term>
+ <term>Engine</term>
<listitem>
<para>
- You can select between Red, Green and Blue to mask the image
- background.
+ Work with <guilabel>Matting global</guilabel>(default) and improve
+ result with <guilabel>Matting Levin</guilabel>.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>Color Sensitivity</term>
+ <term>Iterations</term>
<listitem>
<para>
- This option uses the
- <link linkend="glossary-lab">L*a*b</link> color model. If your
- image contains many pixels of the same color in different tones,
- you can increase the sensibility of the selection for this
- color.
+ Default is 1. Repeating algorithm may improve result.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
+
+ <sect3>
+ <title>Refining Foreground Extraction</title>
+ <para>
+ In most images, foreground is not distinctly different from background.
+ Refining selection allows you now to extract these foregrounds.
+ Procedure steps are the same as above, but, during drawing foreground,
+ you will often toggle Preview, use Zoom (<keycap>+</keycap> key),
+ <guilabel>Draw background</guilabel> to delete unwanted background
+ extraction areas. You can also work directly on Preview mask.
+ </para>
+ <figure>
+ <title>Example for Draw background</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata format="PNG"
+ fileref="images/toolbox/FG-select-draw-bg.png"/>
+ </imageobject>
+ <caption>
+ <para>
+ On the left: drawing foreground ill-advisedly went over unknown
+ pixels area: a part of background will be included in foreground
+ selection!
+ </para>
+ <para>
+ In middle: <guilabel>Draw background</guilabel> option is checked:
+ draw on inclusion and unwanted pixels.
+ </para>
+ <para>
+ On the right: unwanted selected pixels in background are no longer
+ in foreground selection.
+ </para>
+ </caption>
+ </mediaobject>
+ </figure>
+ <para>
+ You will often have to reduce the unknown pixels zone with Draw
+ background.
+ </para>
+ <figure>
+ <title>Example for Draw unknown</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata format="PNG"
+ fileref="images/toolbox/FG-select-unknown.png"/>
+ </imageobject>
+ <caption>
+ <para>
+ On the left: the selection left a small part of foreground
+ unselected, in unknown pixels area.
+ </para>
+ <para>
+ On the right: with <guilabel>Draw unknown</guilabel> option
+ checked, draw on unselected pixels. They are now selected in
+ foreground.
+ </para>
+ </caption>
+ </mediaobject>
+ </figure>
+ </sect3>
</sect2>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]